Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

Integrating Bouncycastle 1.66 with AEM

Avatar

Level 7

Hi folks,

Just wondering if anyone tried this in 6.5. I wanted to use bcprov-jdk15on and bcpkix-jdk15on.

I read here that I have to add the jars into  in jre/lib/ext and add BouncyCastle as a provider in java security properties.

I also added each package that I wanted into sling.properties, (no wildcards), in org.osgi.framework.system.packages.extra

I thought that AEM would just accept them then. However, I then get osgi wiring error messages which I got rid of by 

adding them to my bundle pom.xml <Import-Package> but making them optional. However, then the wiring problems went away but I got NoClassDefFound error messages. I also tried <Embed-Dependency>*</Embed-Dependency>, but then I got some odd compile messages from the maven-bundle-plugin about "Classes Found in the wrong directory".  I tried adding sling.properties:sling.bootdelegation.class.org.bouncycastle.jce.provider.BouncyCastleProvider=org.bouncycastle.* to the sling properties without any success. I also don't know if I include the libraries in  ordinary dependencies section of the pom.xml or not. I'm new to osgi I'm afraid. Just wondering if anyone can describe a foolproof way of doing it.

thanks

Fiona

2 Replies

Avatar

Community Advisor

@fionas76543059,

This question seems to be an AEM Form's question. If you post this same question in the AEM Form's Forum, you will more likely find an answer from there, https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager-forms/ct-p/adobe-experienc...

Avatar

Level 7
Thanks Brian, I'm not actually currently developing with Forms, this is a custom App that has to do with integrating with another Java server. But I'll try there anyway!! thanks Fionas