sslshake 1.0.13 → 1.1.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1be749edc70a8e63fcfa91c7ca8d4bdff8a31bb8
4
- data.tar.gz: dd0fcb2ee6a7c03c1922f37b2612e2012945a0a4
3
+ metadata.gz: 55f0d4a108872d6274a59566d8886da244aba0be
4
+ data.tar.gz: e448af034f13a58c957520529f1b7e80486ba583
5
5
  SHA512:
6
- metadata.gz: 89b67cee12439d7375bb22f154ae90a34f601370896bdc84ca045f92ecfa0ef12a41296ccf918f1ccc22fa1d8cf0ea2895a48cecacc509520314b07626352e71
7
- data.tar.gz: d5c24d0bea8b6d5845370c6dd3f9270ccf680b42153b932143c08962743d1dbe7e9a9302c5367db9d615c6d8fe4c8d13d709bbba80b1bd7d49fd7caaf820811e
6
+ metadata.gz: 4a2d7b75395ff326c0542fe37a2127b89c8033a7348cd1e7f16c717c0c652a277f9547fe882f7638e697687df735caf3bf63cffb43ceedfafd2d4af0979e4dfe
7
+ data.tar.gz: '099f535b2eafe90700dd9c7ce1e43de3a91330b5a3ccbcc19c2c73743bb8f5499097e1f71dbf3afdd70b6766ccdb778c49a0d0b0bf4d07633315868c039681c4'
@@ -61,7 +61,16 @@ module SSLShake
61
61
  cur_socket.send(ssl.hello(opts[:ciphers]), 0)
62
62
  else
63
63
  ssl = SSLShake::TLS.new
64
- cur_socket.send(ssl.hello(protocol, opts[:ciphers]), 0)
64
+
65
+ sni = nil
66
+ if opts[:servername] != nil && opts[:protocol] != 'ssl3'
67
+ sni = '0000' + sprintf('%04x', opts[:servername].length + 5) +
68
+ sprintf('%04x', opts[:servername].length + 3) + '00' +
69
+ sprintf('%04x', opts[:servername].length) +
70
+ opts[:servername].unpack('H*')[0]
71
+ end
72
+
73
+ cur_socket.send(ssl.hello(protocol, opts[:ciphers], sni), 0)
65
74
  end
66
75
 
67
76
  res = ssl.parse_hello(cur_socket, opts)
@@ -66,11 +66,17 @@ module SSLShake
66
66
  when 'ssl3'
67
67
  ciphers = cipher_string(SSL3_CIPHERS, cipher_search)
68
68
  when 'tls1.0', 'tls1.1'
69
- ciphers = cipher_string(TLS10_CIPHERS, cipher_search)
70
- extensions ||= '000f000101' # add Heartbeat
69
+ ciphers = cipher_string(TLS_CIPHERS, cipher_search)
70
+ (extensions ||= '') << '000f000101' # add Heartbeat
71
+ extensions << '000d00140012040308040401050308050501080606010201' # add signature_algorithms
72
+ extensions << '000b00020100' # add ec_points_format
73
+ extensions << '000a000a0008fafa001d00170018' # add elliptic_curve
71
74
  when 'tls1.2'
72
75
  ciphers = cipher_string(TLS_CIPHERS, cipher_search)
73
- extensions ||= '000f000101' # add Heartbeat
76
+ (extensions ||= '') << '000f000101' # add Heartbeat
77
+ extensions << '000d00140012040308040401050308050501080606010201' # add signature_algorithms
78
+ extensions << '000b00020100' # add ec_points_format
79
+ extensions << '000a000a0008fafa001d00170018' # add elliptic_curve
74
80
  else
75
81
  fail UserError, "This version is not supported: #{version.inspect}"
76
82
  end
@@ -3,5 +3,5 @@
3
3
  # license: MPLv2
4
4
 
5
5
  module SSLShake
6
- VERSION = '1.0.13'.freeze
6
+ VERSION = '1.1.0'.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.13
4
+ version: 1.1.0
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-10-31 00:00:00.000000000 Z
11
+ date: 2017-03-29 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
@@ -52,7 +52,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
52
52
  version: '0'
53
53
  requirements: []
54
54
  rubyforge_project:
55
- rubygems_version: 2.5.1
55
+ rubygems_version: 2.6.10
56
56
  signing_key:
57
57
  specification_version: 4
58
58
  summary: Ruby library for pure SSL/TLS handshake testing.