Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SecureSocketImpl::currentSession() regression since 1.12.4 #4882

Open
micheleselea opened this issue Feb 26, 2025 · 2 comments
Open

SecureSocketImpl::currentSession() regression since 1.12.4 #4882

micheleselea opened this issue Feb 26, 2025 · 2 comments
Assignees
Labels

Comments

@micheleselea
Copy link
Contributor

when we switch from 1.12.4 to 1.12.5 I think the function SecureSocketImpl::currentSession() was changed.
in 2023 we discuss about implementing SecureSocketImpl::currentSession() link this

Session::Ptr SecureSocketImpl::currentSession()
{
	if (_pSession) return _pSession;
	if (_pSSL)
	{
		SSL_SESSION* pSession = SSL_get1_session(_pSSL);
		if (pSession)
		{
			if (_pSession && pSession == _pSession->sslSession())
			{
				SSL_SESSION_free(pSession);
				return _pSession;
			}
			else return new Session(pSession);
		}
	}
	return 0;
}

because sometimes happened currentSession() return always nullptr.
since 1.12.5 the function was as before

Session::Ptr SecureSocketImpl::currentSession()
{
	return _pSession;
}

the same in 1.14.1

@micheleselea micheleselea changed the title SecureSocketImpl::currentSession() SecureSocketImpl::currentSession() regression since 1.12.4 Feb 26, 2025
@SinghRajenM
Copy link
Contributor

@micheleselea Yes, we are also facing the same issue. Reverting this helped us.

cc: @matejk @aleks-f

@matejk
Copy link
Contributor

matejk commented Feb 27, 2025

See #3880.

@obiltschnig ?

@obiltschnig obiltschnig self-assigned this Feb 27, 2025
@obiltschnig obiltschnig added this to the Release 1.14.2 milestone Feb 27, 2025
@obiltschnig obiltschnig added this to 1.14 Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

4 participants