summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_sess.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/ssl_sess.c')
-rw-r--r--src/lib/libssl/ssl_sess.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/lib/libssl/ssl_sess.c b/src/lib/libssl/ssl_sess.c
index 16b4b75bc4..827360176b 100644
--- a/src/lib/libssl/ssl_sess.c
+++ b/src/lib/libssl/ssl_sess.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_sess.c,v 1.85 2019/04/22 15:12:20 jsing Exp $ */ 1/* $OpenBSD: ssl_sess.c,v 1.86 2020/08/31 14:04:51 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -435,10 +435,10 @@ sess_id_done:
435 * to 1 if the server should issue a new session ticket (to 0 otherwise). 435 * to 1 if the server should issue a new session ticket (to 0 otherwise).
436 */ 436 */
437int 437int
438ssl_get_prev_session(SSL *s, CBS *session_id, CBS *ext_block) 438ssl_get_prev_session(SSL *s, CBS *session_id, CBS *ext_block, int *alert)
439{ 439{
440 SSL_SESSION *ret = NULL; 440 SSL_SESSION *ret = NULL;
441 int fatal = 0; 441 int alert_desc = SSL_AD_INTERNAL_ERROR, fatal = 0;
442 int try_session_cache = 1; 442 int try_session_cache = 1;
443 int r; 443 int r;
444 444
@@ -451,7 +451,7 @@ ssl_get_prev_session(SSL *s, CBS *session_id, CBS *ext_block)
451 try_session_cache = 0; 451 try_session_cache = 0;
452 452
453 /* Sets s->internal->tlsext_ticket_expected. */ 453 /* Sets s->internal->tlsext_ticket_expected. */
454 r = tls1_process_ticket(s, session_id, ext_block, &ret); 454 r = tls1_process_ticket(s, session_id, ext_block, &alert_desc, &ret);
455 switch (r) { 455 switch (r) {
456 case -1: /* Error during processing */ 456 case -1: /* Error during processing */
457 fatal = 1; 457 fatal = 1;
@@ -591,9 +591,10 @@ err:
591 s->internal->tlsext_ticket_expected = 1; 591 s->internal->tlsext_ticket_expected = 1;
592 } 592 }
593 } 593 }
594 if (fatal) 594 if (fatal) {
595 *alert = alert_desc;
595 return -1; 596 return -1;
596 else 597 } else
597 return 0; 598 return 0;
598} 599}
599 600