From bae11b88357db72b19413cd05c62ac9242b9b597 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sun, 22 Nov 2020 21:49:58 +0000 Subject: Fix a few bugs. sbearssl appears to be working. --- src/stls/stls_run.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/stls/stls_run.c') diff --git a/src/stls/stls_run.c b/src/stls/stls_run.c index e6ab609..e8305bf 100644 --- a/src/stls/stls_run.c +++ b/src/stls/stls_run.c @@ -118,6 +118,12 @@ void stls_run (struct tls *ctx, int *fds, tain_t const *tto, uint32_t options, u iopause_fd x[4] ; unsigned int xindex[4] ; + if (ndelay_on(fds[0]) < 0 + || ndelay_on(fds[1]) < 0 + || ndelay_on(fds[2]) < 0 + || ndelay_on(fds[3]) < 0) + strerr_diefu1sys(111, "set fds non-blocking") ; + buffer_init(&b[0].b, &buffer_read, fds[0], b[0].buf, STLS_BUFSIZE) ; buffer_init(&b[1].b, &buffer_write, fds[1], b[1].buf, STLS_BUFSIZE) ; -- cgit v1.2.3