aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2019-03-19 15:59:45 +0200
committerFilipp Lepalaan <filipp@mac.com>2019-03-19 15:59:45 +0200
commitc7d86ab91ce3e5f9cf1c36d7b19707a34e4039e4 (patch)
treed5b6fd4456ce9278991a9330cf509c39d0e23230
parent572fe24467d6d8843f2f5c26e330f16f8c1408e7 (diff)
downloadsendEmail-c7d86ab91ce3e5f9cf1c36d7b19707a34e4039e4.tar.gz
sendEmail-c7d86ab91ce3e5f9cf1c36d7b19707a34e4039e4.tar.bz2
sendEmail-c7d86ab91ce3e5f9cf1c36d7b19707a34e4039e4.zip
SSL patch
-rwxr-xr-xsendEmail9
1 files 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'} = <STDIN>; chomp $opt{'password'};
+ ReadMode 'noecho';
+ $opt{'password'} = ReadLine 0;
+ chomp $opt{'password'};
+ ReadMode 'normal';
+ # $opt{'password'} = <STDIN>; 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);