summaryrefslogtreecommitdiffstats
path: root/ssl/statem
diff options
context:
space:
mode:
authorTodd Short <tshort@akamai.com>2021-05-26 10:03:35 -0400
committerBenjamin Kaduk <bkaduk@akamai.com>2021-05-27 11:54:32 -0700
commite49095f186dcea5dbd902eae6cc81935063f782d (patch)
tree93ddb421ce0d25dd7b12e977a96c9d8a67fafe83 /ssl/statem
parent07fb85cf6191961fcad824d2f8f2b2a0fcba18ce (diff)
Call SSLfatal when the generate_ticket_cb returns 0
Otherwise, the state machine ends up being in a bad state: ``` SSL routines:write_state_machine:missing fatal:ssl/statem/statem.c:XXX: ``` Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/15487)
Diffstat (limited to 'ssl/statem')
-rw-r--r--ssl/statem/statem_srvr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ssl/statem/statem_srvr.c b/ssl/statem/statem_srvr.c
index 386bd983fc..56d4b4591a 100644
--- a/ssl/statem/statem_srvr.c
+++ b/ssl/statem/statem_srvr.c
@@ -3945,9 +3945,10 @@ int tls_construct_new_session_ticket(SSL *s, WPACKET *pkt)
}
if (tctx->generate_ticket_cb != NULL &&
- tctx->generate_ticket_cb(s, tctx->ticket_cb_data) == 0)
+ tctx->generate_ticket_cb(s, tctx->ticket_cb_data) == 0) {
+ SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
goto err;
-
+ }
/*
* If we are using anti-replay protection then we behave as if
* SSL_OP_NO_TICKET is set - we are caching tickets anyway so there