json-jwt 1.5.2 → 1.6.0

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.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c89e8876d50ba67374f768113e49c6f4e1486328
4
- data.tar.gz: 4dc7ccdfd93385c4275b95ad7690d9f02521ac4b
3
+ metadata.gz: 1428e29258d5b0bf2e188fbd4522130ee706ef67
4
+ data.tar.gz: 55ef03a52120003084b689f5c28b92662da417b1
5
5
  SHA512:
6
- metadata.gz: 2b1976c4c86abb0de914273c1594da22250b62d88b183e031f6e67b336f7ee98096a7e9605888fdccd7fd0a13bdf71088a39632c7ff107c12219ef6a65ca9ffe
7
- data.tar.gz: 4a7f3f081a0adab03c6ea43154c329d52ee86dde606719b2391fda556490f1085f9f93090eb25ab1bb367ba230dd484fd39da55a765f154c073c4e7a4d3ddb48
6
+ metadata.gz: aba1048372d018ea9c65ed683c52d49e41ef6e348736d5dbc2ae7ec2d030f7128d42436933b79c4f8baeb5cb9e41d993e9c5ef082e461dc924253ee5464184ea
7
+ data.tar.gz: 690ee0ad3a43600f96b6bfc1e8acff7e7c6c1bdeba94d8a47f5717085b6b6afb1aed9b0e2c7ebf027a88b4b6e59fc09f0b8d041c756661cc76745639b300f1f1
@@ -3,7 +3,6 @@ before_install:
3
3
  - git submodule update --init --recursive
4
4
 
5
5
  rvm:
6
- - 1.9.3
7
6
  - 2.0
8
7
  - 2.1
9
8
  - 2.2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.5.2
1
+ 1.6.0
@@ -18,6 +18,7 @@ module JSON
18
18
  super params
19
19
  merge! ex_params
20
20
  end
21
+ self[:kid] ||= thumbprint
21
22
  end
22
23
 
23
24
  def content_type
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe JSON::JWE do
4
- let(:shared_key) { SecureRandom.hex 16 } # default shared key is too short
4
+ let(:shared_key) { SecureRandom.hex 32 } # default shared key is too short
5
5
  let(:private_key_path) { der_file_path 'rsa/private_key' }
6
6
 
7
7
  describe '#content_type' do
@@ -248,8 +248,37 @@ describe JSON::JWE do
248
248
 
249
249
  context 'when alg=dir' do
250
250
  let(:alg) { :dir }
251
- let(:key) { 'todo' }
252
- it :TODO
251
+ let(:key) { shared_key }
252
+
253
+ context 'when enc=A128GCM' do
254
+ let(:enc) { :A128GCM }
255
+ if gcm_supported?
256
+ it_behaves_like :decryptable
257
+ else
258
+ it_behaves_like :gcm_decryption_unsupported
259
+ end
260
+ end
261
+
262
+ context 'when enc=A256GCM' do
263
+ let(:enc) { :A256GCM }
264
+ if gcm_supported?
265
+ it_behaves_like :decryptable
266
+ else
267
+ it_behaves_like :gcm_decryption_unsupported
268
+ end
269
+ end
270
+
271
+ context 'when enc=A128CBC-HS256' do
272
+ let(:enc) { :'A128CBC-HS256' }
273
+ it_behaves_like :decryptable
274
+ it_behaves_like :verify_cbc_authentication_tag
275
+ end
276
+
277
+ context 'when enc=A256CBC-HS512' do
278
+ let(:enc) { :'A256CBC-HS512' }
279
+ it_behaves_like :decryptable
280
+ it_behaves_like :verify_cbc_authentication_tag
281
+ end
253
282
  end
254
283
 
255
284
  context 'when unknonw/unsupported algorithm given' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json-jwt
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.2
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - nov matake
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-26 00:00:00.000000000 Z
11
+ date: 2016-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json