diff options
Diffstat (limited to 'src/tls/s6-tlsc-io.c')
-rw-r--r-- | src/tls/s6-tlsc-io.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/tls/s6-tlsc-io.c b/src/tls/s6-tlsc-io.c index 7c92d96..3c9df58 100644 --- a/src/tls/s6-tlsc-io.c +++ b/src/tls/s6-tlsc-io.c @@ -43,11 +43,11 @@ static inline void doit (int *fds, tain_t const *tto, uint32_t preoptions, uint3 #include <s6-networking/sbearssl.h> -static int handshake_cb (br_ssl_engine_context *ctx, sbearssl_handshake_cb_context_t *cbarg) +static int handshake_cb (br_ssl_engine_context *ctx, sbearssl_handshake_cbarg *cbarg) { if (cbarg->notif) { - if (!sbearssl_send_environment(ctx, cbarg->notif)) return 0 ; + if (!sbearssl_send_environment(ctx, cbarg)) return 0 ; fd_close(cbarg->notif) ; } return 1 ; @@ -55,8 +55,10 @@ 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) { + sbearssl_handshake_cbarg cbarg = SBEARSSL_HANDSHAKE_CBARG_ZERO ; if (!random_init()) strerr_diefu1sys(111, "initialize random device") ; - sbearssl_client_init_and_run(fds, tto, preoptions, options, verbosity, servername, &handshake_cb, notif) ; + cbarg.notif = notif ; + sbearssl_client_init_and_run(fds, tto, preoptions, options, verbosity, servername, &handshake_cb, &cbarg) ; } #else |