From 4aae040b1a8aecddcd0e1e959c77bb262fe6b850 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 20 May 2021 10:55:18 +0000 Subject: Add an x509 engine wrapping minimal. NOT FUNCTIONAL, FOR TESTING. --- src/sbearssl/sbearssl_run.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/sbearssl/sbearssl_run.c') diff --git a/src/sbearssl/sbearssl_run.c b/src/sbearssl/sbearssl_run.c index fda9f3e..c440060 100644 --- a/src/sbearssl/sbearssl_run.c +++ b/src/sbearssl/sbearssl_run.c @@ -11,10 +11,12 @@ #include #include +#include + #include #include "sbearssl-internal.h" -void sbearssl_run (br_ssl_engine_context *ctx, int *fds, tain_t const *tto, uint32_t options, unsigned int verbosity, sbearssl_handshake_cb_t_ref cb, sbearssl_handshake_cb_context_t *cbarg) +void sbearssl_run (br_ssl_engine_context *ctx, int *fds, tain_t const *tto, uint32_t options, unsigned int verbosity, sbearssl_handshake_cbfunc_ref cb, sbearssl_handshake_cbarg *cbarg) { iopause_fd x[4] ; unsigned int xindex[4] ; @@ -27,6 +29,7 @@ void sbearssl_run (br_ssl_engine_context *ctx, int *fds, tain_t const *tto, uint || ndelay_on(fds[3]) < 0) strerr_diefu1sys(111, "set fds non-blocking") ; + LOLDEBUG("entering engine") ; for (;;) { tain_t deadline = TAIN_INFINITE ; @@ -48,6 +51,7 @@ void sbearssl_run (br_ssl_engine_context *ctx, int *fds, tain_t const *tto, uint xindex[0] = j++ ; if (!handshake_done) { + LOLDEBUG("handshake done, calling cb") ; if (!(*cb)(ctx, cbarg)) strerr_diefu1sys(111, "post-handshake callback failed") ; handshake_done = 1 ; -- cgit v1.2.3