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

Callback style API for new session ticket for TLS 1.3 #370

Open
lhuang04 opened this issue Aug 30, 2021 · 1 comment
Open

Callback style API for new session ticket for TLS 1.3 #370

lhuang04 opened this issue Aug 30, 2021 · 1 comment

Comments

@lhuang04
Copy link
Collaborator

Suggested enhancement

Should we consider the callback style API to report a new session ticket is received by the client?

Justification

OpenSSL uses SSL_CTX_sess_set_new_cb to report a new session ticket.
In mbedtls TLS 1.3, we report it via return code, MBEDTLS_ERR_SSL_RECEIVED_NEW_SESSION_TICKET. There are couple of limitations in current approach.

  • This new return value, MBEDTLS_ERR_SSL_RECEIVED_NEW_SESSION_TICKET, will be propagated to public API, such as mbedtls_ssl_read, mbedtls_ssl_handshake and mbedtls_ssl_write. The client need add code to handle new return code.
  • In some cases with async io, mbedtls_ssl_write will return MBEDTLS_ERR_SSL_RECEIVED_NEW_SESSION_TICKET. This happens when the state transits to MBEDTLS_SSL_CLIENT_NEW_SESSION_TICKET, and mbedtls_ssl_write is called immediate after it.
@zhihan
Copy link

zhihan commented Sep 13, 2021

A related discussion in upstream: Mbed-TLS#2917

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

No branches or pull requests

2 participants