summaryrefslogtreecommitdiff
path: root/src/stls
diff options
context:
space:
mode:
Diffstat (limited to 'src/stls')
-rw-r--r--src/stls/stls_client_init_and_handshake.c2
-rw-r--r--src/stls/stls_run.c6
-rw-r--r--src/stls/stls_server_init_and_handshake.c2
3 files changed, 10 insertions, 0 deletions
diff --git a/src/stls/stls_client_init_and_handshake.c b/src/stls/stls_client_init_and_handshake.c
index 50898ea..173942f 100644
--- a/src/stls/stls_client_init_and_handshake.c
+++ b/src/stls/stls_client_init_and_handshake.c
@@ -75,6 +75,8 @@ struct tls *stls_client_init_and_handshake (int const *fds, uint32_t preoptions,
if (tls_connect_fds(ctx, fds[0], fds[1], servername) < 0)
diectx(97, ctx, "tls_connect_fds") ;
tls_config_free(cfg) ;
+ strerr_warn1x("before handshake") ;
if (tls_handshake(ctx) < 0) diectx(97, ctx, "perform SSL handshake") ;
+ strerr_warn1x("after handshake") ;
return ctx ;
}
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) ;
diff --git a/src/stls/stls_server_init_and_handshake.c b/src/stls/stls_server_init_and_handshake.c
index 5d9c25c..5dd5284 100644
--- a/src/stls/stls_server_init_and_handshake.c
+++ b/src/stls/stls_server_init_and_handshake.c
@@ -77,7 +77,9 @@ struct tls *stls_server_init_and_handshake (int const *fds, uint32_t preoptions)
if (tls_accept_fds(ctx, &cctx, fds[0], fds[1]) < 0)
diectx(97, ctx, "tls_accept_fds") ;
tls_free(ctx) ;
+ strerr_warni1x("before handshake") ;
if (tls_handshake(cctx) < 0)
diectx(97, cctx, "perform SSL handshake") ;
+ strerr_warni1x("after handshake") ;
return cctx ;
}