-
1. Re: JCE cannot authenticate the provider BC
jaikiran Aug 5, 2011 7:22 AM (in response to rhinmass)1 of 1 people found this helpfulLooks related to https://issues.jboss.org/browse/JBAS-7882 and https://issues.jboss.org/browse/AS7-308
-
2. Re: JCE cannot authenticate the provider BC
rhinmass Aug 5, 2011 8:06 AM (in response to jaikiran)Any ideas as to a workaround for this problem. The work arounds described in JBAS-7882 are:
1. move the IAIK library from the ear/war structure to server lib directory, or
2. expand the ear/war structure in the server deploy directory, or
3. run the server with property jboss.vfs.forceVfsJar set to true to switch to old jar file handling mechanism (however this old mechanism seems to have some sort of resource leak - it leaves all temporary jar instances it creates in the temporary directory even after clean server shutdown)
However, I don't believe these options are applicable to AS7.
Would I need to create a module for bcprov-jdk15-136.jar ?
-
3. Re: JCE cannot authenticate the provider BC
jaikiran Aug 5, 2011 8:16 AM (in response to rhinmass)Robin Hughes wrote:
Any ideas as to a workaround for this problem. The work arounds described in JBAS-7882 are:
2. expand the ear/war structure in the server deploy directory, or
This might be worth a try against AS7. Have you tried deploying your application in exploded format? All you have to do is place the webapp.war in exploded form in JBOSS_HOME/standalone/deployments folder and also a webapp.war.dodeploy marker file to trigger the deployment of the exploded content.
-
4. Re: JCE cannot authenticate the provider BC
rhinmass Aug 5, 2011 8:59 AM (in response to rhinmass)This is running from an exploded war.
-
5. Re: JCE cannot authenticate the provider BC
jaikiran Aug 5, 2011 9:24 AM (in response to rhinmass)Robin Hughes wrote:
This is running from an exploded war.
Thanks for testing that.
-
6. Re: JCE cannot authenticate the provider BC
rhinmass Aug 5, 2011 9:29 AM (in response to jaikiran)I think you might have misunderstood my answer. I have been running from an exploded war all along, and the problem exists.
Do you have any other thoughts for work-arounds? And do you think this fix will be in Alpha1 scheduled for Aug 24?
Thanks!!
-
7. Re: JCE cannot authenticate the provider BC
jaikiran Aug 5, 2011 10:40 AM (in response to rhinmass)Robin Hughes wrote:
I think you might have misunderstood my answer. I have been running from an exploded war all along, and the problem exists.
Ah! I see.
Robin Hughes wrote:
Do you have any other thoughts for work-arounds? And do you think this fix will be in Alpha1 scheduled for Aug 24?
I'm not aware of any workarounds. I'll check with David and see if we can have a fix for this in one of the upcoming releases.
-
8. Re: JCE cannot authenticate the provider BC
dmlloyd Aug 5, 2011 11:44 AM (in response to jaikiran)Yeah this is definitely https://issues.jboss.org/browse/AS7-308 taking effect. I at least want this fixed for 7.1 if not sooner.
-
9. Re: JCE cannot authenticate the provider BC
madab Feb 7, 2012 5:49 AM (in response to rhinmass)Hi,
A few days ago I started migrating a webapp from jboss 4 to jboss 7. I downloaded the latest version (7.1.0.CR1b), and I have the same error in my log.
I see that the related ticked is fixed. Is there an option or a configuration that I have to make to solve this exception?
Thanks in advance,
Madalina
-
10. Re: JCE cannot authenticate the provider BC
jehanzeb.qayyum Mar 11, 2012 7:43 AM (in response to madab)What are the steps of workaround in Jboss AS 7.1.0Final? Thanks
-
11. Re: JCE cannot authenticate the provider BC
oman002 May 10, 2012 7:26 PM (in response to jehanzeb.qayyum)This workaround in JBoss AS 7.1.1 Final worked for me - How to add bouncycastle to JBoss AS 7.1
When migrating an older app make sure you are using bcprov-jdk16 and not the older jdk versions as JBoss 7 uses jdk 1.6+
-
12. Re: JCE cannot authenticate the provider BC
robcob_mc Aug 29, 2019 6:44 AM (in response to rhinmass)We have been suffering with the same issue for a few weeks and had tried a lot of the suggested steps to no avail. Providing our solution below so others don't have to suffer like we did!
We were attempting to use bcprov-ext-jdk15on-162.jar, added to classpath, included in JBoss lib directories, bundled with WAR, marked as provided and added to JBoss /lib directories but no luck. We were also using JBoss version ~5 eap.
In the end, we tried different versions of bouncycastle and found a less recent version who's signature could be verified by our particular Java version's jarsigner (1.5X).
Despite the jar's signature being verifiable by our Java version, when the .jar is packaged into a WAR the signature was invalidated somehow by JBoss.
In the end, the solution for us was to;
1. Add bouncycastle jar to JBoss classpath
2. Add 'org.bouncycastle.jce.provider.BouncyCastleProvider' to 'java.security' providers
3. Mark bouncycastle in your WAR as a 'provided' dependencyOnce we had a version of the .jar on our classpath and were sure that our WAR was not packaging it in we were golden.
The issue seems to be tightly coupled to whatever Java/JBoss version you happen to be using. So if this solution does not work for you I would suggest to test different versions of bouncycastle with
jarsigner -verify <bouncycastle.jar>