@@ -310,6 +310,10 @@ void HttpClient::request(HttpRequest req, ResponseCallback cb) {
310310 curl_easy_setopt (easy, CURLOPT_NOSIGNAL , 1L );
311311 curl_easy_setopt (easy, CURLOPT_TIMEOUT , 30L );
312312 curl_easy_setopt (easy, CURLOPT_CONNECTTIMEOUT , 10L );
313+ if (req.allowInsecureTls ) {
314+ curl_easy_setopt (easy, CURLOPT_SSL_VERIFYPEER , 0L );
315+ curl_easy_setopt (easy, CURLOPT_SSL_VERIFYHOST , 0L );
316+ }
313317 if (req.followRedirects ) {
314318 curl_easy_setopt (easy, CURLOPT_FOLLOWLOCATION , 1L );
315319 if (req.allowRedirectAuth ) {
@@ -393,6 +397,10 @@ HttpClient::StreamId HttpClient::startStream(HttpRequest req, StreamDataCallback
393397 curl_easy_setopt (easy, CURLOPT_NOSIGNAL , 1L );
394398 // No CURLOPT_TIMEOUT: the transfer is expected to stay open indefinitely.
395399 curl_easy_setopt (easy, CURLOPT_CONNECTTIMEOUT , 10L );
400+ if (req.allowInsecureTls ) {
401+ curl_easy_setopt (easy, CURLOPT_SSL_VERIFYPEER , 0L );
402+ curl_easy_setopt (easy, CURLOPT_SSL_VERIFYHOST , 0L );
403+ }
396404 if (req.followRedirects ) {
397405 curl_easy_setopt (easy, CURLOPT_FOLLOWLOCATION , 1L );
398406 if (req.allowRedirectAuth ) {
0 commit comments