git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
John Keeping <john@keeping.me.uk>
Date
Jul 5, 2013, 17:47 UTC
Message-ID
<20130705174730.GM9161@serenity.lan>
In-Reply-To
<7vobag7wl0.fsf@alter.siamese.dyndns.org>
On Fri, Jul 05, 2013 at 10:20:11AM -0700, Junio C Hamano wrote:
Show 8 quoted lines
> "brian m. carlson" <sandals@crustytoothpaste.net> 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 1/2 and 2/2?

According to IO::Socket::SSL [1], if neither SSL_ca_file nor SSL_ca_path is specified then builtin defaults will be used, so I wonder if we should pass SSL_VERIFY_PEER regardless (possibly with a switch for SSL_VERIFY_NONE if people really need that).

[1] http://search.cpan.org/~sullr/IO-Socket-SSL-1.951/lib/IO/Socket/SSL.pm
Show 30 quoted lines
>  git-send-email.perl | 39 +++++++++++++++++++++++----------------
>  1 file changed, 23 insertions(+), 16 deletions(-)
> 
> diff --git a/git-send-email.perl b/git-send-email.perl
> index 52028ba..3b80340 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -1093,6 +1093,25 @@ sub smtp_auth_maybe {
>  	return $auth;
>  }
>  
> +# 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 $smtp_ssl_cert_path) {
> +		$smtp_ssl_cert_path = "/etc/ssl/certs";
> +	}
> +
> +	if (-d $smtp_ssl_cert_path) {
> +		return (SSL_verify_mode => SSL_VERIFY_PEER,
> +			SSL_ca_path => $smtp_ssl_cert_path);
> +	} else {
> +		print STDERR "warning: Using SSL_VERIFY_NONE.  " .
> +		    "See sendemail.smtpsslcertpath.\n";
> +		return (SSL_verify_mode => SSL_VERIFY_NONE);
> +	}
> +}
> +
Previous: Junio C HamanoNext: Junio C Hamano
Message 23 of 32 in “Squelch warning from send-email”
  1. 0/2 Squelch warning from send-emailRamkumar Ramachandra, Jul 5, 2013
  2. 1/2 send-email: squelch warning from Net::SMTP::SSLRamkumar Ramachandra, Jul 5, 2013
  3. Torsten BögershausenJul 6, 2013
  4. brian m. carlsonJul 6, 2013
  5. Torsten BögershausenJul 6, 2013
  6. Ramkumar RamachandraJul 14, 2013
  7. brian m. carlsonJul 14, 2013
  8. Ramkumar RamachandraJul 14, 2013
  9. Torsten BögershausenJul 15, 2013
  10. Junio C HamanoJul 15, 2013
  11. send-email: improve SSL certificate verificationbrian m. carlson, Jul 16, 2013
  12. Torsten BögershausenJul 16, 2013
  13. brian m. carlsonJul 16, 2013
  14. Re* [PATCH] send-email: improve SSL certificate verificationJunio C Hamano, Jul 18, 2013
  15. Ramkumar RamachandraJul 18, 2013
  16. 2/2 send-email: introduce sendemail.smtpsslcertpathRamkumar Ramachandra, Jul 5, 2013
  17. Eric SunshineJul 5, 2013
  18. Ramkumar RamachandraJul 5, 2013
  19. brian m. carlsonJul 5, 2013
  20. Ramkumar RamachandraJul 5, 2013
  21. brian m. carlsonJul 5, 2013
  22. Junio C HamanoJul 5, 2013
  23. John KeepingJul 5, 2013
  24. Junio C HamanoJul 5, 2013
  25. John KeepingJul 5, 2013
  26. Junio C HamanoJul 6, 2013
  27. John KeepingJul 6, 2013
  28. Junio C HamanoJul 7, 2013
  29. John KeepingJul 7, 2013
  30. brian m. carlsonJul 5, 2013
  31. Jeff KingJul 7, 2013
  32. Junio C HamanoJul 7, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.