fix(NetSSL): SecureSocketImpl::currentSession() regression since 1.12.4 #4882

This commit is contained in:
Günter Obiltschnig
2025-02-27 20:59:29 +01:00
parent 7dd2024c9e
commit fd8322e771

View File

@@ -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;
}