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

Re: [PATCH v2 1/2] send-email: squelch warning from Net::SMTP::SSL

From
Torsten Bögershausen <tboegi@web.de>
Date
Jul 6, 2013, 14:28 UTC
Message-ID
<51D82970.5070108@web.de>
In-Reply-To
<1373025947-26495-2-git-send-email-artagnon@gmail.com>
On 2013-07-05 14.05, Ramkumar Ramachandra wrote:
Show 40 quoted lines
> Due to a recent change in the Net::SMTP::SSL module, send-email emits
> the following ugly warning everytime a email is sent via SSL:
> 
> *******************************************************************
>  Using the default of SSL_verify_mode of SSL_VERIFY_NONE for client
>  is deprecated! Please set SSL_verify_mode to SSL_VERIFY_PEER
>  together with SSL_ca_file|SSL_ca_path for verification.
>  If you really don't want to verify the certificate and keep the
>  connection open to Man-In-The-Middle attacks please set
>  SSL_verify_mode explicitly to SSL_VERIFY_NONE in your application.
> *******************************************************************
> 
> Fix this by explicitly specifying SSL_verify_mode => SSL_VERIFY_NONE in
> Net::SMTP::SSL->start_SSL().
> 
> Helped-by: brian m. carlson <sandals@crustytoothpaste.net>
> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
> ---
>  git-send-email.perl | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/git-send-email.perl b/git-send-email.perl
> index ecbf56f..758100d 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -1193,10 +1193,12 @@ X-Mailer: git-send-email $gitversion
>  						 Debug => $debug_net_smtp);
>  			if ($smtp_encryption eq 'tls' && $smtp) {
>  				require Net::SMTP::SSL;
> +				use IO::Socket::SSL qw(SSL_VERIFY_NONE);
>  				$smtp->command('STARTTLS');
>  				$smtp->response();
>  				if ($smtp->code == 220) {
> -					$smtp = Net::SMTP::SSL->start_SSL($smtp)
> +					$smtp = Net::SMTP::SSL->start_SSL($smtp,
> +									  SSL_verify_mode => SSL_VERIFY_NONE)
>  						or die "STARTTLS failed! ".$smtp->message;
>  					$smtp_encryption = '';
>  					# Send EHLO again to receive fresh
> 
Hm, this doesn't work on my system, and t9001 fails:
"SSL_VERIFY_PEER" is not exported by the IO::Socket::SSL module
 "SSL_VERIFY_NONE" is not exported by the IO::Socket::SSL module
Can't continue after import errors at /Users/tb/projects/git/git.pu/git-send-email line 1090
/Torsten
Previous: Ramkumar RamachandraNext: brian m. carlson
Message 3 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.