We have been attempted to use the bouncycastler pgp and jce provider jar files in AS Java stack.
There were no problems using the bouncycastle pgp library which is a client of the standard java security apis.
Attempting to use the bouncycastle jce provider apis directly in the ear file
-As a shared library
-as a bundled library
all resulted in exceptions of the following form
java.lang.IllegalStateException: Usage of an unregistered loader. This loader has been unregistered and is not supposed to be used anymore. All the references to it had to be removed before unregistering
Loader name - com.sap/SecurityEAR
Loader hash code - 529bfb12
at org.bouncycastle.jce.provider.JDKDigestSignature.engineInitSign(Unknown Source)
(These are the bouncycastle jce provider apis)
(These are the java security apis)
(These are the bouncycastle PGP library)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Thre is a description here of the classloading mechanism in SAP with a specific reference to this exception.
We have been able to use the bouncycastle jce provider jar by including it on the bootclasspath of the jvm.
However this solution is problematic as it is impacts the whole jvm rather than being isolated to a single application/library/service.
The question we want answered ideally is what steps are required to use a third party jce provider in AS Java stack.???
If there is no mechanism other than the bootclasspath approach we have determined does work, is this solution supported by SAP.???