diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2021-05-08 12:36:41 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2021-05-08 12:36:41 +0000 |
commit | 8f4d374c931ce12554beb9231c1af9171832e133 (patch) | |
tree | 240c22dae5d1a6afb3f3eb605dc2b3f8b3033caa | |
parent | 164ace71f8282db18ac4c167724596c5449a307d (diff) | |
download | s6-networking-8f4d374c931ce12554beb9231c1af9171832e133.tar.xz |
sbearssl cosmetic fixes
-rw-r--r-- | src/sbearssl/sbearssl_client_init_and_run.c | 4 | ||||
-rw-r--r-- | src/sbearssl/sbearssl_server_init_and_run.c | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/sbearssl/sbearssl_client_init_and_run.c b/src/sbearssl/sbearssl_client_init_and_run.c index 73fac70..d7bedec 100644 --- a/src/sbearssl/sbearssl_client_init_and_run.c +++ b/src/sbearssl/sbearssl_client_init_and_run.c @@ -64,10 +64,10 @@ void sbearssl_client_init_and_run (int *fds, tain_t const *tto, uint32_t preopti random_finish() ; br_ssl_engine_inject_entropy(&cc.eng, buf, 32) ; br_ssl_engine_set_buffer(&cc.eng, buf, sizeof(buf), 1) ; - if (!br_ssl_client_reset(&cc, servername, 0)) - strerr_diefu2x(97, "reset client context: ", sbearssl_error_str(br_ssl_engine_last_error(&cc.eng))) ; if (!sbearssl_x509_minimal_set_tain(&xc, &STAMP)) strerr_diefu1sys(111, "initialize validation time") ; + if (!br_ssl_client_reset(&cc, servername, 0)) + strerr_diefu2x(97, "reset client context: ", sbearssl_error_str(br_ssl_engine_last_error(&cc.eng))) ; sbearssl_run(&cc.eng, fds, tto, options, verbosity, cb, &cbarg) ; } diff --git a/src/sbearssl/sbearssl_server_init_and_run.c b/src/sbearssl/sbearssl_server_init_and_run.c index 629fafb..a7ae22b 100644 --- a/src/sbearssl/sbearssl_server_init_and_run.c +++ b/src/sbearssl/sbearssl_server_init_and_run.c @@ -99,7 +99,9 @@ void sbearssl_server_init_and_run (int *fds, tain_t const *tto, uint32_t preopti random_finish() ; br_ssl_engine_inject_entropy(&sc.eng, buf, 32) ; br_ssl_engine_set_buffer(&sc.eng, buf, sizeof(buf), 1) ; - br_ssl_server_reset(&sc) ; + if (!br_ssl_server_reset(&sc)) + strerr_diefu2x(97, "reset server context: ", sbearssl_error_str(br_ssl_engine_last_error(&sc.eng))) ; + sbearssl_run(&sc.eng, fds, tto, options, verbosity, cb, &cbarg) ; } } |