sslshake 1.0.12 → 1.0.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 73fea6614c1a8dac99abcc7e97607e4e33a2f4e1
4
- data.tar.gz: 8ffbb4598f29d65b3b03c574641404f76f9ed85c
3
+ metadata.gz: 1be749edc70a8e63fcfa91c7ca8d4bdff8a31bb8
4
+ data.tar.gz: dd0fcb2ee6a7c03c1922f37b2612e2012945a0a4
5
5
  SHA512:
6
- metadata.gz: c6ee7096edd757778e9b13a8a4090ce4f3982762373132213cc8b605bf7129032a63c44351ccebcaf11a2f5f9f32766269e7c2713703f8fcc0164a77f3be9ca7
7
- data.tar.gz: 278ea0a3d288c0d636fe4bb12c34f36bf5be30859e09636932bc45ded810cf8aefd38b8c04a5a3d62b5aad46184a739f3fbaf480aed3c57f227c79ec8f7405ea
6
+ metadata.gz: 89b67cee12439d7375bb22f154ae90a34f601370896bdc84ca045f92ecfa0ef12a41296ccf918f1ccc22fa1d8cf0ea2895a48cecacc509520314b07626352e71
7
+ data.tar.gz: d5c24d0bea8b6d5845370c6dd3f9270ccf680b42153b932143c08962743d1dbe7e9a9302c5367db9d615c6d8fe4c8d13d709bbba80b1bd7d49fd7caaf820811e
data/.gitignore CHANGED
@@ -1,3 +1,6 @@
1
1
  performance
2
2
  .ssldummies
3
3
  .testssl
4
+ *.gem
5
+ *.json
6
+ Gemfile.lock
data/Gemfile ADDED
@@ -0,0 +1,12 @@
1
+ # encoding: utf-8
2
+ source 'https://rubygems.org'
3
+ gemspec
4
+
5
+ group :development do
6
+ gem 'pry'
7
+ gem 'rb-readline'
8
+ end
9
+
10
+ group :test do
11
+ gem 'messages'
12
+ end
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/)
@@ -53,7 +53,8 @@ module SSLShake
53
53
  end
54
54
 
55
55
  len = head & 0x7fff
56
- res['raw'] = response = socket.read(len).unpack('H*')[0].upcase
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.read(len).unpack('H*')[0].upcase
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)
@@ -3,5 +3,5 @@
3
3
  # license: MPLv2
4
4
 
5
5
  module SSLShake
6
- VERSION = '1.0.12'.freeze
6
+ VERSION = '1.0.13'.freeze
7
7
  end
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.12
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-08-15 00:00:00.000000000 Z
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