Skip to content

Instantly share code, notes, and snippets.

@netoht
Created May 5, 2017 22:45
Show Gist options
  • Save netoht/0b8d088b198f7a5e577a212a4d4c07d6 to your computer and use it in GitHub Desktop.
Save netoht/0b8d088b198f7a5e577a212a4d4c07d6 to your computer and use it in GitHub Desktop.
Bouncy Castle Settings

Bouncy Castle Settings

  1. Copy the Bouncy Castle jar:
cp bcprov-jdk15on-156.jar $JAVA_HOME/jre/lib/ext/
  1. Bouncy Castle Provider Settings in java.security
vim $JAVA_HOME/jre/lib/security/java.security

# Add the line below:
security.provider.N=org.bouncycastle.jce.provider.BouncyCastleProvider
  1. Testing configuration
echo "import org.bouncycastle.jce.provider.BouncyCastleProvider;" > BouncyCastleProviderTest.java ; $JAVA_HOME/bin/javac BouncyCastleProviderTest.java ; if [ "$?" = 0 ]; then clear; echo "SUCCESS IN CONFIGURATION"; else echo "ERROR IN CONFIGURATION"; fi ; rm BouncyCastleProviderTest.*

# Possibles messages:
# SUCCESS IN CONFIGURATION
# or
# ERROR IN CONFIGURATION

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment