From ef8be0133d5ea643d6d41ad48edcfe97b69a9d1b Mon Sep 17 00:00:00 2001 From: John Date: Sat, 14 Oct 2023 16:49:31 +0200 Subject: [PATCH] workaround for potentially unusable SSL context --- src/lib/utils/httpclient.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/utils/httpclient.cpp b/src/lib/utils/httpclient.cpp index 93fca1dd..c89e8e9e 100755 --- a/src/lib/utils/httpclient.cpp +++ b/src/lib/utils/httpclient.cpp @@ -241,6 +241,9 @@ SSLSocket* SSLSocket::connect(const string& host, const uint16_t& port, bool htt } bio = BIO_new_ssl_connect(ctx); if (isError("new_ssl_conn", bio != nullptr)) { + // in this case the ctx seems to be in an invalid state and it never comes out of that again on its own + SSL_CTX_free(ctx); + ctx = nullptr; break; } BIO_set_info_callback(bio, bioInfoCallback);