summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sbearssl/sbearssl_client_init_and_run.c4
-rw-r--r--src/sbearssl/sbearssl_server_init_and_run.c4
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) ;
}
}