git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Christoph Egger <christoph@christoph-egger.org>, git@vger.kernel.org
Subject: Re: [PATCH +warn] Implement https public key pinning
Date: Mon, 15 Feb 2016 22:28:19 -0500	[thread overview]
Message-ID: <20160216032818.GB19954@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqqziv1mjf8.fsf@gitster.mtv.corp.google.com>

On Mon, Feb 15, 2016 at 07:19:07PM -0800, Junio C Hamano wrote:

> I suspect that "#else" is too agressive to bail out or something
> silly like that.
> 
> Oh, I think I found it.
> 
> @@ -216,6 +219,13 @@ static int http_options(const char *var, const char *value, void *cb)
>  	if (!strcmp("http.sslcapath", var))
>  		return git_config_pathname(&ssl_capath, var, value);
>  #endif
> +	if (!strcmp("http.pinnedpubkey", var))
> +#if LIBCURL_VERSION_NUM >= 0x072c00
> +		return git_config_pathname(&ssl_pinnedkey, var, value);
> +#else
> +		warning(_("Public key pinning not supported with cURL < 7.44.0"));
> +		return 0;
> +#endif
> 
> We are not writing in Python.  Indenting the second line the same
> way does not make it part of the block.  Of course by inserting the
> new config in the earlier part of the function, it broke everything
> that comes after.

Oof. Good eyes. I suspected something funny with the #if, but after
starting at it for minutes, couldn't see it.

That makes sense, and the fix is obvious.

-Peff

  reply	other threads:[~2016-02-16  3:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-11 22:54 [PATCH] Implement https public key pinning Christoph Egger
2016-02-11 23:30 ` Daniel Stenberg
2016-02-12  1:15   ` Christoph Egger
2016-02-12  1:18     ` [PATCH v2] " Christoph Egger
2016-02-12 10:02     ` [PATCH] " Thomas Gummerer
2016-02-12 18:37       ` Jeff King
2016-02-15 13:58         ` Christoph Egger
2016-02-15 14:04           ` [PATCH +warn] " Christoph Egger
2016-02-15 23:25             ` Junio C Hamano
2016-02-16  1:22               ` Jeff King
2016-02-16  3:19                 ` Junio C Hamano
2016-02-16  3:28                   ` Jeff King [this message]
2016-02-16 11:19                     ` [PATCH +warn2] " Christoph Egger
2016-02-16 21:20                     ` [PATCH +warn] " Junio C Hamano
2016-02-17 21:05             ` Junio C Hamano
2016-02-22 15:41               ` Christoph Egger

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=20160216032818.GB19954@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=christoph@christoph-egger.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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).