summaryrefslogtreecommitdiff
path: root/src/lib/libssl/tls13_lib.c
diff options
context:
space:
mode:
authorjsing <>2020-01-22 13:10:51 +0000
committerjsing <>2020-01-22 13:10:51 +0000
commit7655835d7e1b8fa812246e1e652a1747a4f67b32 (patch)
tree80ca1bcd2a0b8b6d5658a3b4bbec080ceced53e3 /src/lib/libssl/tls13_lib.c
parente53889cb5c5ff4e8801ca99623f6e16491f94358 (diff)
downloadopenbsd-7655835d7e1b8fa812246e1e652a1747a4f67b32.tar.gz
openbsd-7655835d7e1b8fa812246e1e652a1747a4f67b32.tar.bz2
openbsd-7655835d7e1b8fa812246e1e652a1747a4f67b32.zip
Pass a handshake message content CBS to TLSv1.3 receive handlers.
This avoids every receive handler from having to get the handshake message content itself. Additionally, pull the trailing data check up so that each receive handler does not have to implement it. This makes the code more readable and reduces duplication. ok beck@ tb@
Diffstat (limited to '')
-rw-r--r--src/lib/libssl/tls13_lib.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/libssl/tls13_lib.c b/src/lib/libssl/tls13_lib.c
index 73d936ac3f..51a2a383ed 100644
--- a/src/lib/libssl/tls13_lib.c
+++ b/src/lib/libssl/tls13_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls13_lib.c,v 1.20 2020/01/22 06:23:00 jsing Exp $ */ 1/* $OpenBSD: tls13_lib.c,v 1.21 2020/01/22 13:10:51 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org>
4 * Copyright (c) 2019 Bob Beck <beck@openbsd.org> 4 * Copyright (c) 2019 Bob Beck <beck@openbsd.org>
@@ -356,6 +356,9 @@ tls13_legacy_error(SSL *ssl)
356 case TLS13_ERR_HRR_FAILED: 356 case TLS13_ERR_HRR_FAILED:
357 reason = SSL_R_NO_CIPHERS_AVAILABLE; 357 reason = SSL_R_NO_CIPHERS_AVAILABLE;
358 break; 358 break;
359 case TLS13_ERR_TRAILING_DATA:
360 reason = SSL_R_EXTRA_DATA_IN_MESSAGE;
361 break;
359 } 362 }
360 363
361 ERR_put_error(ERR_LIB_SSL, (0xfff), reason, ctx->error.file, 364 ERR_put_error(ERR_LIB_SSL, (0xfff), reason, ctx->error.file,