summaryrefslogtreecommitdiff
path: root/src/lib/libssl/tls13_record_layer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/tls13_record_layer.c')
-rw-r--r--src/lib/libssl/tls13_record_layer.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/lib/libssl/tls13_record_layer.c b/src/lib/libssl/tls13_record_layer.c
index e7650b1ecc..8ca52d0b7f 100644
--- a/src/lib/libssl/tls13_record_layer.c
+++ b/src/lib/libssl/tls13_record_layer.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls13_record_layer.c,v 1.39 2020/05/11 17:46:46 jsing Exp $ */ 1/* $OpenBSD: tls13_record_layer.c,v 1.40 2020/05/11 18:03: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 * 4 *
@@ -769,11 +769,18 @@ tls13_record_layer_read_record(struct tls13_record_layer *rl)
769 goto err; 769 goto err;
770 } 770 }
771 771
772 if ((ret = tls13_record_recv(rl->rrec, rl->cb.wire_read, rl->cb_arg)) <= 0) 772 if ((ret = tls13_record_recv(rl->rrec, rl->cb.wire_read, rl->cb_arg)) <= 0) {
773 switch (ret) {
774 case TLS13_IO_RECORD_VERSION:
775 return tls13_send_alert(rl, SSL_AD_PROTOCOL_VERSION);
776 }
773 return ret; 777 return ret;
774 778 }
775 /* XXX - record version checks. */ 779
776 780 if (rl->legacy_version == TLS1_2_VERSION &&
781 tls13_record_version(rl->rrec) != TLS1_2_VERSION)
782 return tls13_send_alert(rl, SSL_AD_PROTOCOL_VERSION);
783
777 content_type = tls13_record_content_type(rl->rrec); 784 content_type = tls13_record_content_type(rl->rrec);
778 785
779 /* 786 /*