From c7d86ab91ce3e5f9cf1c36d7b19707a34e4039e4 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Tue, 19 Mar 2019 15:59:45 +0200 Subject: SSL patch --- sendEmail | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sendEmail b/sendEmail index 9078fc2..277c396 100755 --- a/sendEmail +++ b/sendEmail @@ -37,6 +37,7 @@ ############################################################################## use strict; use IO::Socket; +use Term::ReadKey; ######################## @@ -456,7 +457,11 @@ sub processCommandLine { $SIG{'ALRM'} = sub { quit("ERROR => Timeout waiting for password input", 1); }; alarm(60) if ($^O !~ /mswin/i); ## alarm() doesn't work in win32 print "Password: "; - $opt{'password'} = ; chomp $opt{'password'}; + ReadMode 'noecho'; + $opt{'password'} = ReadLine 0; + chomp $opt{'password'}; + ReadMode 'normal'; + # $opt{'password'} = ; chomp $opt{'password'}; if (!$opt{'password'}) { quit("ERROR => A username for SMTP authentication was specified, but no password!", 1); } @@ -1903,7 +1908,7 @@ else { if ($conf{'tls_server'} == 1 and $conf{'tls_client'} == 1 and $opt{'tls'} =~ /^(yes|auto)$/) { printmsg("DEBUG => Starting TLS", 2); if (SMTPchat('STARTTLS')) { quit($conf{'error'}, 1); } - if (! IO::Socket::SSL->start_SSL($SERVER, SSL_version => 'SSLv3 TLSv1')) { + if (! IO::Socket::SSL->start_SSL($SERVER, SSL_version => 'SSLv23:!SSLv2')) { quit("ERROR => TLS setup failed: " . IO::Socket::SSL::errstr(), 1); } printmsg("DEBUG => TLS: Using cipher: ". $SERVER->get_cipher(), 3); -- cgit v1.2.3