Skip to content

Commit dc7c02e

Browse files
David MaloneyDavid Maloney
authored andcommitted
still trying to get around this sslv2 thing
1 parent 246977e commit dc7c02e

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

lib/rex/sslscan/scanner.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,12 @@ def validate_params(ssl_version, cipher)
183183
unless @supported_versions.include? ssl_version
184184
raise StandardError, "SSL Version must be one of: #{@supported_versions.to_s}"
185185
end
186-
unless OpenSSL::SSL::SSLContext.new(ssl_version).ciphers.flatten.include? cipher
187-
raise StandardError, "Must be a valid SSL Cipher for #{version}!"
186+
begin
187+
unless OpenSSL::SSL::SSLContext.new(ssl_version).ciphers.flatten.include? cipher
188+
raise StandardError, "Must be a valid SSL Cipher for #{version}!"
189+
end
190+
rescue
191+
raise StandardError, "Your OS hates freedom! Your OpenSSL libs are compiled without SSLv2 support!"
188192
end
189193
end
190194

spec/lib/rex/sslscan/scanner_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555

5656
context ":rejected should be returned if" do
5757
it "scans a server that doesn't support the supplied SSL version" do
58-
subject.test_cipher(:SSLv2, "DES-CBC3-MD5").should == :rejected
58+
subject.test_cipher(:SSLv3, "DES-CBC-SHA").should == :rejected
5959
end
6060

6161
it "scans a server that doesn't support the cipher" do
@@ -72,7 +72,7 @@
7272

7373
context "when retrieving the cert" do
7474
it "should return nil if it can't connect" do
75-
subject.get_cert(:SSLv2, "DES-CBC3-MD5").should == nil
75+
subject.get_cert(:SSLv3, "DES-CBC-SHA").should == nil
7676
end
7777

7878
it "should return an X509 cert if it can connect" do

0 commit comments

Comments
 (0)