json-jwt 0.7.0.alpha → 0.7.0.alpha2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of json-jwt might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/json/jwk.rb +2 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a279683e6d96616536c1f63ccb1f1d51a37398f2
|
4
|
+
data.tar.gz: 5a3cbe00175853947bb1876b546c9061a465547e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e94d5cd60ec9e4927a02e1aaefe7ede13322848111bab88ba44356e9131f435334d2cf12cdb062de025e68f7455ecc450a34e088e848cc1746730497e4bbe7ec
|
7
|
+
data.tar.gz: d143c8421971af2160ace61ea9a676864344025ebf950d14376a8d499250e3b9e0a268004a9945ebbc5a55230c07acbc32dc94871cd2122301589176edcd4fcc
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.0.
|
1
|
+
0.7.0.alpha2
|
data/lib/json/jwk.rb
CHANGED
@@ -88,10 +88,9 @@ module JSON
|
|
88
88
|
when 'EC'
|
89
89
|
key = OpenSSL::PKey::EC.new ecdsa_curve_name_for(jwk[:crv])
|
90
90
|
x, y = [jwk[:x], jwk[:y]].collect do |decoded|
|
91
|
-
UrlSafeBase64.decode64(decoded)
|
91
|
+
OpenSSL::BN.new UrlSafeBase64.decode64(decoded), 2
|
92
92
|
end
|
93
|
-
|
94
|
-
key.public_key = OpenSSL::PKey::EC::Point.new key.group, key_bn
|
93
|
+
key.public_key = OpenSSL::PKey::EC::Point.new(key.group).mul(x, y)
|
95
94
|
key
|
96
95
|
else
|
97
96
|
raise UnknownAlgorithm.new('Unknown Algorithm')
|