Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Integrating Bouncy Castle into AEM


Level 6

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, (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* 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.

I'm not actually currently developing with the Forms but I was pointed here as a place where there is more BC expertise....



0 Replies