summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2020-05-09 15:39:19 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2020-05-09 15:39:19 +0000
commitaf321e3aadad9ca0c26057fa97c77eaeaa3b6ac9 (patch)
tree3131c850ea0b504964c392fda39bb1835733e6f9
parentac7895d867cc4803b196b6928888975ee923a969 (diff)
Correct return value check to handle TLS13_IO_EOF case.
-rw-r--r--lib/libssl/tls13_record_layer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libssl/tls13_record_layer.c b/lib/libssl/tls13_record_layer.c
index 16a22a841b1..6b9be4028cc 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.34 2020/05/07 18:56:09 tb Exp $ */
+/* $OpenBSD: tls13_record_layer.c,v 1.35 2020/05/09 15:39:18 jsing Exp $ */
/*
* Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org>
*
@@ -343,7 +343,7 @@ tls13_record_layer_send_phh(struct tls13_record_layer *rl)
/* Push out pending post-handshake handshake messages. */
if ((ret = tls13_record_layer_write_chunk(rl, SSL3_RT_HANDSHAKE,
- CBS_data(&rl->phh_cbs), CBS_len(&rl->phh_cbs))) < 0)
+ CBS_data(&rl->phh_cbs), CBS_len(&rl->phh_cbs))) <= 0)
return ret;
if (!CBS_skip(&rl->phh_cbs, ret))
return TLS13_IO_FAILURE;