From ed0dd5a474117f337baecb2c5210ec464d120696 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 30 Oct 2017 00:09:11 +0100 Subject: imlib: Look up CA certificates by $CURL_CA_BUNDLE. Similar to the `curl` command-line tool. --- src/imlib.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/imlib.c b/src/imlib.c index dfb79aa..82a9865 100644 --- a/src/imlib.c +++ b/src/imlib.c @@ -429,6 +429,10 @@ static char *feh_http_load_image(char *url) if (opt.insecure_ssl) { curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0); + } else { + // Allow the user to specify custom CA certificates. + curl_easy_setopt(curl, CURLOPT_CAINFO, + getenv("CURL_CA_BUNDLE")); } res = curl_easy_perform(curl); -- cgit v1.2.3