Closed zhihan closed 1 year ago
TODO
As of now, this PR changes the behavior of mbedtls_ssl_handshake()
: mbedtls_ssl_handshake()
will return early if the handshake reaches the state where early data can be sent. Calling it again will complete the handshake. I think we should change it to that mbedtls_ssl_handshake()
will always complete the handshake. The early return state should only be reached if mbedtls_ssl_write_early_data()
is called.
mbedtls_ssl_read()
will implicitly complete the handshake. Based on this issue we might want to keep this behavior.
Added a commit to make sure mbedtls_ssl_write_early_data()
starts early handshake.
This PR add a new API for sending early data on the client side. It deprecates the
mbedtls_ssl_set_early_data()
method. It is a design alternative to #368.Changes proposed
MBEDTLS_ERR_SSL_HANDSHAKE_EARLY_RETURN
for early return. Handshake returns with this error indicating the user can start sending early data. Callingmbedtls_ssl_handshake()
again will continue the handshake. This pattern is similar to the handling ofNewSessionTicket
.MBEDTLS_SSL_EARLY_DATA_ON|OFF
toMBEDTLS_SSL_EARLY_DATA_STATE_DISABLED |ON|OFF
as these values represent the state of the client, rather than a configuration. When early data is enabled, the early_data state is initially ON, it will be turned to OFF if early data is rejected, a HRR is received, or max_early_data is reached (to add).Status
DRAFT, solicit early feedback on design.
Requires Backporting
NO
Migrations
Additional comments
Any additional information that could be of interest
Todos
Steps to test or reproduce
Outline the steps to test or reproduce the PR here.
Start openssl server using
Then try