Commit e7a28df7 authored by Matt Caswell's avatar Matt Caswell
Browse files

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: default avatarRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2259)
parent de1df7e9
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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 */
{