From: charles@hashpling.org
To: git@vger.kernel.org
Subject: [PATCH] http: treat config options sslCAPath and sslCAInfo as paths
Date: Mon, 23 Nov 2015 12:02:40 +0000 [thread overview]
Message-ID: <1448280160-113572-1-git-send-email-charles@hashpling.org> (raw)
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 reply other threads:[~2015-11-23 12:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-23 12:02 charles [this message]
2015-11-24 23:53 ` [PATCH] http: treat config options sslCAPath and sslCAInfo as paths Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1448280160-113572-1-git-send-email-charles@hashpling.org \
--to=charles@hashpling.org \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).