Skip to contentSkip to conversation

http.c: Avoid username prompt for certifcate credentials

PATCH In review Rene Bredlau 3 participants 3 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 http.c: Avoid username prompt for certifcate credentials

If sslCertPasswordProtected is set to true do not ask for username to decrypt rsa key. This question is pointless, the key is only protected by a password. Internaly the username is simply set to "".

---
 http.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
http.c +1 -0
index 0a8abf3..44f3525 100644
@@ -236,6 +236,7 @@ static int has_cert_password(void)
 		return 0;
 	if (!cert_auth.password) {
 		cert_auth.protocol = xstrdup("cert");
+		cert_auth.username = xstrdup("");
 		cert_auth.path = xstrdup(ssl_cert);
 		credential_fill(&cert_auth);
 	}
Signature · 1 line
1.7.9
Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Rene Bredlau

If sslCertPasswordProtected is set to true do not ask for username to decrypt rsa key. This question is pointless, the key is only protected by a password. Internaly the username is simply set to "".

Yeah, that makes sense. I suspect the cert-unlocking code paths for credential helpers are not that well used (and I do not think we have any test coverage for them at all), so I am not too surprised that this went unreported for a long time.

Thanks.

Quoted 1 line

-Peff