From: Stefan Eissing Date: Tue, 11 Apr 2023 14:34:01 +0000 (+0200) Subject: connect: fix https connection setup to treat ssl_mode correctly X-Git-Tag: curl-8_1_0~167 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dd8130406e832b76b2c8fbcdacca4ddf3c18db11;p=thirdparty%2Fcurl.git connect: fix https connection setup to treat ssl_mode correctly - for HTTPS protocol, a disabled ssl should never be acceptables. Closes #10934 --- diff --git a/lib/connect.c b/lib/connect.c index 7624794cf2..87f5b2ed1f 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -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;