From fd8322e771b5fe525746ae0c1c46eb455ce0d5cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnter=20Obiltschnig?= Date: Thu, 27 Feb 2025 20:59:29 +0100 Subject: [PATCH] fix(NetSSL): SecureSocketImpl::currentSession() regression since 1.12.4 #4882 --- NetSSL_OpenSSL/src/SecureSocketImpl.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/NetSSL_OpenSSL/src/SecureSocketImpl.cpp b/NetSSL_OpenSSL/src/SecureSocketImpl.cpp index ce03396e8..87d736cad 100644 --- a/NetSSL_OpenSSL/src/SecureSocketImpl.cpp +++ b/NetSSL_OpenSSL/src/SecureSocketImpl.cpp @@ -633,6 +633,14 @@ void SecureSocketImpl::abort() Session::Ptr SecureSocketImpl::currentSession() { + if (!_pSession && _pSSL) + { + SSL_SESSION* pSession = SSL_get1_session(_pSSL); + if (pSession) + { + _pSession = new Session(pSession); + } + } return _pSession; }