Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

How to use the MSCAPI private key to decrypt SAML assertion?

user-ica3oAug 2 2023

I am storing my private key in the Windows store (MMC) and trying to read it to decrypt SAML assertion, but facing an error "java.security.InvalidKeyException: No installed provider supports this key: sun.security.mscapi.RSAPrivateKey". I am using Oracle Java 1.8 version . The SunMSCAPI provider is present in providers list java.security file as well. I wanted to know if it is possible to use the private key read from the MMC to validate/decrypt a token or is it restricted. If yes, please share the steps on how to do it. I have already tried to explicitly cast it to java.security.interfaces.RSAPublicKey and failed to do so.

Comments
Post Details
Added on Aug 2 2023
0 comments
317 views