git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] http: store credential when PKI auth is used
@ 2021-03-06 22:52 John Szakmeister
  2021-03-10 20:01 ` Jeff King
  0 siblings, 1 reply; 4+ messages in thread
From: John Szakmeister @ 2021-03-06 22:52 UTC (permalink / raw)
  To: git; +Cc: John Szakmeister

We already looked for the PKI credentials in the credential store, but
failed to approve it on success.  Meaning, the PKI certificate password
was never stored and git would request it on every connection to the
remote.  Let's complete the chain by storing the certificate password on
success.

Signed-off-by: John Szakmeister <john@szakmeister.net>
---

I'm not sure if certificate passwords were not stored for some reason, but
searching the archives I didn't see a mention of it.  Hopefully this is
acceptable.  I did try this in an environment where we have client SSL certs and
this made the user experience much better.

 http.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/http.c b/http.c
index f8ea28bb2e..440890695f 100644
--- a/http.c
+++ b/http.c
@@ -1637,6 +1637,8 @@ static int handle_curl_result(struct slot_results *results)
 		credential_approve(&http_auth);
 		if (proxy_auth.password)
 			credential_approve(&proxy_auth);
+		if (cert_auth.password)
+			credential_approve(&cert_auth);
 		return HTTP_OK;
 	} else if (missing_target(results))
 		return HTTP_MISSING_TARGET;
-- 
2.30.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-03-12  1:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-06 22:52 [PATCH] http: store credential when PKI auth is used John Szakmeister
2021-03-10 20:01 ` Jeff King
2021-03-12  1:01   ` John Szakmeister
2021-03-12  1:24     ` Jeff King

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).