TLS: check connection for SSL use, not handler

Protocol handler option PROTOPT_SSL is used to setup a connection
filters. Once that is done, used `Curl_conn_is_ssl()` to check if
a connection uses SSL.

There may be other reasons to add SSL to a connection, e.g. starttls.

Closes #16034
This commit is contained in:
Stefan Eissing 2025-01-17 11:57:00 +01:00 committed by Daniel Stenberg
parent ef3d7877d5
commit 25b445e479
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
11 changed files with 21 additions and 19 deletions

View file

@ -3163,7 +3163,7 @@ static CURLcode ftp_connect(struct Curl_easy *data,
PINGPONG_SETUP(pp, ftp_statemachine, ftp_endofresp);
if(conn->handler->flags & PROTOPT_SSL) {
if(Curl_conn_is_ssl(conn, FIRSTSOCKET)) {
/* BLOCKING */
result = Curl_conn_connect(data, FIRSTSOCKET, TRUE, done);
if(result)