[openssl] master update

kaduk at mit.edu kaduk at mit.edu
Thu May 27 19:06:31 UTC 2021


The branch master has been updated
       via  e49095f186dcea5dbd902eae6cc81935063f782d (commit)
      from  07fb85cf6191961fcad824d2f8f2b2a0fcba18ce (commit)


- Log -----------------------------------------------------------------
commit e49095f186dcea5dbd902eae6cc81935063f782d
Author: Todd Short <tshort at akamai.com>
Date:   Wed May 26 10:03:35 2021 -0400

    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 at openssl.org>
    Reviewed-by: Ben Kaduk <kaduk at mit.edu>
    (Merged from https://github.com/openssl/openssl/pull/15487)

-----------------------------------------------------------------------

Summary of changes:
 ssl/statem/statem_srvr.c | 5 +++--
 1 file 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


More information about the openssl-commits mailing list