diff --git a/lib/rex/socket/parameters.rb b/lib/rex/socket/parameters.rb index 210488ae94..e83783e843 100644 --- a/lib/rex/socket/parameters.rb +++ b/lib/rex/socket/parameters.rb @@ -140,7 +140,8 @@ class Rex::Socket::Parameters self.ssl = false end - if (hash['SSLVersion'] and hash['SSLVersion'].to_s =~ /^(SSL2|SSL3|TLS1)$/i) + supported_ssl_versions = ['SSL2', 'SSL23', 'TLS1', 'SSL3', :SSLv2, :SSLv3, :SSLv23, :TLSv1] + if (hash['SSLVersion'] and supported_ssl_versions.include? hash['SSLVersion']) self.ssl_version = hash['SSLVersion'] end diff --git a/lib/rex/socket/ssl_tcp.rb b/lib/rex/socket/ssl_tcp.rb index b8a994034b..fa18779e36 100644 --- a/lib/rex/socket/ssl_tcp.rb +++ b/lib/rex/socket/ssl_tcp.rb @@ -65,6 +65,13 @@ begin version = :SSLv23 when 'TLS1' version = :TLSv1 + # Handle the user supplying the correct syntax themselves + when :SSLv2 + version = :SSLv2 + when :SSLv23 + version = :SSLv23 + when :TLSv1 + version = :TLSv1 end end