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/tls | |
parent | 4fb917263ac30373cb3e5dfe3e207369eb238def (diff) | |
download | s6-networking-bae11b88357db72b19413cd05c62ac9242b9b597.tar.xz |
Fix a few bugs. sbearssl appears to be working.
Diffstat (limited to 'src/tls')
-rw-r--r-- | src/tls/s6-tlsc-io.c | 4 | ||||
-rw-r--r-- | src/tls/s6-tlsc.c | 2 | ||||
-rw-r--r-- | src/tls/s6-tlsd-io.c | 4 |
3 files changed, 1 insertions, 9 deletions
diff --git a/src/tls/s6-tlsc-io.c b/src/tls/s6-tlsc-io.c index 48965cc..f6a0210 100644 --- a/src/tls/s6-tlsc-io.c +++ b/src/tls/s6-tlsc-io.c @@ -55,8 +55,6 @@ static int handshake_cb (br_ssl_engine_context *ctx, sbearssl_handshake_cb_conte static inline void doit (int *fds, tain_t const *tto, uint32_t preoptions, uint32_t options, unsigned int verbosity, char const *servername, unsigned int notif) { - if (ndelay_on(fds[0]) < 0 || ndelay_on(fds[1]) < 0) - strerr_diefu1sys(111, "set local fds non-blocking") ; if (!random_init()) strerr_diefu1sys(111, "initialize random device") ; sbearssl_client_init_and_run(fds, tto, preoptions, options, verbosity, servername, &handshake_cb, notif) ; } @@ -111,8 +109,6 @@ int main (int argc, char const *const *argv, char const *const *envp) fds[1] = u ; } - if (ndelay_on(0) < 0 || ndelay_on(1) < 0) - strerr_diefu1sys(111, "set stdin/stdout non-blocking") ; if (sig_ignore(SIGPIPE) < 0) strerr_diefu1sys(111, "ignore SIGPIPE") ; tain_now_set_stopwatch_g() ; doit(fds, &tto, preoptions, options, verbosity, servername, notif) ; diff --git a/src/tls/s6-tlsc.c b/src/tls/s6-tlsc.c index 5b2e7dc..08a2ab2 100644 --- a/src/tls/s6-tlsc.c +++ b/src/tls/s6-tlsc.c @@ -33,7 +33,7 @@ int main (int argc, char const *const *argv) { unsigned int verbosity = 1 ; unsigned int kimeout = 0 ; - int p[4][2] ; + int p[4][2] = { [3] = { 6, 7 } } ; uint32_t coptions = 0 ; uint32_t poptions = 1 ; pid_t pid ; diff --git a/src/tls/s6-tlsd-io.c b/src/tls/s6-tlsd-io.c index 14003a2..75bd1e4 100644 --- a/src/tls/s6-tlsd-io.c +++ b/src/tls/s6-tlsd-io.c @@ -53,8 +53,6 @@ static int handshake_cb (br_ssl_engine_context *ctx, sbearssl_handshake_cb_conte static inline void doit (int *fds, tain_t const *tto, uint32_t preoptions, uint32_t options, unsigned int verbosity, unsigned int notif) { - if (ndelay_on(fds[0]) < 0 || ndelay_on(fds[1]) < 0) - strerr_diefu1sys(111, "set local fds non-blocking") ; if (!random_init()) strerr_diefu1sys(111, "initialize random device") ; sbearssl_server_init_and_run(fds, tto, preoptions, options, verbosity, &handshake_cb, notif) ; } @@ -107,8 +105,6 @@ int main (int argc, char const *const *argv, char const *const *envp) fds[1] = u ; } - if (ndelay_on(0) < 0 || ndelay_on(1) < 0) - strerr_diefu1sys(111, "set stdin/stdout non-blocking") ; if (sig_ignore(SIGPIPE) < 0) strerr_diefu1sys(111, "ignore SIGPIPE") ; tain_now_set_stopwatch_g() ; doit(fds, &tto, preoptions, options, verbosity, notif) ; |