]> granicus.if.org Git - curl/commitdiff
TLS: make SSL_VERIFYSTATUS work again
authorDaniel Stenberg <daniel@haxx.se>
Sun, 22 Jan 2017 17:11:55 +0000 (18:11 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 21 Feb 2017 07:33:18 +0000 (08:33 +0100)
The CURLOPT_SSL_VERIFYSTATUS option was not properly handled by libcurl
and thus even if the status couldn't be verified, the connection would
be allowed and the user would not be told about the failed verification.

Regression since cb4e2be7c6d42ca

CVE-2017-2629
Bug: https://curl.haxx.se/docs/adv_20170222.html

Reported-by: Marcus Hoffmann
lib/url.c

index 2886abec85faa7d92376c9c41ed0d38dd87377f9..b8f7cfb9b0497a5b0593187f23bab18dafa7b5a7 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -4173,8 +4173,11 @@ static struct connectdata *allocate_conn(struct Curl_easy *data)
   conn->bits.ftp_use_epsv = data->set.ftp_use_epsv;
   conn->bits.ftp_use_eprt = data->set.ftp_use_eprt;
 
+  conn->ssl_config.verifystatus = data->set.ssl.primary.verifystatus;
   conn->ssl_config.verifypeer = data->set.ssl.primary.verifypeer;
   conn->ssl_config.verifyhost = data->set.ssl.primary.verifyhost;
+  conn->proxy_ssl_config.verifystatus =
+    data->set.proxy_ssl.primary.verifystatus;
   conn->proxy_ssl_config.verifypeer = data->set.proxy_ssl.primary.verifypeer;
   conn->proxy_ssl_config.verifyhost = data->set.proxy_ssl.primary.verifyhost;