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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3861f9a9864268fda75836b387c4a1f83e4edea0e885595155f2a352f69695ea
4
- data.tar.gz: 617f9b12aa8ac8e39367b1b5f9fcba57d1bd3dc669fe645c7c6888a7140795bd
3
+ metadata.gz: ba824030b1a295566777d4d12c35e259d379bc9a830b0cb95792356cc547a436
4
+ data.tar.gz: c3f2e8fd07567133cce7e8f24fcaf02499b8cceff6088ca403ca2e9be9e5ab5f
5
5
  SHA512:
6
- metadata.gz: 1f97901b82520b9c0a1fbc864e7e101749d9dacba3554e721eaf223fb1d4026384bf0756c8e9ac4578bcab37eb9c7b8e9c50b0387f3dfd7e8cf2d8456e709b14
7
- data.tar.gz: a0d104b2e5dba0e7e7f8297a51b858f0912007f59350e1842e026639c1cc27d107c2737292f01cc2bf1fbc6c3374cb3426696f00ee2462c72d014c841ea3ce7d
6
+ metadata.gz: 00e939bf927db1923274985cdad6526d16b6d99216f62ff3978b3bae9cdcedf675482b96f49a224f9f982f1d8c6f7ca0b49f282086422e73e93b4b74d13f0722
7
+ data.tar.gz: 1e523ad0d29d6f29dbd94388f9f895abf69324ceb4336406b13e21793395abdf795a0f043ee89899e888b851d85f2190064e93b70efec092964e34c94b15ac76
data/Gemfile CHANGED
@@ -7,9 +7,8 @@ gem 'openssl'
7
7
  gem 'rake'
8
8
 
9
9
  group :test do
10
- gem 'pry'
11
- gem 'pry-byebug'
12
- gem 'rspec', '3.8.0'
10
+ gem 'byebug'
11
+ gem 'rspec', '3.9.0'
13
12
  gem 'rubocop', '0.78.0'
14
13
  end
15
14
 
@@ -44,8 +44,8 @@ module TTTLS13
44
44
  #
45
45
  # @raise [TTTLS13::Error::ErrorAlerts]
46
46
  #
47
- # @return [TTTLS13::Message::Extensions::SignatureAlgorithms, nil]
48
- def self.deserialize(binary)
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
- SignatureAlgorithms.new(supported_signature_algorithms)
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
- extension = SignatureAlgorithms.deserialize(binary)
19
- extension.extension_type = ExtensionType::SIGNATURE_ALGORITHMS_CERT
20
- extension
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TTTLS13
4
- VERSION = '0.2.14'
4
+ VERSION = '0.2.15'
5
5
  end
@@ -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
@@ -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.14
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-16 00:00:00.000000000 Z
11
+ date: 2020-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler