summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsing <>2020-05-16 18:00:29 +0000
committerjsing <>2020-05-16 18:00:29 +0000
commit58c2c3280b1c2071755cc36cca7828403e544131 (patch)
treea043592ca9de648f5add9d47d6fc192e279600d2 /src
parent05b86acd86a3e9f27019baf407fa6cc21987115c (diff)
downloadopenbsd-58c2c3280b1c2071755cc36cca7828403e544131.tar.gz
openbsd-58c2c3280b1c2071755cc36cca7828403e544131.tar.bz2
openbsd-58c2c3280b1c2071755cc36cca7828403e544131.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 'src')
-rw-r--r--src/lib/libssl/tls13_record_layer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libssl/tls13_record_layer.c b/src/lib/libssl/tls13_record_layer.c
index ab006b3b1a..e6983d5892 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.42 2020/05/13 17:54:26 jsing Exp $ */ 1/* $OpenBSD: tls13_record_layer.c,v 1.43 2020/05/16 18:00:29 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 *
@@ -931,7 +931,7 @@ tls13_record_layer_read_internal(struct tls13_record_layer *rl,
931 rl->phh = 0; 931 rl->phh = 0;
932 932
933 if (ret == TLS13_IO_SUCCESS) 933 if (ret == TLS13_IO_SUCCESS)
934 return TLS13_IO_WANT_RETRY; 934 return TLS13_IO_WANT_POLLIN;
935 935
936 return ret; 936 return ret;
937 } 937 }