I have tried the steps mentioned How to add bouncycastle to JBoss AS 7.1 for Wildfly 8.0.
But the following code is proving to be troublesome.
PKCS8EncryptedPrivateKeyInfo kp = (PKCS8EncryptedPrivateKeyInfo) keyPair; InputDecryptorProvider pkcs8dec = new JceOpenSSLPKCS8DecryptorProviderBuilder() .setProvider(new BouncyCastleProvider()) .build("somepass".toCharArray()); PrivateKeyInfo pko = kp.decryptPrivateKeyInfo(pkcs8dec);
On line#5, the following error pops up,
unable to read encrypted data: JCE cannot authenticate the provider BC
The same code works perfectly as a standalone app, but when deploying the same in a war, the above error appears.
Any solutions to fix this for Wildfly 8.0?
Thanks in advance.