sslshake 1.0.13 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sslshake.rb +10 -1
- data/lib/sslshake/tls.rb +9 -3
- data/lib/sslshake/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55f0d4a108872d6274a59566d8886da244aba0be
|
4
|
+
data.tar.gz: e448af034f13a58c957520529f1b7e80486ba583
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a2d7b75395ff326c0542fe37a2127b89c8033a7348cd1e7f16c717c0c652a277f9547fe882f7638e697687df735caf3bf63cffb43ceedfafd2d4af0979e4dfe
|
7
|
+
data.tar.gz: '099f535b2eafe90700dd9c7ce1e43de3a91330b5a3ccbcc19c2c73743bb8f5499097e1f71dbf3afdd70b6766ccdb778c49a0d0b0bf4d07633315868c039681c4'
|
data/lib/sslshake.rb
CHANGED
@@ -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
|
-
|
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)
|
data/lib/sslshake/tls.rb
CHANGED
@@ -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(
|
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
|
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.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:
|
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.
|
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.
|