diff options
author | 2020-05-11 18:08:11 +0000 | |
---|---|---|
committer | 2020-05-11 18:08:11 +0000 | |
commit | 6423e56fc083c24af016f600b9cd71874970c5a3 (patch) | |
tree | 6bda6c8c85a44ad4803f3e2858c684c822b93e3f /lib/libssl/tls13_record_layer.c | |
parent | Add record version checks. (diff) | |
download | wireguard-openbsd-6423e56fc083c24af016f600b9cd71874970c5a3.tar.xz wireguard-openbsd-6423e56fc083c24af016f600b9cd71874970c5a3.zip |
Propagate record overflows to the record layer and alert.
ok beck@ tb@
Diffstat (limited to 'lib/libssl/tls13_record_layer.c')
-rw-r--r-- | lib/libssl/tls13_record_layer.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libssl/tls13_record_layer.c b/lib/libssl/tls13_record_layer.c index 8ca52d0b7fa..82a49ae4255 100644 --- a/lib/libssl/tls13_record_layer.c +++ b/lib/libssl/tls13_record_layer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls13_record_layer.c,v 1.40 2020/05/11 18:03:51 jsing Exp $ */ +/* $OpenBSD: tls13_record_layer.c,v 1.41 2020/05/11 18:08:11 jsing Exp $ */ /* * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> * @@ -768,11 +768,13 @@ tls13_record_layer_read_record(struct tls13_record_layer *rl) if ((rl->rrec = tls13_record_new()) == NULL) goto err; } - + if ((ret = tls13_record_recv(rl->rrec, rl->cb.wire_read, rl->cb_arg)) <= 0) { switch (ret) { case TLS13_IO_RECORD_VERSION: return tls13_send_alert(rl, SSL_AD_PROTOCOL_VERSION); + case TLS13_IO_RECORD_OVERFLOW: + return tls13_send_alert(rl, SSL_AD_RECORD_OVERFLOW); } return ret; } |