json-jwt 0.7.0.alpha → 0.7.0.alpha2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of json-jwt might be problematic. Click here for more details.

Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/json/jwk.rb +2 -3
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: de4af966b0dc54f6caf14149295dbb7f8bccd856
4
- data.tar.gz: 2a93fc7d1d35b3fc7319f31a2fed23392c0ed7d8
3
+ metadata.gz: a279683e6d96616536c1f63ccb1f1d51a37398f2
4
+ data.tar.gz: 5a3cbe00175853947bb1876b546c9061a465547e
5
5
  SHA512:
6
- metadata.gz: d7424823b6791844548cc154beaa9569672c1f7f439770d21f3effed0a3b9a7007de394c2bc2aee627907e97d2a080e48ff51d578a2a0f82ce34979aabcacf08
7
- data.tar.gz: bbdd062cc11dfc58af47d27969ee42a1c940e7a1646a818458a69d8cbac25b869bd14123f63bf4326913c2b3af3db6b21c30b69d46203db82f91b507dcdffd6a
6
+ metadata.gz: e94d5cd60ec9e4927a02e1aaefe7ede13322848111bab88ba44356e9131f435334d2cf12cdb062de025e68f7455ecc450a34e088e848cc1746730497e4bbe7ec
7
+ data.tar.gz: d143c8421971af2160ace61ea9a676864344025ebf950d14376a8d499250e3b9e0a268004a9945ebbc5a55230c07acbc32dc94871cd2122301589176edcd4fcc
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.0.alpha
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).unpack('H*').first
91
+ OpenSSL::BN.new UrlSafeBase64.decode64(decoded), 2
92
92
  end
93
- key_bn = OpenSSL::BN.new ['04', x, y].join, 16
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')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json-jwt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0.alpha
4
+ version: 0.7.0.alpha2
5
5
  platform: ruby
6
6
  authors:
7
7
  - nov matake