mirror of
https://github.com/curl/curl.git
synced 2025-04-24 16:40:32 +08:00
openssl: when creating a new context, there cannot be an old one
Remove the previous handling that would call SSL_CTX_free(), and instead add an assert that halts a debug build if there ever is a context already set at this point. Closes #7585
This commit is contained in:
parent
f121b01593
commit
0da1356060
@ -2658,8 +2658,7 @@ static CURLcode ossl_connect_step1(struct Curl_easy *data,
|
|||||||
return CURLE_SSL_CONNECT_ERROR;
|
return CURLE_SSL_CONNECT_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(backend->ctx)
|
DEBUGASSERT(!backend->ctx);
|
||||||
SSL_CTX_free(backend->ctx);
|
|
||||||
backend->ctx = SSL_CTX_new(req_method);
|
backend->ctx = SSL_CTX_new(req_method);
|
||||||
|
|
||||||
if(!backend->ctx) {
|
if(!backend->ctx) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user