summaryrefslogtreecommitdiff
path: root/src/sbearssl
diff options
context:
space:
mode:
Diffstat (limited to 'src/sbearssl')
-rw-r--r--src/sbearssl/sbearssl_server_init_and_run.c3
-rw-r--r--src/sbearssl/sbearssl_x509_small_vtable.c12
2 files changed, 11 insertions, 4 deletions
diff --git a/src/sbearssl/sbearssl_server_init_and_run.c b/src/sbearssl/sbearssl_server_init_and_run.c
index 428efb8..56943bf 100644
--- a/src/sbearssl/sbearssl_server_init_and_run.c
+++ b/src/sbearssl/sbearssl_server_init_and_run.c
@@ -10,6 +10,8 @@
#include <skalibs/genalloc.h>
#include <skalibs/random.h>
+#include <skalibs/lolstdio.h>
+
#include <s6-networking/sbearssl.h>
#include "sbearssl-internal.h"
@@ -74,6 +76,7 @@ void sbearssl_server_init_and_run (int *fds, tain_t const *tto, uint32_t preopti
if (n)
{
+ LOLDEBUG("sbearssl_server_init_and_run: trusts anchors found: %zu", n) ;
sbearssl_x509_small_init_full(&xc, btas, n, &cbarg->eedn, &cbarg->eltstatus, cbarg->eehash) ;
if (!sbearssl_x509_small_set_tain(&xc, &STAMP))
strerr_diefu1sys(111, "initialize validation time") ;
diff --git a/src/sbearssl/sbearssl_x509_small_vtable.c b/src/sbearssl/sbearssl_x509_small_vtable.c
index 9946e7a..d589c94 100644
--- a/src/sbearssl/sbearssl_x509_small_vtable.c
+++ b/src/sbearssl/sbearssl_x509_small_vtable.c
@@ -1,9 +1,9 @@
/* ISC license. */
-#include <skalibs/lolstdio.h>
-
#include <bearssl.h>
+#include <skalibs/lolstdio.h>
+
#include <s6-networking/sbearssl.h>
#define INSTANCE(c) ((sbearssl_x509_small_context *)(c))
@@ -41,15 +41,19 @@ static void end_cert (br_x509_class const **c)
ctx->minimal.vtable->end_cert(&ctx->minimal.vtable) ;
LOLDEBUG("small_context: end_cert") ;
- if (!ctx->i) br_sha256_out(&ctx->hashctx, ctx->eehash) ;
+ if (!ctx->i)
+ {
+ br_sha256_out(&ctx->hashctx, ctx->eehash) ;
+ LOLDEBUG("finished parsing EE: CN=%.64s", ctx->elts[5].buf) ;
+ }
ctx->i++ ;
}
static unsigned int end_chain (br_x509_class const **c)
{
sbearssl_x509_small_context *ctx = INSTANCE(c) ;
- LOLDEBUG("small_context: end_chain") ;
unsigned int r = ctx->minimal.vtable->end_chain(&ctx->minimal.vtable) ;
+ LOLDEBUG("small_context: end_chain, returned %u", r) ;
if (!r)
{
uint8_t mask = 1 ;