Re: [PATCH v2 2/2] send-email: introduce sendemail.smtpsslcertpath

2013-07-07 Thread Junio C Hamano
Jeff King writes: > On Fri, Jul 05, 2013 at 08:29:48PM +, brian m. carlson wrote: > >> 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

Re: [PATCH v2 2/2] send-email: introduce sendemail.smtpsslcertpath

2013-07-07 Thread John Keeping
On Sat, Jul 06, 2013 at 09:12:31PM -0700, Junio C Hamano wrote: > John Keeping writes: > > > @@ -1096,19 +1101,18 @@ sub smtp_auth_maybe { > > # Helper to come up with SSL/TLS certification validation params > > # and warn when doing no verification > > sub ssl_verify_params { > > - use IO::

Re: [PATCH v2 2/2] send-email: introduce sendemail.smtpsslcertpath

2013-07-06 Thread Jeff King
On Fri, Jul 05, 2013 at 08:29:48PM +, brian m. carlson wrote: > 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::

Re: [PATCH v2 2/2] send-email: introduce sendemail.smtpsslcertpath

2013-07-06 Thread Junio C Hamano
John Keeping writes: > @@ -1096,19 +1101,18 @@ sub smtp_auth_maybe { > # 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); > - > - if (!defined $s

Re: [PATCH v2 2/2] send-email: introduce sendemail.smtpsslcertpath

2013-07-06 Thread John Keeping
On Fri, Jul 05, 2013 at 11:25:36PM -0700, Junio C Hamano wrote: > John Keeping writes: > > > I'd rather have '$smtp_ssl_cert_path ne ""' in the first if condition > > (instead of the '-d $smtp_ssl_cert_path') ... > > I agree. The signal for "no certs" should be an explicit "nonsense" > value li

Re: [PATCH v2 2/2] send-email: introduce sendemail.smtpsslcertpath

2013-07-05 Thread Junio C Hamano
John Keeping writes: > I'd rather have '$smtp_ssl_cert_path ne ""' in the first if condition > (instead of the '-d $smtp_ssl_cert_path') ... I agree. The signal for "no certs" should be an explicit "nonsense" value like an empty string, not just a string that does not name an expected filesyste

Re: [PATCH v2 2/2] send-email: introduce sendemail.smtpsslcertpath

2013-07-05 Thread brian m. carlson
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

Re: [PATCH v2 2/2] send-email: introduce sendemail.smtpsslcertpath

2013-07-05 Thread John Keeping
On Fri, Jul 05, 2013 at 11:30:11AM -0700, Junio C Hamano wrote: > John Keeping writes: > > > On Fri, Jul 05, 2013 at 10:20:11AM -0700, Junio C Hamano wrote: > >> "brian m. carlson" writes: > >> > >> > You've covered the STARTTLS case, but not the SSL one right above it. > >> > Someone using smt

Re: [PATCH v2 2/2] send-email: introduce sendemail.smtpsslcertpath

2013-07-05 Thread Junio C Hamano
John Keeping writes: > On Fri, Jul 05, 2013 at 10:20:11AM -0700, Junio C Hamano wrote: >> "brian m. carlson" writes: >> >> > You've covered the STARTTLS case, but not the SSL one right above it. >> > Someone using smtps on port 465 will still see the warning. You can >> > pass SSL_verify_mode

Re: [PATCH v2 2/2] send-email: introduce sendemail.smtpsslcertpath

2013-07-05 Thread John Keeping
On Fri, Jul 05, 2013 at 10:20:11AM -0700, Junio C Hamano wrote: > "brian m. carlson" writes: > > > You've covered the STARTTLS case, but not the SSL one right above it. > > Someone using smtps on port 465 will still see the warning. You can > > pass SSL_verify_mode to Net::SMTP::SSL->new just li

Re: [PATCH v2 2/2] send-email: introduce sendemail.smtpsslcertpath

2013-07-05 Thread Junio C Hamano
"brian m. carlson" writes: > You've covered the STARTTLS case, but not the SSL one right above it. > Someone using smtps on port 465 will still see the warning. You can > pass SSL_verify_mode to Net::SMTP::SSL->new just like you pass it to > start_SSL. OK, will a fix-up look like this on top of

Re: [PATCH v2 2/2] send-email: introduce sendemail.smtpsslcertpath

2013-07-05 Thread brian m. carlson
On Fri, Jul 05, 2013 at 06:23:58PM +0530, Ramkumar Ramachandra wrote: > Thanks. On a related note, how do I find out about all these things? I tried > > $ perldoc Net::SMTP::SSL > > but it was completely useless. The only reason I got this far is > because you literally told me what to do.

Re: [PATCH v2 2/2] send-email: introduce sendemail.smtpsslcertpath

2013-07-05 Thread Ramkumar Ramachandra
brian m. carlson wrote: > You've covered the STARTTLS case, but not the SSL one right above it. > Someone using smtps on port 465 will still see the warning. You can > pass SSL_verify_mode to Net::SMTP::SSL->new just like you pass it to > start_SSL. Thanks. On a related note, how do I find out a

Re: [PATCH v2 2/2] send-email: introduce sendemail.smtpsslcertpath

2013-07-05 Thread brian m. carlson
On Fri, Jul 05, 2013 at 05:35:47PM +0530, Ramkumar Ramachandra wrote: > @@ -1193,13 +1197,23 @@ X-Mailer: git-send-email $gitversion >Debug => $debug_net_smtp); > if ($smtp_encryption eq 'tls' && $smtp) { >

Re: [PATCH v2 2/2] send-email: introduce sendemail.smtpsslcertpath

2013-07-05 Thread Ramkumar Ramachandra
Eric Sunshine wrote: >> + $smtp_ssl_cert_path |= >> "/etc/ssl/certs"; > > You're going to want to use logical ||= here. Bitwise |= on a string > does not do what you expect[1]: > > my $s = '/usr/local/etc/ssl/certs'; > $s |= '/etc/ssl/certs'; > print $s,

Re: [PATCH v2 2/2] send-email: introduce sendemail.smtpsslcertpath

2013-07-05 Thread Eric Sunshine
On Fri, Jul 5, 2013 at 8:05 AM, Ramkumar Ramachandra wrote: > Use the ca-certificates in /etc/ssl/certs by default (that's where most > distributions put it). SSL_VERIFY_NONE is now the fallback mode. > > Signed-off-by: Ramkumar Ramachandra > --- > diff --git a/git-send-email.perl b/git-send-ema

[PATCH v2 2/2] send-email: introduce sendemail.smtpsslcertpath

2013-07-05 Thread Ramkumar Ramachandra
Use the ca-certificates in /etc/ssl/certs by default (that's where most distributions put it). SSL_VERIFY_NONE is now the fallback mode. Signed-off-by: Ramkumar Ramachandra --- Documentation/config.txt | 3 +++ Documentation/git-send-email.txt | 4 git-send-email.perl