diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2021-05-20 10:55:18 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2021-05-20 10:55:18 +0000 |
commit | 4aae040b1a8aecddcd0e1e959c77bb262fe6b850 (patch) | |
tree | 37c985cc6ff250ec486c3eaa09428eb5bf08cdb2 /src/tls/s6-tlsc-io.c | |
parent | 6780eee3e0dbe37640f72ed1e37a95c506e23f8c (diff) | |
download | s6-networking-4aae040b1a8aecddcd0e1e959c77bb262fe6b850.tar.xz |
Add an x509 engine wrapping minimal. NOT FUNCTIONAL, FOR TESTING.
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 |