summaryrefslogtreecommitdiff
path: root/content/fetch.h
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/fetch.h
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/fetch.h')
-rw-r--r--content/fetch.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/content/fetch.h b/content/fetch.h
index 0b4b52a2f..174e07bf6 100644
--- a/content/fetch.h
+++ b/content/fetch.h
@@ -42,6 +42,7 @@ typedef enum {
FETCH_ERROR,
FETCH_REDIRECT,
FETCH_NOTMODIFIED,
+ FETCH_CERTS,
FETCH_AUTH,
FETCH_CERT_ERR,
FETCH_SSL_ERR
@@ -70,7 +71,7 @@ typedef struct fetch_msg {
struct {
const struct ssl_cert_info *certs;
size_t num_certs;
- } cert_err;
+ } certs;
} data;
} fetch_msg;
@@ -95,12 +96,15 @@ struct ssl_cert_info {
char not_before[32]; /**< Valid from date */
char not_after[32]; /**< Valid to date */
int sig_type; /**< Signature type */
- long serial; /**< Serial number */
+ char serialnum[64]; /**< Serial number */
char issuer[256]; /**< Issuer details */
char subject[256]; /**< Subject details */
int cert_type; /**< Certificate type */
};
+/** maximum number of X509 certificates in chain for TLS connection */
+#define MAX_SSL_CERTS 10
+
typedef void (*fetch_callback)(const fetch_msg *msg, void *p);
/**