summaryrefslogtreecommitdiffstats
path: root/lib/libssl/tls13_record_layer.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2020-05-16 18:00:29 +0000
committerjsing <jsing@openbsd.org>2020-05-16 18:00:29 +0000
commitacf76599022d9cc260c6327bc31fd213ff8d5b58 (patch)
tree130c99d6049f3d596701b21dfda1677dfdb83ac5 /lib/libssl/tls13_record_layer.c
parent+.Xr gpio 4 , (diff)
downloadwireguard-openbsd-acf76599022d9cc260c6327bc31fd213ff8d5b58.tar.xz
wireguard-openbsd-acf76599022d9cc260c6327bc31fd213ff8d5b58.zip
Return TLS13_IO_WANT_POLLIN after processing post-handshake messages.
After post-handshake handshake messages have been processed, we need to return TLS13_IO_WANT_POLLIN rather than TLS13_IO_WANT_RETRY. The latter will cause us to try to read another TLS record, when there may not be any data available - this will then block in the case of a blocking read. This reverts part of r1.25. Issue noticed by inoguchi@ ok beck@ tb@
Diffstat (limited to 'lib/libssl/tls13_record_layer.c')
-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 ab006b3b1a8..e6983d5892e 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.42 2020/05/13 17:54:26 jsing Exp $ */
+/* $OpenBSD: tls13_record_layer.c,v 1.43 2020/05/16 18:00:29 jsing Exp $ */
/*
* Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org>
*
@@ -931,7 +931,7 @@ tls13_record_layer_read_internal(struct tls13_record_layer *rl,
rl->phh = 0;
if (ret == TLS13_IO_SUCCESS)
- return TLS13_IO_WANT_RETRY;
+ return TLS13_IO_WANT_POLLIN;
return ret;
}