From e1b072c991d985363322891cf6e4631da76cc54c Mon Sep 17 00:00:00 2001 From: William Kim Date: Wed, 7 Aug 2013 18:06:08 -0400 Subject: [PATCH] Updated nimbusds library version to 2.17.2 and made relevant changes in enc./dec. service and test --- .../service/impl/TestSignedAuthRequestUrlBuilder.java | 2 +- .../impl/TestDefaultJwtEncryptionAndDecryptionService.java | 7 ++++--- pom.xml | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/openid-connect-client/src/test/java/org/mitre/openid/connect/client/service/impl/TestSignedAuthRequestUrlBuilder.java b/openid-connect-client/src/test/java/org/mitre/openid/connect/client/service/impl/TestSignedAuthRequestUrlBuilder.java index bbcb4b518..9d5390055 100644 --- a/openid-connect-client/src/test/java/org/mitre/openid/connect/client/service/impl/TestSignedAuthRequestUrlBuilder.java +++ b/openid-connect-client/src/test/java/org/mitre/openid/connect/client/service/impl/TestSignedAuthRequestUrlBuilder.java @@ -87,7 +87,7 @@ public class TestSignedAuthRequestUrlBuilder { @Before public void prepare() throws NoSuchAlgorithmException, InvalidKeySpecException { - RSAKey key = new RSAKey(new Base64URL(n), new Base64URL(e), new Base64URL(d), Use.SIGNATURE, new Algorithm(alg), kid); + RSAKey key = new RSAKey(new Base64URL(n), new Base64URL(e), new Base64URL(d), Use.SIGNATURE, new Algorithm(alg), kid, null, null, null); Map keys = Maps.newHashMap(); keys.put("client", key); diff --git a/openid-connect-common/src/test/java/org/mitre/jwt/encryption/service/impl/TestDefaultJwtEncryptionAndDecryptionService.java b/openid-connect-common/src/test/java/org/mitre/jwt/encryption/service/impl/TestDefaultJwtEncryptionAndDecryptionService.java index a42898e21..11ed5cded 100644 --- a/openid-connect-common/src/test/java/org/mitre/jwt/encryption/service/impl/TestDefaultJwtEncryptionAndDecryptionService.java +++ b/openid-connect-common/src/test/java/org/mitre/jwt/encryption/service/impl/TestDefaultJwtEncryptionAndDecryptionService.java @@ -81,7 +81,7 @@ public class TestDefaultJwtEncryptionAndDecryptionService { "qDp0Vqj3kbSCz1XyfCs6_LehBwtxHIyh8Ripy40p24moOAbgxVw3rxT_vl" + "t3UVe4WO3JkJOzlpUf-KTVI2Ptgm-dARxTEtE-id-4OJr0h-K-VFs3VSnd" + "VTIznSxfyrj8ILL6MG_Uv8YAu7VILSB3lOW085-4qE3DzgrTjgyQ"), // d - Use.ENCRYPTION, JWEAlgorithm.RSA_OAEP, RSAkid); + Use.ENCRYPTION, JWEAlgorithm.RSA_OAEP, RSAkid, null, null, null); // AES key wrap not yet tested // private String AESkid = "aes123"; @@ -112,11 +112,12 @@ public class TestDefaultJwtEncryptionAndDecryptionService { JWEObject jwt = JWEObject.parse(compactSerializedJwe); - assertThat(jwt.getPayload(), nullValue()); + assertThat(jwt.getPayload(), nullValue()); // observe..nothing is there service.decryptJwt(jwt); + String result = jwt.getPayload().toString(); // and voila! decrypto-magic - assertEquals(plainText, jwt.getPayload().toString()); + assertEquals(plainText, result); } @Test diff --git a/pom.xml b/pom.xml index 54ccbb67b..7ba1b581f 100644 --- a/pom.xml +++ b/pom.xml @@ -387,7 +387,7 @@ com.nimbusds nimbus-jose-jwt - 2.15.2 + 2.17.2 org.hsqldb