Add a TODO around handling of SSL_get_session() and SSL_get1_session()

These functions are problematic in TLSv1.3 because the server sends the
NewSessionTicket message after the handshake has finished.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2259)
This commit is contained in:
Matt Caswell 2017-01-13 13:34:49 +00:00
parent de1df7e9f2
commit e7a28df70b

View file

@ -44,6 +44,15 @@ static void SSL_SESSION_list_remove(SSL_CTX *ctx, SSL_SESSION *s);
static void SSL_SESSION_list_add(SSL_CTX *ctx, SSL_SESSION *s);
static int remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck);
/*
* TODO(TLS1.3): SSL_get_session() and SSL_get1_session() are problematic in
* TLS1.3 because, unlike in earlier protocol versions, the session ticket
* may not have been sent yet even though a handshake has finished. The session
* ticket data could come in sometime later...or even change if multiple session
* ticket messages are sent from the server. We need to work out how to deal
* with this.
*/
SSL_SESSION *SSL_get_session(const SSL *ssl)
/* aka SSL_get0_session; gets 0 objects, just returns a copy of the pointer */
{