Don't do handshake in mbedtls_ssl_read and mbedtls_ssl_write #9517
Labels
api-break
This issue/PR breaks the API and must wait for a new major version
component-tls
enhancement
needs-design-approval
size-m
Estimated task size: medium (~1w)
Don't perform handshake steps inside
mbedtls_ssl_read()
ormbedtls_ssl_write()
. Instead, have the user callmbedtls_ssl_handshake()
.The goal is to simplify these functions and reduce the errors (especially “non-error errors” like
MBEDTLS_SSL_WANT_READ
andMBEDTLS_SSL_WANT_WRITE
).I am personally not convinced by this, especially if we do #9516. It wouldn't simplify the code that much: we can have read() be
do { do_read(); if (handshake_needed) handshake_step(); } while (more_handshake_needed())
.The text was updated successfully, but these errors were encountered: