org.jose4j.lang.JoseException: Unable to get an implementation of algorithm name

Issue #69 invalid
Ricardo Leon created an issue

DEBUG org.jose4j.jws.RsaUsingShaAlgorithm$RsaPssSha256 - PS256 vai SHA256withRSAandMGF1 is NOT available from the underlying JCE (org.jose4j.lang.JoseException: Unable to get an implementation of algorithm name: SHA256withRSAandMGF1; caused by: java.security.NoSuchAlgorithmException: SHA256withRSAandMGF1 Signature not available).

Got this exception while running this example [JWT example] https://bitbucket.org/b_c/jose4j/wiki/JWT%20Examples

I'm trying to integrate jwt tokens for a Jersey REST web service Any suggestions?

Comments (7)

  1. Brian Campbell repo owner

    It's just an informational log message saying that the JWS algorithm "PS256" isn't available because the underlying JCA provider doesn't support RSASSA-PSS. There's probably a similar message for PS384 and PS512. Those JWS algorithms are rarely used, however, so it shouldn't be an issue.

  2. Robin Morris

    SHA256withRSAandMGF1 is allegedly supported in JDK11 https://docs.oracle.com/en/java/javase/11/security/oracle-providers.html#GUID-17E3589E-E4BA-4881-9B12-9880DD2D128D)

    but when listing Providers and Signature algorithms this is all that comes up:

    SUN : SHA1withDSA
    SUN : NONEwithDSA
    SUN : SHA224withDSA
    SUN : SHA256withDSA
    SUN : SHA1withDSAinP1363Format
    SUN : NONEwithDSAinP1363Format
    SUN : SHA224withDSAinP1363Format
    SUN : SHA256withDSAinP1363Format
    SunRsaSign : MD2withRSA
    SunRsaSign : MD5withRSA
    SunRsaSign : SHA1withRSA
    SunRsaSign : SHA224withRSA
    SunRsaSign : SHA256withRSA
    SunRsaSign : SHA384withRSA
    SunRsaSign : SHA512withRSA
    SunRsaSign : SHA512/224withRSA
    SunRsaSign : SHA512/256withRSA
    SunRsaSign : RSASSA-PSS
    SunEC : NONEwithECDSA
    SunEC : SHA1withECDSA
    SunEC : SHA224withECDSA
    SunEC : SHA256withECDSA
    SunEC : SHA384withECDSA
    SunEC : SHA512withECDSA
    SunEC : NONEwithECDSAinP1363Format
    SunEC : SHA1withECDSAinP1363Format
    SunEC : SHA224withECDSAinP1363Format
    SunEC : SHA256withECDSAinP1363Format
    SunEC : SHA384withECDSAinP1363Format
    SunEC : SHA512withECDSAinP1363Format
    SunJSSE : MD2withRSA
    SunJSSE : MD5withRSA
    SunJSSE : SHA1withRSA
    SunJSSE : MD5andSHA1withRSA
    SunMSCAPI : NONEwithRSA
    SunMSCAPI : SHA1withRSA
    SunMSCAPI : SHA256withRSA
    SunMSCAPI : SHA384withRSA
    SunMSCAPI : SHA512withRSA
    SunMSCAPI : RSASSA-PSS
    SunMSCAPI : MD5withRSA
    SunMSCAPI : MD2withRSA

  3. Log in to comment