java.lang.IllegalArgumentException: RSA signatures must be computed using an RSAPrivateKey. The specified key of type sun.security.mscapi.RSAPrivateKey is not an RSAPrivateKey.

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Windows RSAPrivateKey (MSCAPI)
    via GitHub by x2on
    ,
    • java.lang.IllegalArgumentException: RSA signatures must be computed using an RSAPrivateKey. The specified key of type sun.security.mscapi.RSAPrivateKey is not an RSAPrivateKey. at io.jsonwebtoken.impl.crypto.RsaSigner.<init>(RsaSigner.java:34) at io.jsonwebtoken.impl.crypto.DefaultSignerFactory.createSigner(DefaultSignerFactory.java:43) at io.jsonwebtoken.impl.crypto.DefaultJwtSigner.<init>(DefaultJwtSigner.java:37) at io.jsonwebtoken.impl.crypto.DefaultJwtSigner.<init>(DefaultJwtSigner.java:32) at io.jsonwebtoken.impl.DefaultJwtBuilder.createSigner(DefaultJwtBuilder.java:339) at io.jsonwebtoken.impl.DefaultJwtBuilder.compact(DefaultJwtBuilder.java:321)
    No Bugmate found.