summaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-07-20 13:30:52 -0700
committerJunio C Hamano <gitster@pobox.com>2017-07-20 13:37:24 -0700
commit8d1549643e814d2f8f0de2991d69c1331c8181d7 (patch)
tree636c90fe948bb94b9eedcb4211170303c1edc52a /http.c
parent95d67879735cfecfdd85f89e59d993c5b4de8835 (diff)
downloadgit-8d1549643e814d2f8f0de2991d69c1331c8181d7.tar.gz
http.c: http.sslcert and http.sslkey are both pathnamesjc/http-sslkey-and-ssl-cert-are-paths
Back when the modern http_options() codepath was created to parse various http.* options at 29508e1e ("Isolate shared HTTP request functionality", 2005-11-18), and then later was corrected for interation between the multiple configuration files in 7059cd99 ("http_init(): Fix config file parsing", 2009-03-09), we parsed configuration variables like http.sslkey, http.sslcert as plain vanilla strings, because git_config_pathname() that understands "~[username]/" prefix did not exist. Later, we converted some of them (namely, http.sslCAPath and http.sslCAInfo) to use the function, and added variables like http.cookeyFile http.pinnedpubkey to use the function from the beginning. Because of that, these variables all understand "~[username]/" prefix. Make the remaining two variables, http.sslcert and http.sslkey, also aware of the convention, as they are both clearly pathnames to files. Noticed-by: Victor Toni <victor.toni@gmail.com> Helped-by: Charles Bailey <cbailey32@bloomberg.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http.c')
-rw-r--r--http.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/http.c b/http.c
index 96d84bbed3..0d27d531b6 100644
--- a/http.c
+++ b/http.c
@@ -271,10 +271,10 @@ static int http_options(const char *var, const char *value, void *cb)
if (!strcmp("http.sslversion", var))
return git_config_string(&ssl_version, var, value);
if (!strcmp("http.sslcert", var))
- return git_config_string(&ssl_cert, var, value);
+ return git_config_pathname(&ssl_cert, var, value);
#if LIBCURL_VERSION_NUM >= 0x070903
if (!strcmp("http.sslkey", var))
- return git_config_string(&ssl_key, var, value);
+ return git_config_pathname(&ssl_key, var, value);
#endif
#if LIBCURL_VERSION_NUM >= 0x070908
if (!strcmp("http.sslcapath", var))