]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tool_operate: avoid explicitly setting verifypeer to 1
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>
Sun, 19 May 2024 08:58:44 +0000 (11:58 +0300)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 25 May 2024 21:52:33 +0000 (23:52 +0200)
Also for the proxy verison. It is the default, just like verifyhost,
since a long time.

Closes #13704

src/tool_operate.c

index d81d59f280e50a40ddf2b6c0c2de334ec7977b1a..535712d1236c0586ec7ba7626aa30645b01b9540 100644 (file)
@@ -1731,15 +1731,12 @@ static CURLcode single_transfer(struct GlobalConfig *global,
           my_setopt_str(curl, CURLOPT_SSLKEYTYPE, config->key_type);
           my_setopt_str(curl, CURLOPT_PROXY_SSLKEYTYPE,
                         config->proxy_key_type);
+
+          /* libcurl default is strict verifyhost -> 1L, verifypeer -> 1L */
           if(config->insecure_ok) {
             my_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
             my_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
           }
-          else {
-            my_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1L);
-            /* libcurl default is strict verifyhost -> 2L   */
-            /* my_setopt(curl, CURLOPT_SSL_VERIFYHOST, 2L); */
-          }
 
           if(config->doh_insecure_ok) {
             my_setopt(curl, CURLOPT_DOH_SSL_VERIFYPEER, 0L);
@@ -1750,9 +1747,6 @@ static CURLcode single_transfer(struct GlobalConfig *global,
             my_setopt(curl, CURLOPT_PROXY_SSL_VERIFYPEER, 0L);
             my_setopt(curl, CURLOPT_PROXY_SSL_VERIFYHOST, 0L);
           }
-          else {
-            my_setopt(curl, CURLOPT_PROXY_SSL_VERIFYPEER, 1L);
-          }
 
           if(config->verifystatus)
             my_setopt(curl, CURLOPT_SSL_VERIFYSTATUS, 1L);