diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2020-11-22 21:49:58 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2020-11-22 21:49:58 +0000 |
commit | bae11b88357db72b19413cd05c62ac9242b9b597 (patch) | |
tree | e797f9d4ba09ece0b41cab424052915bee03052a /src/stls/stls_run.c | |
parent | 4fb917263ac30373cb3e5dfe3e207369eb238def (diff) | |
download | s6-networking-bae11b88357db72b19413cd05c62ac9242b9b597.tar.xz |
Fix a few bugs. sbearssl appears to be working.
Diffstat (limited to 'src/stls/stls_run.c')
-rw-r--r-- | src/stls/stls_run.c | 6 |
1 files changed, 6 insertions, 0 deletions
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) ; |