cose 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/cose.gemspec +2 -2
- data/lib/cose/key/rsa.rb +21 -13
- data/lib/cose/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5417c864087ecc89f9f82bb341050b831b1854de193d0e9724e2a6105cf492ce
|
4
|
+
data.tar.gz: f74cfbcca9261e14fb1e170d981d18d0281bb817663a7df9484673b22d41da42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6377547f6db9eb87814455f4d48a8f84d8fc5df26df0b7d1a0c72f423a0ccbdb1e0f6367fcecf4e34db6025a145479088d89e79abdda7519849d12e4e62b7b48
|
7
|
+
data.tar.gz: 5227f43154bb5225c2a7354dcd5d0d271df281335e2dcab600c86c5910d37618b6b69473c6d04ee9f9cee1b76b85f789b50852fb2a88a9ae7aa63ed5bd1bb633
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v0.6.1] - 2019-04-06
|
4
|
+
|
5
|
+
### Fixed
|
6
|
+
|
7
|
+
- Fix COSE::Key::RSA#to_pkey for a public key
|
8
|
+
|
3
9
|
## [v0.6.0] - 2019-04-03
|
4
10
|
|
5
11
|
### Added
|
@@ -67,6 +73,7 @@
|
|
67
73
|
- EC2 key object
|
68
74
|
- Works with ruby 2.5
|
69
75
|
|
76
|
+
[v0.6.1]: https://github.com/cedarcode/cose-ruby/compare/v0.6.0...v0.6.1/
|
70
77
|
[v0.6.0]: https://github.com/cedarcode/cose-ruby/compare/v0.5.0...v0.6.0/
|
71
78
|
[v0.5.0]: https://github.com/cedarcode/cose-ruby/compare/v0.4.1...v0.5.0/
|
72
79
|
[v0.4.1]: https://github.com/cedarcode/cose-ruby/compare/v0.4.0...v0.4.1/
|
data/cose.gemspec
CHANGED
@@ -31,12 +31,12 @@ Gem::Specification.new do |spec|
|
|
31
31
|
|
32
32
|
spec.required_ruby_version = ">= 2.2"
|
33
33
|
|
34
|
-
spec.add_dependency "cbor", "~> 0.5.9
|
34
|
+
spec.add_dependency "cbor", "~> 0.5.9"
|
35
35
|
|
36
36
|
spec.add_development_dependency "appraisal", "~> 2.2.0"
|
37
37
|
spec.add_development_dependency "bundler", ">= 1.17", "< 3"
|
38
38
|
spec.add_development_dependency "byebug", ">= 10.0"
|
39
39
|
spec.add_development_dependency "rake", "~> 12.3"
|
40
40
|
spec.add_development_dependency "rspec", "~> 3.8"
|
41
|
-
spec.add_development_dependency "rubocop", "0.
|
41
|
+
spec.add_development_dependency "rubocop", "0.66.0"
|
42
42
|
end
|
data/lib/cose/key/rsa.rb
CHANGED
@@ -100,19 +100,21 @@ module COSE
|
|
100
100
|
pkey.d = bn(d)
|
101
101
|
end
|
102
102
|
|
103
|
-
if
|
104
|
-
pkey.set_factors
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
103
|
+
if private?
|
104
|
+
if pkey.respond_to?(:set_factors)
|
105
|
+
pkey.set_factors(bn(p), bn(q))
|
106
|
+
else
|
107
|
+
pkey.p = bn(p)
|
108
|
+
pkey.q = bn(q)
|
109
|
+
end
|
109
110
|
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
111
|
+
if pkey.respond_to?(:set_crt_params)
|
112
|
+
pkey.set_crt_params(bn(dp), bn(dq), bn(qinv))
|
113
|
+
else
|
114
|
+
pkey.dmp1 = bn(dp)
|
115
|
+
pkey.dmq1 = bn(dq)
|
116
|
+
pkey.iqmp = bn(qinv)
|
117
|
+
end
|
116
118
|
end
|
117
119
|
|
118
120
|
pkey
|
@@ -133,8 +135,14 @@ module COSE
|
|
133
135
|
|
134
136
|
private
|
135
137
|
|
138
|
+
def private?
|
139
|
+
[d, p, q, dp, dq, qinv].none?(&:nil?)
|
140
|
+
end
|
141
|
+
|
136
142
|
def bn(data)
|
137
|
-
|
143
|
+
if data
|
144
|
+
OpenSSL::BN.new(data, 2)
|
145
|
+
end
|
138
146
|
end
|
139
147
|
end
|
140
148
|
end
|
data/lib/cose/version.rb
CHANGED
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: 0.6.
|
4
|
+
version: 0.6.1
|
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: 2019-04-
|
12
|
+
date: 2019-04-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cbor
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 0.5.9
|
20
|
+
version: 0.5.9
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 0.5.9
|
27
|
+
version: 0.5.9
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: appraisal
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -107,14 +107,14 @@ dependencies:
|
|
107
107
|
requirements:
|
108
108
|
- - '='
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.
|
110
|
+
version: 0.66.0
|
111
111
|
type: :development
|
112
112
|
prerelease: false
|
113
113
|
version_requirements: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - '='
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.
|
117
|
+
version: 0.66.0
|
118
118
|
description:
|
119
119
|
email:
|
120
120
|
- gonzalo@cedarcode.com
|