Always issue new tickets when using TLSv1.3 stateful tickets
authorMatt Caswell <matt@openssl.org>
Mon, 16 Jul 2018 15:57:36 +0000 (16:57 +0100)
committerMatt Caswell <matt@openssl.org>
Tue, 17 Jul 2018 09:12:10 +0000 (10:12 +0100)
Previously we were failing to issue new tickets if a resumption attempt
failed.

Fixes #6654

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6722)

ssl/statem/extensions_srvr.c

index ab38a4f..f5ab5bb 100644 (file)
@@ -1014,6 +1014,8 @@ static SSL_TICKET_STATUS tls_get_stateful_ticket(SSL *s, PACKET *tick,
 {
     SSL_SESSION *tmpsess = NULL;
 
+    s->ext.ticket_expected = 1;
+
     switch (PACKET_remaining(tick)) {
         case 0:
             return SSL_TICKET_EMPTY;
@@ -1031,7 +1033,6 @@ static SSL_TICKET_STATUS tls_get_stateful_ticket(SSL *s, PACKET *tick,
     if (tmpsess == NULL)
         return SSL_TICKET_NO_DECRYPT;
 
-    s->ext.ticket_expected = 1;
     *sess = tmpsess;
     return SSL_TICKET_SUCCESS;
 }