summaryrefslogtreecommitdiff
path: root/src/sbearssl/sbearssl_s6tlsc.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2016-11-30 16:00:29 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2016-11-30 16:00:29 +0000
commitcc08be523a2a647a999dcf82dcce9dee62b4162c (patch)
tree235f40d2d5431e383491e74a21d34073cf6ed712 /src/sbearssl/sbearssl_s6tlsc.c
parent3f78080496cddb11cbe9040efce694e44cfac7fe (diff)
downloads6-networking-cc08be523a2a647a999dcf82dcce9dee62b4162c.tar.xz
sbearssl: allow DER-encoded certificates in TA directory
Diffstat (limited to 'src/sbearssl/sbearssl_s6tlsc.c')
-rw-r--r--src/sbearssl/sbearssl_s6tlsc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sbearssl/sbearssl_s6tlsc.c b/src/sbearssl/sbearssl_s6tlsc.c
index 6b12320..f20f293 100644
--- a/src/sbearssl/sbearssl_s6tlsc.c
+++ b/src/sbearssl/sbearssl_s6tlsc.c
@@ -58,6 +58,7 @@ int sbearssl_s6tlsc (char const *const *argv, char const *const *envp, tain_t co
while (i--)
sbearssl_ta_to(genalloc_s(sbearssl_ta, &tas) + i, btas + i, storage.s) ;
genalloc_free(sbearssl_ta, &tas) ;
+
br_ssl_client_init_full(&cc, &xc, btas, talen) ;
if (!random_init())
@@ -73,6 +74,9 @@ int sbearssl_s6tlsc (char const *const *argv, char const *const *envp, tain_t co
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))) ;
+ tain_now_g() ;
+ if (!sbearssl_x509_minimal_set_tain(&xc, &STAMP))
+ strerr_diefu1sys(111, "initialize validation time") ;
{
int wstat ;