From: Jeff King <peff@peff.net>
To: John Keeping <john@keeping.me.uk>
Cc: git@vger.kernel.org
Subject: Re: [RFC/PATCH] send-email: die if CA path doesn't exist
Date: Tue, 24 Nov 2015 14:58:43 -0500 [thread overview]
Message-ID: <20151124195842.GA7174@sigill.intra.peff.net> (raw)
In-Reply-To: <20151120194651.GC21488@serenity.lan>
On Fri, Nov 20, 2015 at 07:46:51PM +0000, John Keeping wrote:
> > For people who know their systems are broken and want to proceed anyway,
> > what is the appropriate work-around? Obviously it involves disabling
> > peer verification, but would we want to include instructions for doing
> > so (either in the error message, or perhaps mentioning it in the commit
> > message)?
>
> The documentation already says:
>
> Set it to an empty string to disable certificate verification.
>
> It's a bit lost in the middle of a paragraph but I think that is the
> best place for the detail of how to disable verification.
>
> Having revisted the patch, I do think the message might be a bit terse,
> but I can't think of a reasonably concise way to point at the
> --smtp-ssl-cert-path argument as being the culprit.
Hrm. I was thinking that somebody might not have any clue that
--smtp-ssl-cert-path exists, and with this patch their setup would
suddenly go from working (well, insecure but passing mail) to broken.
They need to know where to look to find that documentation.
But it looks like this code path only triggers if you have set
smtp-ssl-cert-path to something bogus. So anybody who does so at least
knows about the option.
Which makes me wonder what happens when the cert path isn't defined by
Git. The code says:
if (!defined $smtp_ssl_cert_path) {
# use the OpenSSL defaults
return (SSL_verify_mode => SSL_VERIFY_PEER());
}
What does OpenSSL do when there is no cert? Hopefully it reports a
verification failure (and in that sense your patch is making our code
consistent with that, which is a good thing).
> Maybe we shouldn't worry too much about that, but should instead put the
> invalid path into the error message:
>
> die "CA path \"$smtp_ssl_cert_path\" does not exist.";
Given what I wrote above, yeah, I'd agree that is sufficient (and I do
think mentioning the path is helpful).
-Peff
next prev parent reply other threads:[~2015-11-24 19:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-17 22:12 [RFC/PATCH] send-email: die if CA path doesn't exist John Keeping
2015-11-20 11:18 ` Jeff King
2015-11-20 19:46 ` John Keeping
2015-11-24 19:58 ` Jeff King [this message]
2015-11-24 22:17 ` John Keeping
2015-11-24 22:28 ` Jeff King
2015-11-24 23:10 ` John Keeping
2015-11-24 23:31 ` [PATCH v2] " John Keeping
2015-11-24 23:35 ` Jeff King
2015-11-25 10:19 ` John Keeping
2015-11-25 10:23 ` Jeff King
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=20151124195842.GA7174@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=john@keeping.me.uk \
/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).