From: Junio C Hamano Date: Wed, 24 Feb 2016 21:25:58 +0000 (-0800) Subject: Merge branch 'ce/https-public-key-pinning' X-Git-Tag: v2.8.0-rc0~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e79112d21024beb997951381db21a70b087d459d;p=thirdparty%2Fgit.git Merge branch 'ce/https-public-key-pinning' You can now set http.[.]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 --- e79112d21024beb997951381db21a70b087d459d diff --cc http.c index 279b6f2e9a,3475040107..1d5e3bbd11 --- a/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); }