diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-08-17 16:52:55 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-08-18 14:11:45 +0200 |
commit | 0da1356060365a42f3352ab87cd94e04a13aa963 (patch) | |
tree | fa9ccd3f0547b3446d433c4df5a4c4bc50e00d18 | |
parent | f121b0159386fdd5b3f7085f6c39c5a1e2d20258 (diff) | |
download | curl-0da1356060365a42f3352ab87cd94e04a13aa963.tar.gz |
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
-rw-r--r-- | lib/vtls/openssl.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index f6e6572d2..2d17acf1b 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -2658,8 +2658,7 @@ static CURLcode ossl_connect_step1(struct Curl_easy *data, return CURLE_SSL_CONNECT_ERROR; } - if(backend->ctx) - SSL_CTX_free(backend->ctx); + DEBUGASSERT(!backend->ctx); backend->ctx = SSL_CTX_new(req_method); if(!backend->ctx) { |