summaryrefslogtreecommitdiff
path: root/content/hlcache.c
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2019-08-05 18:11:13 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2019-08-05 18:12:47 +0100
commitbfb1bb119241d85bb9b400881328496e12a39aed (patch)
tree4f05e7c9e1d61cb5229895da7d4f318f94ef90f1 /content/hlcache.c
parentbccf101714f2ca165b1fd754879f3813993d26ca (diff)
downloadnetsurf-bfb1bb119241d85bb9b400881328496e12a39aed.tar.gz
netsurf-bfb1bb119241d85bb9b400881328496e12a39aed.tar.bz2
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 <dsilvers@digital-scurf.org>
Diffstat (limited to 'content/hlcache.c')
-rw-r--r--content/hlcache.c12
1 files changed, 12 insertions, 0 deletions
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,