1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-29 03:17:53 -04:00

[curl] no verify

This commit is contained in:
Witold Filipczyk 2023-06-30 16:30:44 +02:00
parent e734a41df9
commit 008eacef69

View File

@ -179,6 +179,7 @@ do_http(struct connection *conn)
if (curl) {
CURLMcode rc;
char *optstr;
int no_verify = get_blacklist_flags(conn->uri) & SERVER_BLACKLIST_NO_CERT_VERIFY;
http->easy = curl;
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_fwrite);
@ -280,6 +281,11 @@ do_http(struct connection *conn)
}
}
if (no_verify) {
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
}
rc = curl_multi_add_handle(g.multi, curl);
mcode_or_die("new_conn: curl_multi_add_handle", rc);
}