sslshake 1.0.12 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/Gemfile +12 -0
- data/README.md +7 -0
- data/lib/sslshake/sslv2.rb +2 -1
- data/lib/sslshake/tls.rb +4 -1
- data/lib/sslshake/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1be749edc70a8e63fcfa91c7ca8d4bdff8a31bb8
|
4
|
+
data.tar.gz: dd0fcb2ee6a7c03c1922f37b2612e2012945a0a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89b67cee12439d7375bb22f154ae90a34f601370896bdc84ca045f92ecfa0ef12a41296ccf918f1ccc22fa1d8cf0ea2895a48cecacc509520314b07626352e71
|
7
|
+
data.tar.gz: d5c24d0bea8b6d5845370c6dd3f9270ccf680b42153b932143c08962743d1dbe7e9a9302c5367db9d615c6d8fe4c8d13d709bbba80b1bd7d49fd7caaf820811e
|
data/.gitignore
CHANGED
data/Gemfile
ADDED
data/README.md
CHANGED
@@ -13,6 +13,13 @@ require 'sslshake'
|
|
13
13
|
SSLShake.hello('my.host', port: 4443, protocol: 'tls1.2')
|
14
14
|
```
|
15
15
|
|
16
|
+
## Test (requires Docker)
|
17
|
+
|
18
|
+
```bash
|
19
|
+
bundle install
|
20
|
+
bundle exec test/accuracy/test.rb
|
21
|
+
```
|
22
|
+
|
16
23
|
## License
|
17
24
|
|
18
25
|
MPLv2, see [https://www.mozilla.org/en-US/MPL/2.0/](https://www.mozilla.org/en-US/MPL/2.0/)
|
data/lib/sslshake/sslv2.rb
CHANGED
@@ -53,7 +53,8 @@ module SSLShake
|
|
53
53
|
end
|
54
54
|
|
55
55
|
len = head & 0x7fff
|
56
|
-
res['raw'] = response = socket
|
56
|
+
res['raw'] = response = socket_read(socket, len, opts[:timeout], opts[:retries])
|
57
|
+
.unpack('H*')[0].upcase
|
57
58
|
raw = response.scan(/../)
|
58
59
|
|
59
60
|
res['message_type'] = MESSAGE_TYPES.key(raw.shift)
|
data/lib/sslshake/tls.rb
CHANGED
@@ -67,8 +67,10 @@ module SSLShake
|
|
67
67
|
ciphers = cipher_string(SSL3_CIPHERS, cipher_search)
|
68
68
|
when 'tls1.0', 'tls1.1'
|
69
69
|
ciphers = cipher_string(TLS10_CIPHERS, cipher_search)
|
70
|
+
extensions ||= '000f000101' # add Heartbeat
|
70
71
|
when 'tls1.2'
|
71
72
|
ciphers = cipher_string(TLS_CIPHERS, cipher_search)
|
73
|
+
extensions ||= '000f000101' # add Heartbeat
|
72
74
|
else
|
73
75
|
fail UserError, "This version is not supported: #{version.inspect}"
|
74
76
|
end
|
@@ -90,7 +92,8 @@ module SSLShake
|
|
90
92
|
res['version'] = VERSIONS.key(raw.shift(2).join(''))
|
91
93
|
len = raw.shift(2).join.to_i(16)
|
92
94
|
|
93
|
-
res['raw'] = response = socket
|
95
|
+
res['raw'] = response = socket_read(socket, len, opts[:timeout], opts[:retries])
|
96
|
+
.unpack('H*')[0].upcase
|
94
97
|
raw = response.scan(/../)
|
95
98
|
|
96
99
|
res['handshake_type'] = HANDSHAKE_TYPES.key(raw.shift)
|
data/lib/sslshake/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sslshake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dominik Richter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: This is a library to simulate SSL and TLS handshake from SSLv2, SSLv3,
|
14
14
|
to TLS 1.0-1.2. It does not rely on OpenSSL and is not designed as a replacement
|
@@ -23,6 +23,7 @@ extensions: []
|
|
23
23
|
extra_rdoc_files: []
|
24
24
|
files:
|
25
25
|
- ".gitignore"
|
26
|
+
- Gemfile
|
26
27
|
- README.md
|
27
28
|
- lib/sslshake.rb
|
28
29
|
- lib/sslshake/ciphers.rb
|