git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: "brian m. carlson" <sandals@crustytoothpaste.net>
Cc: John Szakmeister <john@szakmeister.net>, git@vger.kernel.org
Subject: Re: [PATCH v2 1/2] http: store credential when PKI auth is used
Date: Thu, 11 Mar 2021 20:45:21 -0500	[thread overview]
Message-ID: <YErHsQwIC2grgjwI@coredump.intra.peff.net> (raw)
In-Reply-To: <YErGymyECXjPXWcP@camp.crustytoothpaste.net>

On Fri, Mar 12, 2021 at 01:41:30AM +0000, brian m. carlson wrote:

> > diff --git a/http.c b/http.c
> > index f8ea28bb2e..12a8aaba48 100644
> > --- a/http.c
> > +++ b/http.c
> > @@ -1637,7 +1637,17 @@ static int handle_curl_result(struct slot_results *results)
> >  		credential_approve(&http_auth);
> >  		if (proxy_auth.password)
> >  			credential_approve(&proxy_auth);
> > +		credential_approve(&cert_auth);
> >  		return HTTP_OK;
> > +	} else if (results->curl_result == CURLE_SSL_CERTPROBLEM) {
> > +		/*
> > +		 * We can't tell from here whether it's a bad path, bad
> > +		 * certificate, bad password, or something else wrong
> > +		 * with the certificate.  So we reject the credential to
> > +		 * avoid caching or saving a bad password.
> > +		 */
> > +		credential_reject(&http_auth);
> 
> Is this supposed to be &cert_auth here?  I'm not sure how a bad HTTP
> password would even have been tested in this case.

Good catch! When reviewing, I was so busy thinking about _where_ this
line should go that I didn't even notice what it said. :)

-Peff

  reply	other threads:[~2021-03-12  1:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-12  0:48 [PATCH v2 0/2] http: store credential when PKI auth is used John Szakmeister
2021-03-12  0:48 ` [PATCH v2 1/2] " John Szakmeister
2021-03-12  0:58   ` Junio C Hamano
2021-03-12  1:41   ` brian m. carlson
2021-03-12  1:45     ` Jeff King [this message]
2021-03-12  2:27       ` John Szakmeister
2021-03-12  0:48 ` [PATCH v2 2/2] http: drop the check for an empty proxy password before approving John Szakmeister
2021-03-12  1:31 ` [PATCH v2 0/2] http: store credential when PKI auth is used Jeff King
2021-03-12  2:37   ` John Szakmeister

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=YErHsQwIC2grgjwI@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=john@szakmeister.net \
    --cc=sandals@crustytoothpaste.net \
    /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).