mirror of
https://github.com/curl/curl.git
synced 2026-08-25 16:23:36 +03:00
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:
parent
ef3d7877d5
commit
25b445e479
11 changed files with 21 additions and 19 deletions
|
|
@ -1298,7 +1298,7 @@ static int do_connect(struct Curl_cfilter *cf, struct Curl_easy *data,
|
|||
|
||||
rc = connect(ctx->sock, &ctx->addr.curl_sa_addr, ctx->addr.addrlen);
|
||||
#elif defined(MSG_FASTOPEN) /* old Linux */
|
||||
if(cf->conn->given->flags & PROTOPT_SSL)
|
||||
if(Curl_conn_is_ssl(cf->conn, cf->sockindex))
|
||||
rc = connect(ctx->sock, &ctx->addr.curl_sa_addr, ctx->addr.addrlen);
|
||||
else
|
||||
rc = 0; /* Do nothing */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue