Re: [PATCH v2 2/2] send-email: introduce sendemail.smtpsslcertpath
- From
Jeff King <peff@peff.net>
- Date
- Jul 7, 2013, 05:54 UTC
- Message-ID
- <20130707055438.GA1730@sigill.intra.peff.net>
- In-Reply-To
- <20130705202948.GW862789@vauxhall.crustytoothpaste.net>
On Fri, Jul 05, 2013 at 08:29:48PM +0000, brian m. carlson wrote:
Show 14 quoted lines
> On Fri, Jul 05, 2013 at 10:20:11AM -0700, Junio C Hamano wrote:
> > +# Helper to come up with SSL/TLS certification validation params
> > +# and warn when doing no verification
> > +sub ssl_verify_params {
> > + use IO::Socket::SSL qw(SSL_VERIFY_PEER SSL_VERIFY_NONE);
>
> You might as well put this at the top of the file, because all use
> statements happen at compile time anyway, regardless of their location.
> If you want to lazy-load this, you need to do:
>
> require IO::Socket::SSL;
> IO::Socket::SSL->import(qw(SSL_VERIFY_PEER SSL_VERIFY_NONE));
>
> which is equivalent to "use" except that it happens at runtime.I think we _must_ lazy load this, or else we are breaking git-send-email users on platforms that do not have IO::Socket::SSL (and do not plan on using SSL themselves).
The same goes for the "use" in patch 1/2.
-Peff