Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
install Java Cryptography Extensions (unlimited JCE)
# ABOUT: https://en.wikipedia.org/wiki/Java_Cryptography_Extension
# AUTHOR: gist.github.com/hangtwenty
# PREREQUISITE:
# Download jce_policy*.zip from Oracle:
# - Java 8: http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
# - Java 7: http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html
unzip $HOME/Downloads/jce_policy*.zip -d $HOME/Downloads/jce_policy_jars
jre_path="$JAVA_HOME/jre"
dest="$jre_path/lib/security"
if [ ! -d "$dest" ] ; then
echo "$dest is supposed to exist and be a directory"
exit 127
fi
for jar in $( find $HOME/Downloads/jce_policy_jars/ -name '*.jar' );
do echo "[.] installing $jar into $dest"
sudo cp $jar $dest
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.