diff options
author | Marius Bakke <mbakke@fastmail.com> | 2017-10-30 00:09:11 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2017-10-30 00:09:11 +0100 |
commit | ed0dd5a474117f337baecb2c5210ec464d120696 (patch) | |
tree | 9e7e56b09f0884e12262109500a42ec6dec0370b /src/imlib.c | |
parent | 7c516eabb7c7b940de63417452e4d1eab3b83792 (diff) |
imlib: Look up CA certificates by $CURL_CA_BUNDLE.
Similar to the `curl` command-line tool.
Diffstat (limited to 'src/imlib.c')
-rw-r--r-- | src/imlib.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); |