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

Fixed BearSSL bug: TLS Session Resumption (session id) not working #8474

Closed
wants to merge 1 commit into from

Conversation

jan2000
Copy link
Contributor

@jan2000 jan2000 commented Feb 19, 2022

Separated from: #8106

In bearssl_connect_step1 the function br_ssl_client_reset() is called with resume_session set to 0. This will make BearSSL clear the specified session id. Setting the resume_session paramater to 1 fixes this.

@@ -474,7 +474,7 @@ static CURLcode bearssl_connect_step1(struct Curl_easy *data,
hostname = snihost;
}

if(!br_ssl_client_reset(&backend->ctx, hostname, 0))
if(!br_ssl_client_reset(&backend->ctx, hostname, 1))
Copy link
Member

@jay jay Feb 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curl has its own session management. How does this affect the call to br_ssl_engine_set_session_parameters above?

Copy link
Contributor

@michaelforney michaelforney Feb 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing 0 here causes BearSSL to disable session resumption, so it won't resume a session with parameters set earlier. Passing 1 instead will cause BearSSL to actually use those parameters.

This was just an oversight on my part; I don't think I actually tested session resumption, so I forgot to enable it.

@jay jay added the TLS label Feb 19, 2022
@jay
Copy link
Member

@jay jay commented Feb 20, 2022

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants