Always issue new tickets when using TLSv1.3 stateful tickets

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)
This commit is contained in:
Matt Caswell 2018-07-16 16:57:36 +01:00
parent 04d7814a80
commit 5f26ddff7e

View 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;
}