rex-socket 0.1.12 → 0.1.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/rex/socket/ssl_tcp.rb +19 -2
- data/lib/rex/socket/version.rb +1 -1
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e03fb63e7486cc7a61cc293d0dbb37393498c616
|
4
|
+
data.tar.gz: 683f42beeb59df6ce2b424a206aa26790108d163
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e374551466dfb1faed2dffb38848a951d306e93206611b3d4cbefc2ecc0cfc5d6d2e69d18871679c6b4734809f66ea46c7d7019a99199b7df047359b01a58b7
|
7
|
+
data.tar.gz: d98c67986b353ccb5078ceb6a572fe2f40616b7c6f614b4d5855fdf09ca2ec89d2d1f7defd51ff9e6b0a3f63f400843048b329121a499f549dbb07dedae9fcf4
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rex/socket/ssl_tcp.rb
CHANGED
@@ -43,6 +43,22 @@ begin
|
|
43
43
|
#
|
44
44
|
##
|
45
45
|
|
46
|
+
def self.system_ssl_methods
|
47
|
+
ssl_context = OpenSSL::SSL::SSLContext
|
48
|
+
if ssl_context.const_defined? :METHODS_MAP
|
49
|
+
ssl_context.const_get(:METHODS_MAP).keys
|
50
|
+
else
|
51
|
+
ssl_context::METHODS
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def self.supported_ssl_methods
|
56
|
+
@@methods ||= ['Auto', 'TLS'] + system_ssl_methods
|
57
|
+
.reject { |method| method.match(/server|client/) }
|
58
|
+
.select {|m| OpenSSL::SSL::SSLContext.new(m) && true rescue false} \
|
59
|
+
.map {|m| m.to_s.sub(/v/, '').sub('_', '.')}
|
60
|
+
end
|
61
|
+
|
46
62
|
#
|
47
63
|
# Initializes the SSL socket.
|
48
64
|
#
|
@@ -72,8 +88,9 @@ begin
|
|
72
88
|
end
|
73
89
|
|
74
90
|
# Raise an error if no selected versions are supported
|
75
|
-
|
76
|
-
raise ArgumentError,
|
91
|
+
unless Rex::Socket::SslTcp.system_ssl_methods.include? version
|
92
|
+
raise ArgumentError,
|
93
|
+
"This version of Ruby does not support the requested SSL/TLS version #{params.ssl_version}"
|
77
94
|
end
|
78
95
|
|
79
96
|
# Try intializing the socket with this SSL/TLS version
|
data/lib/rex/socket/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rex-socket
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Maloney
|
@@ -88,7 +88,7 @@ cert_chain:
|
|
88
88
|
G+Hmcg1v810agasPdoydE0RTVZgEOOMoQ07qu7JFXVWZ9ZQpHT7qJATWL/b2csFG
|
89
89
|
8mVuTXnyJOKRJA==
|
90
90
|
-----END CERTIFICATE-----
|
91
|
-
date: 2018-03-
|
91
|
+
date: 2018-03-26 00:00:00.000000000 Z
|
92
92
|
dependencies:
|
93
93
|
- !ruby/object:Gem::Dependency
|
94
94
|
name: bundler
|
metadata.gz.sig
CHANGED
Binary file
|