Add TLS_WANT to tls_handshake. Thanks bob. - geomyidae - A small C-based gopherd.
HTML git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/geomyidae/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
DIR LICENSE
---
DIR commit c5dfedcbd82163391ed046caa3b2764562b0c1cf
DIR parent 37b32150292c712dd823fdf810e7ee766a2358a9
HTML Author: Christoph Lohmann <20h@r-36.net>
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(-)
---
DIR diff --git a/main.c b/main.c
@@ -991,7 +991,12 @@ read_selector_again:
istls = 1;
if (tls_accept_socket(tlsctx, &tlsclientctx, sock) < 0)
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 */