mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
7c73fefe38
The initial implementation always deferred the generation of the requested ticket(s) until the next application write, but this is not a great fit for what it actually does, architecturally wise. A request to send a session ticket means entering back into the handshake state machine (or "in init", as it's known in the implementation). The state machine transition is not something that only occurs at an application-data write, and in general could occur at any time. The only constraint is that we can't enter "init" while in the middle of writing application data. In such cases we will need to wait until the next TLS record boundary to enter the state machine, as is currently done. However, there is no reason why we cannot enter the handshake state machine immediately in SSL_new_session_ticket() if there are no application writes pending. Doing so provides a cleaner API surface to the application, as then calling SSL_do_handshake() suffices to drive the actual ticket generation. In the previous state of affairs a dummy zero-length SSL_write() would be needed to trigger the ticket generation, which is a logical mismatch in the type of operation being performed. This commit should only change whether SSL_do_handshake() vs zero-length SSL_write() is needed to immediately generate a ticket after the SSL_new_session_ticket() call -- the default behavior is still to defer the actual write until there is other application data to write, unless the application requests otherwise. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14817) |
||
---|---|---|
.. | ||
record | ||
statem | ||
bio_ssl.c | ||
build.info | ||
d1_lib.c | ||
d1_msg.c | ||
d1_srtp.c | ||
ktls.c | ||
methods.c | ||
pqueue.c | ||
s3_cbc.c | ||
s3_enc.c | ||
s3_lib.c | ||
s3_msg.c | ||
ssl_asn1.c | ||
ssl_cert_table.h | ||
ssl_cert.c | ||
ssl_ciph.c | ||
ssl_conf.c | ||
ssl_err_legacy.c | ||
ssl_err.c | ||
ssl_init.c | ||
ssl_lib.c | ||
ssl_local.h | ||
ssl_mcnf.c | ||
ssl_rsa_legacy.c | ||
ssl_rsa.c | ||
ssl_sess.c | ||
ssl_stat.c | ||
ssl_txt.c | ||
ssl_utst.c | ||
sslerr.h | ||
t1_enc.c | ||
t1_lib.c | ||
t1_trce.c | ||
tls13_enc.c | ||
tls_depr.c | ||
tls_srp.c |