Our application uses Bouncycastle. I am now attempting to deploy my app on websphere liberty profile and getting the below error
[err] java.io.IOException: error constructing MAC: java.lang.SecurityException: JCE cannot authenticate the provider BC
[err] at org.bouncycastle.jce.provider.JDKPKCS12KeyStore.engineLoad(Unknown Source)
[err] at java.security.KeyStore.load(KeyStore.java:1214)
[err] at com.manh.jwt.JwtKeyManager.loadPrivateKeyByIssuer(JwtKeyManager.java:213)
So instead of having the bouncycastle jar in WEB-INF/lib dir, i created a shared lib and added this library as a privateLibraryRef to my web application. I still get the same error.
Here is my server.xml for your reference.
<server description="new server">
<!-- Enable features -->
<featureManager>
<feature>jsp-2.2</feature>
<feature>servlet-3.0</feature>
</featureManager>
<webContainer deferServletLoad="false" />
<httpEndpoint id="defaultHttpEndpoint"
host="localhost"
httpPort="20000"
httpsPort="9443" />
<library id="configResources">
<folder dir="${server.config.dir}/conf" />
</library>
<library id="bc">
<fileset dir="${server.config.dir}/bclib" includes="*.jar" />
</library>
<webApplication name="scope" location="scope.war" contextRoot="/">
<classloader privateLibraryRef="configResources, bc" />
</webApplication>
</server>
Is there any other setting that i can try to have this working?