]> git.ipfire.org Git - thirdparty/git.git/blobdiff - http.c
http: correct curl version check for CURLOPT_PINNEDPUBLICKEY
[thirdparty/git.git] / http.c
diff --git a/http.c b/http.c
index b82b5b7a532c475e0a6e6b723b1256020d3a4175..543faad9879afec7db9434f8afeb8ebf1b857b76 100644 (file)
--- a/http.c
+++ b/http.c
@@ -59,7 +59,7 @@ static struct {
 static const char *ssl_key;
 static const char *ssl_capath;
 static const char *curl_no_proxy;
-#if LIBCURL_VERSION_NUM >= 0x072c00
+#if LIBCURL_VERSION_NUM >= 0x072700
 static const char *ssl_pinnedkey;
 #endif
 static const char *ssl_cainfo;
@@ -373,10 +373,10 @@ static int http_options(const char *var, const char *value, void *cb)
        }
 
        if (!strcmp("http.pinnedpubkey", var)) {
-#if LIBCURL_VERSION_NUM >= 0x072c00
+#if LIBCURL_VERSION_NUM >= 0x072700
                return git_config_pathname(&ssl_pinnedkey, var, value);
 #else
-               warning(_("Public key pinning not supported with cURL < 7.44.0"));
+               warning(_("Public key pinning not supported with cURL < 7.39.0"));
                return 0;
 #endif
        }
@@ -845,7 +845,7 @@ static CURL *get_curl_handle(void)
                curl_easy_setopt(result, CURLOPT_SSLKEY, ssl_key);
        if (ssl_capath != NULL)
                curl_easy_setopt(result, CURLOPT_CAPATH, ssl_capath);
-#if LIBCURL_VERSION_NUM >= 0x072c00
+#if LIBCURL_VERSION_NUM >= 0x072700
        if (ssl_pinnedkey != NULL)
                curl_easy_setopt(result, CURLOPT_PINNEDPUBLICKEY, ssl_pinnedkey);
 #endif