]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ce/https-public-key-pinning'
authorJunio C Hamano <gitster@pobox.com>
Wed, 24 Feb 2016 21:25:58 +0000 (13:25 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 24 Feb 2016 21:25:58 +0000 (13:25 -0800)
You can now set http.[<url>.]pinnedpubkey to specify the pinned
public key when building with recent enough versions of libcURL.

* ce/https-public-key-pinning:
  http: implement public key pinning

1  2 
Documentation/config.txt
http.c

Simple merge
diff --cc http.c
index 279b6f2e9a35d69c6ce36416fd00662e4e3511b0,34750401078be6afe9d464ee2b26f91490458613..1d5e3bbd11ae0e7dc0e682d3914e07cc13a0ce14
--- 1/http.c
--- 2/http.c
+++ b/http.c
@@@ -305,11 -276,14 +308,20 @@@ static int http_options(const char *var
        if (!strcmp("http.useragent", var))
                return git_config_string(&user_agent, var, value);
  
 +      if (!strcmp("http.emptyauth", var)) {
 +              curl_empty_auth = git_config_bool(var, value);
 +              return 0;
 +      }
 +
+       if (!strcmp("http.pinnedpubkey", var)) {
+ #if LIBCURL_VERSION_NUM >= 0x072c00
+               return git_config_pathname(&ssl_pinnedkey, var, value);
+ #else
+               warning(_("Public key pinning not supported with cURL < 7.44.0"));
+               return 0;
+ #endif
+       }
++
        /* Fall back on the default ones */
        return git_default_config(var, value, cb);
  }