tttls1.3 0.2.14 → 0.2.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -3
- data/lib/tttls1.3/message/extension/signature_algorithms.rb +13 -3
- data/lib/tttls1.3/message/extension/signature_algorithms_cert.rb +5 -4
- data/lib/tttls1.3/version.rb +1 -1
- data/spec/signature_algorithms_cert_spec.rb +4 -0
- data/spec/signature_algorithms_spec.rb +4 -0
- data/tttls1.3.gemspec +0 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba824030b1a295566777d4d12c35e259d379bc9a830b0cb95792356cc547a436
|
4
|
+
data.tar.gz: c3f2e8fd07567133cce7e8f24fcaf02499b8cceff6088ca403ca2e9be9e5ab5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00e939bf927db1923274985cdad6526d16b6d99216f62ff3978b3bae9cdcedf675482b96f49a224f9f982f1d8c6f7ca0b49f282086422e73e93b4b74d13f0722
|
7
|
+
data.tar.gz: 1e523ad0d29d6f29dbd94388f9f895abf69324ceb4336406b13e21793395abdf795a0f043ee89899e888b851d85f2190064e93b70efec092964e34c94b15ac76
|
data/Gemfile
CHANGED
@@ -44,8 +44,8 @@ module TTTLS13
|
|
44
44
|
#
|
45
45
|
# @raise [TTTLS13::Error::ErrorAlerts]
|
46
46
|
#
|
47
|
-
# @return [
|
48
|
-
def self.
|
47
|
+
# @return [Array of SignatureScheme]
|
48
|
+
def self.deserialize_supported_signature_algorithms(binary)
|
49
49
|
raise Error::ErrorAlerts, :internal_error if binary.nil?
|
50
50
|
|
51
51
|
return nil if binary.length < 2
|
@@ -61,7 +61,17 @@ module TTTLS13
|
|
61
61
|
end
|
62
62
|
return nil unless ssa_len + 2 == binary.length
|
63
63
|
|
64
|
-
|
64
|
+
supported_signature_algorithms
|
65
|
+
end
|
66
|
+
|
67
|
+
# @param binary [String]
|
68
|
+
#
|
69
|
+
# @return [TTTLS13::Message::Extensions::SignatureAlgorithms, nil]
|
70
|
+
def self.deserialize(binary)
|
71
|
+
ssa = deserialize_supported_signature_algorithms(binary)
|
72
|
+
return nil if ssa.nil?
|
73
|
+
|
74
|
+
SignatureAlgorithms.new(ssa)
|
65
75
|
end
|
66
76
|
end
|
67
77
|
end
|
@@ -13,11 +13,12 @@ module TTTLS13
|
|
13
13
|
|
14
14
|
# @param binary [String]
|
15
15
|
#
|
16
|
-
# @return [TTTLS13::Message::Extensions::SignatureAlgorithmsCert]
|
16
|
+
# @return [TTTLS13::Message::Extensions::SignatureAlgorithmsCert, nil]
|
17
17
|
def self.deserialize(binary)
|
18
|
-
|
19
|
-
|
20
|
-
|
18
|
+
ssa = deserialize_supported_signature_algorithms(binary)
|
19
|
+
return nil if ssa.nil?
|
20
|
+
|
21
|
+
SignatureAlgorithmsCert.new(ssa)
|
21
22
|
end
|
22
23
|
end
|
23
24
|
end
|
data/lib/tttls1.3/version.rb
CHANGED
@@ -24,6 +24,8 @@ RSpec.describe SignatureAlgorithmsCert do
|
|
24
24
|
end
|
25
25
|
|
26
26
|
it 'should be generated' do
|
27
|
+
expect(extension).to be_a(SignatureAlgorithmsCert)
|
28
|
+
|
27
29
|
expect(extension.extension_type)
|
28
30
|
.to eq ExtensionType::SIGNATURE_ALGORITHMS_CERT
|
29
31
|
expect(extension.supported_signature_algorithms)
|
@@ -58,6 +60,8 @@ RSpec.describe SignatureAlgorithmsCert do
|
|
58
60
|
end
|
59
61
|
|
60
62
|
it 'should generate valid object' do
|
63
|
+
expect(extension).to be_a(SignatureAlgorithmsCert)
|
64
|
+
|
61
65
|
expect(extension.extension_type)
|
62
66
|
.to eq ExtensionType::SIGNATURE_ALGORITHMS_CERT
|
63
67
|
expect(extension.supported_signature_algorithms)
|
@@ -24,6 +24,8 @@ RSpec.describe SignatureAlgorithms do
|
|
24
24
|
end
|
25
25
|
|
26
26
|
it 'should be generated' do
|
27
|
+
expect(extension).to be_a(SignatureAlgorithms)
|
28
|
+
|
27
29
|
expect(extension.extension_type).to eq ExtensionType::SIGNATURE_ALGORITHMS
|
28
30
|
expect(extension.supported_signature_algorithms)
|
29
31
|
.to eq supported_signature_algorithms
|
@@ -76,6 +78,8 @@ RSpec.describe SignatureAlgorithms do
|
|
76
78
|
end
|
77
79
|
|
78
80
|
it 'should generate valid object' do
|
81
|
+
expect(extension).to be_a(SignatureAlgorithms)
|
82
|
+
|
79
83
|
expect(extension.extension_type).to eq ExtensionType::SIGNATURE_ALGORITHMS
|
80
84
|
expect(extension.supported_signature_algorithms)
|
81
85
|
.to eq supported_signature_algorithms
|
data/tttls1.3.gemspec
CHANGED
@@ -16,7 +16,6 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.required_ruby_version = '>=2.6.1'
|
17
17
|
|
18
18
|
spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
19
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
20
19
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
21
20
|
spec.require_paths = ['lib']
|
22
21
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tttls1.3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thekuwayama
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07
|
11
|
+
date: 2020-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|