cose 1.0.0 → 1.1.0

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: f3fdc6957e5130367c9a1e8ab223b5c145d6caca1c04b01552410ef6d14bc740
4
- data.tar.gz: 6849a1803ff3bb2e92bdf90b4226c8d023b07012b7cb18a915b9f816aed2e1dc
3
+ metadata.gz: ef03f2ea3b2f4f4bb8f81fdd777cf3ae3905e1eae953599f0e6b0feca89343f5
4
+ data.tar.gz: 94db44b9a0a449bdb81ae9274fb193365838ec84f9df3db3540dcf5eb1ca3303
5
5
  SHA512:
6
- metadata.gz: cc1093c925a437283fb6b7658bacd6bcd2f8427962dd4f1a5ac9a9a81341a5beaa8f1d21ce40b74372dd86fddf5df1f7702a6790f79d166fd1a5ea8ca359d66a
7
- data.tar.gz: 6d11eb89cfc72edaaa9d3533c87f39d509efcff65d7c10070321c39144f91b3ef421bf8dd32b250d621f31fde8a766c98e2c516d8091af802749c707a25ee9d0
6
+ metadata.gz: 17492d5ba3f7fce248418a158d29419392f9d849f33421d7b6192e61e021e5d62ca14f6a42721a05e77e31dfc67ef267c18e8be7138360a9146e359e5cb5b740
7
+ data.tar.gz: 49834d1df018a49669dfc02b8548c30f2aedf99fbad979cd072ee480eff99e9b6076e74654cfff72e6d6a6da96798d1de7902497f19f70e53b6464ac5a7d716a
@@ -4,13 +4,14 @@ cache: bundler
4
4
 
5
5
  rvm:
6
6
  - ruby-head
7
- - 2.7.0
8
- - 2.6.5
9
- - 2.5.7
10
- - 2.4.9
7
+ - 2.7.1
8
+ - 2.6.6
9
+ - 2.5.8
10
+ - 2.4.10
11
11
 
12
12
  gemfile:
13
13
  - gemfiles/openssl_head.gemfile
14
+ - gemfiles/openssl_2_2.gemfile
14
15
  - gemfiles/openssl_2_1.gemfile
15
16
  - gemfiles/openssl_2_0.gemfile
16
17
  - gemfiles/openssl_default.gemfile
data/Appraisals CHANGED
@@ -4,6 +4,10 @@ appraise "openssl_head" do
4
4
  gem "openssl", git: "https://github.com/ruby/openssl"
5
5
  end
6
6
 
7
+ appraise "openssl_2_2" do
8
+ gem "openssl", "~> 2.2.0"
9
+ end
10
+
7
11
  appraise "openssl_2_1" do
8
12
  gem "openssl", "~> 2.1.0"
9
13
  end
@@ -1,12 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## [v1.1.0] - 2020-07-09
4
+
5
+ ### Dependencies
6
+
7
+ - Update `openssl-signature_algorithm` runtime dependency from `~> 0.4.0` to `~> 1.0`.
8
+
3
9
  ## [v1.0.0] - 2020-03-29
4
10
 
5
11
  ### Added
6
12
 
7
13
  - Signature verification validates key `alg` is compatible with the signature algorithm
8
14
 
9
- NOTE: No breaking changes. Moving out of v0.x` to express the intention to keep the public API stable.
15
+ NOTE: No breaking changes. Moving out of `v0.x` to express the intention to keep the public API stable.
10
16
 
11
17
  ## [v0.11.0] - 2020-01-30
12
18
 
@@ -123,6 +129,7 @@ NOTE: No breaking changes. Moving out of v0.x` to express the intention to keep
123
129
  - EC2 key object
124
130
  - Works with ruby 2.5
125
131
 
132
+ [v1.1.0]: https://github.com/cedarcode/cose-ruby/compare/v1.0.0...v1.1.0/
126
133
  [v1.0.0]: https://github.com/cedarcode/cose-ruby/compare/v0.11.0...v1.0.0/
127
134
  [v0.11.0]: https://github.com/cedarcode/cose-ruby/compare/v0.10.0...v0.11.0/
128
135
  [v0.10.0]: https://github.com/cedarcode/cose-ruby/compare/v0.9.0...v0.10.0/
data/bin/setup CHANGED
@@ -3,6 +3,8 @@ set -euo pipefail
3
3
  IFS=$'\n\t'
4
4
  set -vx
5
5
 
6
+ git submodule update --init --recursive
7
+
6
8
  bundle install
7
9
 
8
10
  # Do any other automated setup that you need to do here
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
32
32
  spec.required_ruby_version = ">= 2.4"
33
33
 
34
34
  spec.add_dependency "cbor", "~> 0.5.9"
35
- spec.add_dependency "openssl-signature_algorithm", "~> 0.4.0"
35
+ spec.add_dependency "openssl-signature_algorithm", "~> 1.0"
36
36
 
37
37
  spec.add_development_dependency "appraisal", "~> 2.2.0"
38
38
  spec.add_development_dependency "bundler", ">= 1.17", "< 3"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "openssl", "~> 2.2.0"
6
+
7
+ gemspec path: "../"
@@ -20,7 +20,7 @@ module COSE
20
20
  private
21
21
 
22
22
  def valid_signature?(key, signature, verification_data)
23
- signature_algorithm = signature_algorithm_class.new(hash_function[3..-1])
23
+ signature_algorithm = signature_algorithm_class.new(hash_function: hash_function)
24
24
  signature_algorithm.verify_key = to_pkey(key)
25
25
 
26
26
  begin
@@ -41,14 +41,12 @@ module COSE
41
41
  end
42
42
 
43
43
  def map
44
- map = {
44
+ {
45
45
  LABEL_BASE_IV => base_iv,
46
46
  LABEL_KEY_OPS => key_ops,
47
47
  LABEL_ALG => alg,
48
48
  LABEL_KID => kid,
49
- }
50
-
51
- map.reject { |_k, v| v.nil? }
49
+ }.compact
52
50
  end
53
51
  end
54
52
  end
@@ -35,13 +35,11 @@ module COSE
35
35
  end
36
36
 
37
37
  def map
38
- map = super.merge(
38
+ super.merge(
39
39
  LABEL_CRV => crv,
40
40
  LABEL_X => x,
41
41
  LABEL_D => d
42
- )
43
-
44
- map.reject { |_k, v| v.nil? }
42
+ ).compact
45
43
  end
46
44
  end
47
45
  end
@@ -59,12 +59,10 @@ module COSE
59
59
  end
60
60
 
61
61
  def map
62
- map = super.merge(
62
+ super.merge(
63
63
  Base::LABEL_KTY => KTY_EC2,
64
64
  LABEL_Y => y,
65
- )
66
-
67
- map.reject { |_k, v| v.nil? }
65
+ ).compact
68
66
  end
69
67
 
70
68
  def to_pkey
@@ -74,7 +74,7 @@ module COSE
74
74
  end
75
75
 
76
76
  def map
77
- map = super.merge(
77
+ super.merge(
78
78
  Base::LABEL_KTY => KTY_RSA,
79
79
  LABEL_N => n,
80
80
  LABEL_E => e,
@@ -84,9 +84,7 @@ module COSE
84
84
  LABEL_DP => dp,
85
85
  LABEL_DQ => dq,
86
86
  LABEL_QINV => qinv
87
- )
88
-
89
- map.reject { |_k, v| v.nil? }
87
+ ).compact
90
88
  end
91
89
 
92
90
  def to_pkey
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module COSE
4
- VERSION = "1.0.0"
4
+ VERSION = "1.1.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cose
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gonzalo Rodriguez
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2020-03-29 00:00:00.000000000 Z
12
+ date: 2020-07-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cbor
@@ -31,14 +31,14 @@ dependencies:
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: 0.4.0
34
+ version: '1.0'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: 0.4.0
41
+ version: '1.0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: appraisal
44
44
  requirement: !ruby/object:Gem::Requirement
@@ -168,6 +168,7 @@ files:
168
168
  - cose.gemspec
169
169
  - gemfiles/openssl_2_0.gemfile
170
170
  - gemfiles/openssl_2_1.gemfile
171
+ - gemfiles/openssl_2_2.gemfile
171
172
  - gemfiles/openssl_default.gemfile
172
173
  - gemfiles/openssl_head.gemfile
173
174
  - lib/cose.rb
@@ -219,7 +220,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
219
220
  - !ruby/object:Gem::Version
220
221
  version: '0'
221
222
  requirements: []
222
- rubygems_version: 3.1.2
223
+ rubygems_version: 3.1.4
223
224
  signing_key:
224
225
  specification_version: 4
225
226
  summary: Ruby implementation of RFC 8152 CBOR Object Signing and Encryption (COSE)