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)
Todd Short authored 2 years ago
Benjamin Kaduk committed 2 years ago
3944 | 3944 | } |
3945 | 3945 | |
3946 | 3946 | if (tctx->generate_ticket_cb != NULL && |
3947 | tctx->generate_ticket_cb(s, tctx->ticket_cb_data) == 0) | |
3948 | goto err; | |
3949 | ||
3947 | tctx->generate_ticket_cb(s, tctx->ticket_cb_data) == 0) { | |
3948 | SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR); | |
3949 | goto err; | |
3950 | } | |
3950 | 3951 | /* |
3951 | 3952 | * If we are using anti-replay protection then we behave as if |
3952 | 3953 | * SSL_OP_NO_TICKET is set - we are caching tickets anyway so there |