summaryrefslogtreecommitdiff
path: root/src/lib/libssl/tls13_handshake.c
diff options
context:
space:
mode:
authorbeck <>2020-01-20 22:04:17 +0000
committerbeck <>2020-01-20 22:04:17 +0000
commit5acce3f58ab8ea3f51a29f1fd7044fcf134f5b06 (patch)
tree1b10cb169b3a1fa109007f5567f048751d227345 /src/lib/libssl/tls13_handshake.c
parentb9ba33b0c7f77fc7b3e33c32ded38da7ee4c7c55 (diff)
downloadopenbsd-5acce3f58ab8ea3f51a29f1fd7044fcf134f5b06.tar.gz
openbsd-5acce3f58ab8ea3f51a29f1fd7044fcf134f5b06.tar.bz2
openbsd-5acce3f58ab8ea3f51a29f1fd7044fcf134f5b06.zip
Add alerts to the tls 1.3 record layer and handshake layer
ok jsing@, inoguchi@, tb@
Diffstat (limited to 'src/lib/libssl/tls13_handshake.c')
-rw-r--r--src/lib/libssl/tls13_handshake.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/libssl/tls13_handshake.c b/src/lib/libssl/tls13_handshake.c
index 9f087888e1..c86187caec 100644
--- a/src/lib/libssl/tls13_handshake.c
+++ b/src/lib/libssl/tls13_handshake.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls13_handshake.c,v 1.36 2019/11/17 06:43:46 jsing Exp $ */ 1/* $OpenBSD: tls13_handshake.c,v 1.37 2020/01/20 22:04:17 beck Exp $ */
2/* 2/*
3 * Copyright (c) 2018-2019 Theo Buehler <tb@openbsd.org> 3 * Copyright (c) 2018-2019 Theo Buehler <tb@openbsd.org>
4 * Copyright (c) 2019 Joel Sing <jsing@openbsd.org> 4 * Copyright (c) 2019 Joel Sing <jsing@openbsd.org>
@@ -382,10 +382,8 @@ tls13_handshake_recv_action(struct tls13_ctx *ctx,
382 msg_type = tls13_handshake_msg_type(ctx->hs_msg); 382 msg_type = tls13_handshake_msg_type(ctx->hs_msg);
383 if (msg_type != action->handshake_type && 383 if (msg_type != action->handshake_type &&
384 (msg_type != TLS13_MT_CERTIFICATE || 384 (msg_type != TLS13_MT_CERTIFICATE ||
385 action->handshake_type != TLS13_MT_CERTIFICATE_REQUEST)) { 385 action->handshake_type != TLS13_MT_CERTIFICATE_REQUEST))
386 /* XXX send unexpected message alert */ 386 return tls13_send_alert(ctx->rl, SSL_AD_UNEXPECTED_MESSAGE);
387 return TLS13_IO_FAILURE;
388 }
389 387
390 /* XXX provide CBS and check all consumed. */ 388 /* XXX provide CBS and check all consumed. */
391 ret = TLS13_IO_FAILURE; 389 ret = TLS13_IO_FAILURE;