Add TLS_WANT to tls_handshake. Thanks bob. - geomyidae - a small C-based gopher… | |
git clone git://git.codemadness.org/geomyidae | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit c5dfedcbd82163391ed046caa3b2764562b0c1cf | |
parent 37b32150292c712dd823fdf810e7ee766a2358a9 | |
Author: Christoph Lohmann <[email protected]> | |
Date: Sat, 12 Aug 2023 20:24:55 +0200 | |
Add TLS_WANT to tls_handshake. Thanks bob. | |
Diffstat: | |
M main.c | 7 ++++++- | |
1 file changed, 6 insertions(+), 1 deletion(-) | |
--- | |
diff --git a/main.c b/main.c | |
@@ -991,7 +991,12 @@ read_selector_again: | |
istls = 1; | |
if (tls_accept_socket(tlsctx, &tlsclientctx, s… | |
return 1; | |
- if (tls_handshake(tlsclientctx) < 0) | |
+ wlen = TLS_WANT_POLLIN; | |
+ while (wlen == TLS_WANT_POLLIN \ | |
+ || wlen == TLS_WANT_POLLOUT) { | |
+ wlen = tls_handshake(tlsclientctx); | |
+ } | |
+ if (wlen == -1) | |
return 1; | |
} | |
#endif /* ENABLE_TLS */ |