]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
connect: fix https connection setup to treat ssl_mode correctly
authorStefan Eissing <stefan@eissing.org>
Tue, 11 Apr 2023 14:34:01 +0000 (16:34 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 12 Apr 2023 06:51:14 +0000 (08:51 +0200)
- for HTTPS protocol, a disabled ssl should never be acceptables.

Closes #10934

lib/connect.c

index 7624794cf2af6a6a891d5ebeccb360309481692f..87f5b2ed1f14580f5f9eb1c60fc7450247dd733c 100644 (file)
@@ -1409,9 +1409,8 @@ CURLcode Curl_conn_setup(struct Curl_easy *data,
 
 #if !defined(CURL_DISABLE_HTTP) && !defined(USE_HYPER)
   if(!conn->cfilter[sockindex] &&
-     conn->handler->protocol == CURLPROTO_HTTPS &&
-     (ssl_mode == CURL_CF_SSL_ENABLE || ssl_mode != CURL_CF_SSL_DISABLE)) {
-
+     conn->handler->protocol == CURLPROTO_HTTPS) {
+    DEBUGASSERT(ssl_mode != CURL_CF_SSL_DISABLE);
     result = Curl_cf_https_setup(data, conn, sockindex, remotehost);
     if(result)
       goto out;