Accept propper formats for SSL version
we were only accepting sloppy string values and not accepting input of the actual symbols that OpenSSL expects in the first place. Allow the user to enter it right themselves to be compat with OpenSSLbug/bundler_fix
parent
38d0a244fd
commit
ebb0f166ca
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue