Skip to content

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

Closed
jan2000 wants to merge 1 commit into
curl:masterfrom
jan2000:bearssl-fix-session-resumption
Closed

Fixed BearSSL bug: TLS Session Resumption (session id) not working#8474
jan2000 wants to merge 1 commit into
curl:masterfrom
jan2000:bearssl-fix-session-resumption

Conversation

@jan2000

@jan2000 jan2000 commented Feb 19, 2022

Copy link
Copy Markdown
Contributor

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.

Comment thread lib/vtls/bearssl.c
}

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

Copy link
Copy Markdown
Member

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
Copy Markdown
Contributor

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 jay closed this in b844371 Feb 20, 2022
@jay

jay commented Feb 20, 2022

Copy link
Copy Markdown
Member

Thanks

@jan2000 jan2000 deleted the bearssl-fix-session-resumption branch April 22, 2024 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants