git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] http: treat config options sslCAPath and sslCAInfo as paths

From
charles@hashpling.org <charles@hashpling.org>
Date
Nov 23, 2015, 12:02 UTC
Message-ID
<1448280160-113572-1-git-send-email-charles@hashpling.org>
From: Charles Bailey <cbailey32@bloomberg.net>
This enables ~ and ~user expansion for these config options.
Signed-off-by: Charles Bailey <cbailey32@bloomberg.net>
---

In the only place that we (optionally) test https specifically, we also turn off SSL verification so I couldn't see a sensible way to add an automated test.

The change is fairly simple and I've tested manually and the effects are as I expected - I can point to a certificate bundle or directory in my home directory using a ~/ prefix in my .gitconfig.

 http.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/http.c b/http.c
index 42f29ce..5e37252 100644
--- a/http.c
+++ b/http.c
@@ -214,10 +214,10 @@ static int http_options(const char *var, const char *value, void *cb)
 #endif
 #if LIBCURL_VERSION_NUM >= 0x070908
 	if (!strcmp("http.sslcapath", var))
-		return git_config_string(&ssl_capath, var, value);
+		return git_config_pathname(&ssl_capath, var, value);
 #endif
 	if (!strcmp("http.sslcainfo", var))
-		return git_config_string(&ssl_cainfo, var, value);
+		return git_config_pathname(&ssl_cainfo, var, value);
 	if (!strcmp("http.sslcertpasswordprotected", var)) {
 		ssl_cert_password_required = git_config_bool(var, value);
 		return 0;
-- 
2.6.0
Next: Jeff King
Message 1 of 2 in “http: treat config options sslCAPath and sslCAInfo as paths”
  1. http: treat config options sslCAPath and sslCAInfo as pathscharles@hashpling.org, Nov 23, 2015
  2. Jeff KingNov 24, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.