Fix alert on tls1_process_alert failure.
If the function fails, it's an internal_error.
Change-Id: I4b7cf7a6ca2527f04b708303ab1bc71df762b55b
Reviewed-on: https://boringssl-review.googlesource.com/12312
Reviewed-by: David Benjamin <davidben@google.com>
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c
index a33562a..1b346d0 100644
--- a/ssl/t1_lib.c
+++ b/ssl/t1_lib.c
@@ -2007,9 +2007,14 @@
/* TLS 1.3 session tickets are renewed separately as part of the
* NewSessionTicket. */
- int renew;
- return tls_process_ticket(ssl, out_session, &renew, CBS_data(&ticket),
- CBS_len(&ticket), NULL, 0);
+ int unused_renew;
+ if (!tls_process_ticket(ssl, out_session, &unused_renew, CBS_data(&ticket),
+ CBS_len(&ticket), NULL, 0)) {
+ *out_alert = SSL_AD_INTERNAL_ERROR;
+ return 0;
+ }
+
+ return 1;
}
int ssl_ext_pre_shared_key_add_serverhello(SSL *ssl, CBB *out) {