From 1a836c9bc43b60384437bb6e9408b745691b326f Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Fri, 22 May 2020 10:43:58 +0100 Subject: fetchers/curl: Move report_certs function outside WITH_OPENSSL Signed-off-by: Daniel Silverstone --- content/fetchers/curl.c | 43 ++++++++++++++++++++++--------------------- 1 file 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 @@ -685,27 +685,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 * @@ -865,6 +844,28 @@ fetch_curl_sslctxfun(CURL *curl_handle, void *_sslctx, void *parm) #endif /* WITH_OPENSSL */ +/** + * 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. * -- cgit v1.2.3