json-jwt 1.5.2 → 1.6.0
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/.travis.yml +0 -1
- data/VERSION +1 -1
- data/lib/json/jwk.rb +1 -0
- data/spec/json/jwe_spec.rb +32 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1428e29258d5b0bf2e188fbd4522130ee706ef67
|
4
|
+
data.tar.gz: 55ef03a52120003084b689f5c28b92662da417b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aba1048372d018ea9c65ed683c52d49e41ef6e348736d5dbc2ae7ec2d030f7128d42436933b79c4f8baeb5cb9e41d993e9c5ef082e461dc924253ee5464184ea
|
7
|
+
data.tar.gz: 690ee0ad3a43600f96b6bfc1e8acff7e7c6c1bdeba94d8a47f5717085b6b6afb1aed9b0e2c7ebf027a88b4b6e59fc09f0b8d041c756661cc76745639b300f1f1
|
data/.travis.yml
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.6.0
|
data/lib/json/jwk.rb
CHANGED
data/spec/json/jwe_spec.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe JSON::JWE do
|
4
|
-
let(:shared_key) { SecureRandom.hex
|
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) {
|
252
|
-
|
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.
|
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-
|
11
|
+
date: 2016-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|