1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[curl] Check enviroment variable CURL_CA_BUNDLE

This commit is contained in:
Witold Filipczyk 2023-11-08 13:09:57 +01:00
parent 1042755f7f
commit 388db93244

View File

@ -186,6 +186,7 @@ do_http(struct connection *conn)
int no_verify = get_blacklist_flags(conn->uri) & SERVER_BLACKLIST_NO_CERT_VERIFY;
struct string *cookies;
struct string referer;
char *bundle = getenv("CURL_CA_BUNDLE");
http->easy = curl;
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_fwrite);
@ -199,6 +200,10 @@ do_http(struct connection *conn)
curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, my_fwrite_header);
curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, "");
curl_easy_setopt(curl, CURLOPT_VERBOSE, 0L);
if (bundle) {
curl_easy_setopt(curl, CURLOPT_CAINFO, bundle);
}
#ifdef CONFIG_COOKIES
cookies = send_cookies(conn->uri);