web_authn 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -1
- data/VERSION +1 -1
- data/lib/web_authn/attested_credential_data.rb +13 -10
- data/lib/web_authn.rb +1 -1
- data/web_authn.gemspec +0 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7e325092186081a22bf56445bed75ee6b1ee61915bad3867b4254851c1c4eba
|
4
|
+
data.tar.gz: '041690712347e54ffa6ee757b5199f1f8fa541bbc9b1f092354c11041ee70074'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e69686eee65065db0c0480c3438d787f0d520d414b938c32eb9fcedc70c195679073d152807347769584b3c87984ba30c819fcc992eec41da7b112bb6c38a18
|
7
|
+
data.tar.gz: ce5f15bfb0b5d4c5cb5b61386e7e40bb1cf9bb7df1b1a6658b00b1047f956682a8df3d28cfefb26fb35f5bf9c5f5bc2daeb4e929b543dc95d963e136c3475da5
|
data/.travis.yml
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.4
|
@@ -22,26 +22,29 @@ module WebAuthn
|
|
22
22
|
attested_credential_data.byteslice((18 + length)..-1),
|
23
23
|
]
|
24
24
|
cose_key = COSE::Key::EC2.from_cbor(_encoded_cose_key_)
|
25
|
-
|
25
|
+
curve_name = case cose_key.curve
|
26
26
|
when 1
|
27
|
-
|
27
|
+
'prime256v1'
|
28
28
|
when 2
|
29
|
-
|
29
|
+
'secp384r1'
|
30
30
|
when 3
|
31
|
-
|
31
|
+
'secp521r1'
|
32
32
|
else
|
33
33
|
raise NotImplementedError, 'Non-supported EC curve'
|
34
34
|
end
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
35
|
+
ec_key = OpenSSL::PKey::EC.new curve_name
|
36
|
+
ec_key.public_key = OpenSSL::PKey::EC::Point.new(
|
37
|
+
OpenSSL::PKey::EC::Group.new(curve_name),
|
38
|
+
OpenSSL::BN.new([
|
39
|
+
'04' +
|
40
|
+
cose_key.x_coordinate.unpack('H*').first +
|
41
|
+
cose_key.y_coordinate.unpack('H*').first
|
42
|
+
].pack('H*'), 2)
|
40
43
|
)
|
41
44
|
new(
|
42
45
|
aaguid: Base64.urlsafe_encode64(aaguid, padding: false),
|
43
46
|
credential_id: Base64.urlsafe_encode64(credential_id, padding: false),
|
44
|
-
public_key:
|
47
|
+
public_key: ec_key
|
45
48
|
)
|
46
49
|
end
|
47
50
|
end
|
data/lib/web_authn.rb
CHANGED
data/web_authn.gemspec
CHANGED
@@ -15,7 +15,6 @@ Gem::Specification.new do |gem|
|
|
15
15
|
gem.add_runtime_dependency 'activesupport'
|
16
16
|
gem.add_runtime_dependency 'cbor'
|
17
17
|
gem.add_runtime_dependency 'cose'
|
18
|
-
gem.add_runtime_dependency 'json-jwt'
|
19
18
|
gem.add_development_dependency 'rake', '~> 10.0'
|
20
19
|
gem.add_development_dependency 'simplecov'
|
21
20
|
gem.add_development_dependency 'rspec'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: web_authn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nov matake
|
@@ -52,20 +52,6 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: json-jwt
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :runtime
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: rake
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -176,7 +162,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
176
162
|
version: '0'
|
177
163
|
requirements: []
|
178
164
|
rubyforge_project:
|
179
|
-
rubygems_version: 2.7.
|
165
|
+
rubygems_version: 2.7.6
|
180
166
|
signing_key:
|
181
167
|
specification_version: 4
|
182
168
|
summary: W3C WebAuthn (a.k.a. FIDO2) RP library in Ruby
|