Skip to content

Commit 8d15496

Browse files
committed
http.c: http.sslcert and http.sslkey are both pathnames
Back when the modern http_options() codepath was created to parse various http.* options at 29508e1 ("Isolate shared HTTP request functionality", 2005-11-18), and then later was corrected for interation between the multiple configuration files in 7059cd9 ("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>
1 parent 95d6787 commit 8d15496

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

http.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,10 +271,10 @@ static int http_options(const char *var, const char *value, void *cb)
271271
if (!strcmp("http.sslversion", var))
272272
return git_config_string(&ssl_version, var, value);
273273
if (!strcmp("http.sslcert", var))
274-
return git_config_string(&ssl_cert, var, value);
274+
return git_config_pathname(&ssl_cert, var, value);
275275
#if LIBCURL_VERSION_NUM >= 0x070903
276276
if (!strcmp("http.sslkey", var))
277-
return git_config_string(&ssl_key, var, value);
277+
return git_config_pathname(&ssl_key, var, value);
278278
#endif
279279
#if LIBCURL_VERSION_NUM >= 0x070908
280280
if (!strcmp("http.sslcapath", var))

0 commit comments

Comments
 (0)