Incorrect hashCode / equals implementation in JWK, RSAKey

Issue #346 new
Former user created an issue
  • In com.nimbusds.jose.jwk.JWK class the use of the field keyStore of type java.security.KeyStore which does not implements hashCode/equals induce incorrect hashCode/equals implementation in JWK, use instead KeyStore.getType() in place of keyStore directly.
  • In com.nimbusds.jose.jwk.RSAKey implementation of methods equals/hashCode is incorrect also as OtherPrimesInfo inner class does not implements equals/hashCode

Comments (3)

  1. hi bour

    Using of parsedX5c field in JWK#equalsand JWK#hashCode is not necessary as it’s calculated from field x5c

  2. Vladimir Dzhuvinov

    Will keep the keyStore by ref comparison for now. KeyStore.getType() doesn’t really return something that can work for identifying the key store.

  3. Log in to comment