summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libssl/tls13_record_layer.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/libssl/tls13_record_layer.c b/src/lib/libssl/tls13_record_layer.c
index 70c440fee0..5e6f8e1e5b 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.46 2020/05/26 16:54:50 jsing Exp $ */ 1/* $OpenBSD: tls13_record_layer.c,v 1.47 2020/05/29 17:54:58 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 *
@@ -888,6 +888,15 @@ tls13_record_layer_read_internal(struct tls13_record_layer *rl,
888 if (CBS_len(&rl->rbuf_cbs) == 0) { 888 if (CBS_len(&rl->rbuf_cbs) == 0) {
889 if ((ret = tls13_record_layer_read_record(rl)) <= 0) 889 if ((ret = tls13_record_layer_read_record(rl)) <= 0)
890 return ret; 890 return ret;
891
892 /*
893 * We may have read a valid 0-byte application data record,
894 * in which case we need to read the next record.
895 */
896 if (CBS_len(&rl->rbuf_cbs) == 0) {
897 tls13_record_layer_rbuf_free(rl);
898 return TLS13_IO_WANT_POLLIN;
899 }
891 } 900 }
892 901
893 /* 902 /*