From bfb1bb119241d85bb9b400881328496e12a39aed Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Mon, 5 Aug 2019 18:11:13 +0100 Subject: Migrate SSL certificate storage to the browser window * Fetchers now provide the certificates before headers * This is propagated all the way to the browser window * When a query occurs, we retrieve it from there and fire the query with those stored certificates. * The serial number is a bignum, store it as hex. Signed-off-by: Daniel Silverstone --- content/hlcache.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'content/hlcache.c') diff --git a/content/hlcache.c b/content/hlcache.c index ca0e47907..d2b612d05 100644 --- a/content/hlcache.c +++ b/content/hlcache.c @@ -433,6 +433,18 @@ static nserror hlcache_llcache_callback(llcache_handle *handle, assert(ctx->llcache == handle); switch (event->type) { + case LLCACHE_EVENT_GOT_CERTS: + /* Pass them on upward */ + if (ctx->handle->cb != NULL) { + hlcache_event hlevent; + + hlevent.type = CONTENT_MSG_SSL_CERTS; + hlevent.data.certs.certs = event->data.certs.certs; + hlevent.data.certs.num = event->data.certs.num; + + ctx->handle->cb(ctx->handle, &hlevent, ctx->handle->pw); + } + break; case LLCACHE_EVENT_HAD_HEADERS: error = mimesniff_compute_effective_type(llcache_handle_get_header(handle, "Content-Type"), NULL, 0, ctx->flags & HLCACHE_RETRIEVE_SNIFF_TYPE, -- cgit v1.2.3