# Re: [PATCH] http.c: Avoid username prompt for certifcate credentials

3 messages from 2012-12-21 to 2012-12-21. Participants: Jeff King, Rene Bredlau, Junio C Hamano.
Thread: https://gitlist.dev/t/32433

## Rene Bredlau, 2012-12-21 16:31

Subject: [PATCH] http.c: Avoid username prompt for certifcate credentials
Message-ID: <1356107479-6668-1-git-send-email-git@unrelated.de>
URL: https://gitlist.dev/e/1356107479-6668-1-git-send-email-git%40unrelated.de

```
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 "".

Signed-off-by: Rene Bredlau <git@unrelated.de>
---
 http.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/http.c b/http.c
index 0a8abf3..44f3525 100644
--- a/http.c
+++ b/http.c
@@ -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);
 	}
-- 
1.7.9

```

## Jeff King, 2012-12-21 17:09

Subject: Re: [PATCH] http.c: Avoid username prompt for certifcate credentials
Message-ID: <20121221170927.GA23574@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20121221170927.GA23574%40sigill.intra.peff.net
In-Reply-To: <1356107479-6668-1-git-send-email-git@unrelated.de>

```
On Fri, Dec 21, 2012 at 05:31:19PM +0100, Rene Bredlau wrote:

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

> Signed-off-by: Rene Bredlau <git@unrelated.de>

Acked-by: Jeff King <peff@peff.net>

-Peff

```

## Junio C Hamano, 2012-12-21 18:19

Subject: Re: [PATCH] http.c: Avoid username prompt for certifcate credentials
Message-ID: <7vehij1d4k.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vehij1d4k.fsf%40alter.siamese.dyndns.org
In-Reply-To: <20121221170927.GA23574@sigill.intra.peff.net>

```
Thanks, both.

```
