geomyidae

A small C-based gopherd. (gopher://bitreich.org/1/scm/geomyidae)
git clone git://r-36.net/geomyidae
Log | Files | Refs | README | LICENSE

commit c5dfedcbd82163391ed046caa3b2764562b0c1cf
parent 37b32150292c712dd823fdf810e7ee766a2358a9
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:
Mmain.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, 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 */