From 452b89414abdc46b5949079bccdfe85bdc92ca5e Mon Sep 17 00:00:00 2001 From: Amanda Anganes Date: Tue, 3 Sep 2013 12:26:40 -0400 Subject: [PATCH] Added null check; --- .../service/impl/DefaultJwtSigningAndValidationService.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openid-connect-common/src/main/java/org/mitre/jwt/signer/service/impl/DefaultJwtSigningAndValidationService.java b/openid-connect-common/src/main/java/org/mitre/jwt/signer/service/impl/DefaultJwtSigningAndValidationService.java index 1f7c966f2..7dc48a1f9 100644 --- a/openid-connect-common/src/main/java/org/mitre/jwt/signer/service/impl/DefaultJwtSigningAndValidationService.java +++ b/openid-connect-common/src/main/java/org/mitre/jwt/signer/service/impl/DefaultJwtSigningAndValidationService.java @@ -94,6 +94,7 @@ public class DefaultJwtSigningAndValidationService implements JwtSigningAndValid */ public DefaultJwtSigningAndValidationService(JWKSetKeyStore keyStore) throws NoSuchAlgorithmException, InvalidKeySpecException { // convert all keys in the keystore to a map based on key id + if (keyStore!= null && keyStore.getJwkSet() != null) { for (JWK key : keyStore.getKeys()) { if (!Strings.isNullOrEmpty(key.getKeyID())) { this.keys.put(key.getKeyID(), key); @@ -101,6 +102,7 @@ public class DefaultJwtSigningAndValidationService implements JwtSigningAndValid throw new IllegalArgumentException("Tried to load a key from a keystore without a 'kid' field: " + key); } } + } //buildSignersAndVerifiers(); }