diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2020-05-22 10:43:58 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2020-05-22 10:45:19 +0100 |
commit | 1a836c9bc43b60384437bb6e9408b745691b326f (patch) | |
tree | 352762eeadfe0b1413c318f13e08fb3ba0eda4a9 | |
parent | fcbc710ce5b3af8f9c19ad960f41efddda352cec (diff) | |
download | netsurf-1a836c9bc43b60384437bb6e9408b745691b326f.tar.gz netsurf-1a836c9bc43b60384437bb6e9408b745691b326f.tar.bz2 |
fetchers/curl: Move report_certs function outside WITH_OPENSSL
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
-rw-r--r-- | content/fetchers/curl.c | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/content/fetchers/curl.c b/content/fetchers/curl.c index f7b3b04f2..f9cafae69 100644 --- a/content/fetchers/curl.c +++ b/content/fetchers/curl.c @@ -686,27 +686,6 @@ fetch_curl_store_certs_in_cache(struct curl_fetch_info *f) } /** - * Report the certificate information in the fetch to the users - */ -static void -fetch_curl_report_certs_upstream(struct curl_fetch_info *f) -{ - fetch_msg msg; - struct cert_chain *chain; - - chain = hashmap_lookup(curl_fetch_ssl_hashmap, f->url); - - if (chain != NULL) { - msg.type = FETCH_CERTS; - msg.data.chain = chain; - - fetch_send_callback(&msg, f->fetch_handle); - } - - f->sent_ssl_chain = true; -} - -/** * OpenSSL Certificate verification callback * * Called for each certificate in a chain being verified. OpenSSL @@ -866,6 +845,28 @@ fetch_curl_sslctxfun(CURL *curl_handle, void *_sslctx, void *parm) /** + * Report the certificate information in the fetch to the users + */ +static void +fetch_curl_report_certs_upstream(struct curl_fetch_info *f) +{ + fetch_msg msg; + struct cert_chain *chain; + + chain = hashmap_lookup(curl_fetch_ssl_hashmap, f->url); + + if (chain != NULL) { + msg.type = FETCH_CERTS; + msg.data.chain = chain; + + fetch_send_callback(&msg, f->fetch_handle); + } + + f->sent_ssl_chain = true; +} + + +/** * Set options specific for a fetch. * * \param f The fetch to set options on. |