NPE from JWX.setKey using HSM

Issue #80 closed
Brian Campbell repo owner created an issue

NullPointerException is being thrown from key.equals(...) when using nCipher/Thales HSM.

Seems the normal implementation of the Key interface can handle null input and return false where the KMKey cannot.

The logic in JsonWebStructure.setKey(...) needs to be updated to accommodate this situation.

failed to issue token
java.lang.NullPointerException
        at com.ncipher.provider.km.KMKey.equals(KMKey.java:178) ~[nCipherKM.jar:?]
        at org.jose4j.jwx.JsonWebStructure.setKey(JsonWebStructure.java:203) ~[jose4j.jar:?]
        at ...

Comments (3)

  1. Log in to comment