Results 1 to 1 of 1
- 02-26-2009, 11:55 AM #1
Member
- Join Date
- Feb 2009
- Location
- Spain
- Posts
- 1
- Rep Power
- 0
Error: JCE cannot authenticate the provider BC
Hi all,
I'm developing a part of a J5EE application which signs emails.
I have a PKCS12 keystore, which contains a keypair. I'm using Bouncy Castle's libraries to manage the keystore and so on...
I'm using Tomcat 5.5 as well.
I've edited java.security and added the BouncyCastle provider as follows:
security.provider.6=org.bouncycastle.jce.provider. BouncyCastleProvider
And also added the jars bcprov-jdk15-141.jar and bcprov-ext-jdk15-141.jar to %JAVA_HOME%/lib/ext
In my java class I load the keystore:
EncryptionUtils smimeUtils = EncryptionManager.getEncryptionUtils(EncryptionMan ager.SMIME);
EncryptionKeyManager smimeKeyMgr = smimeUtils.createKeyManager();
File keystoreFile = new File(keystoreLocation);
FileInputStream keystoreFIS = new FileInputStream(keystoreFile);
smimeKeyMgr.loadPrivateKeystore(keystoreFIS, smimePass);
the last sentence throws an exception that goes like:
java.io.IOException: error constructing MAC: java.security.NoSuchProviderException: JCE cannot authenticate the provider BC
at org.bouncycastle.jce.provider.JDKPKCS12KeyStore.en gineLoad(Unknown Source)
at java.security.KeyStore.load(KeyStore.java:1185)
at net.suberic.crypto.bouncycastle.BouncySMIMEEncrypt ionKeyManager.loadPrivateKeystore(BouncySMIMEEncry ptionKeyManager.java:107)
I have no idea why this is happening, I've googled the exception but I can't get an answer that fixes the problem for me, any ideas?
Similar Threads
-
Diference Between compiler error Garbage collection and Runtime Error?
By makpandian in forum New To JavaReplies: 3Last Post: 01-23-2009, 08:53 AM -
error 530 error authentication required
By rgale in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 05-12-2008, 04:28 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks