Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
621 views
in Technique[技术] by (71.8m points)

macos - How to install unlimited strength JCE for Java 8 in OS X?

I need to install the Java Cryptography Extension for Java 8 in OS X / mac OS. It turns out the steps from the README file which came with the installer include instructions only for Unix and Windows, but not for OS X / mac OS. I tried to put the JAR files in $JAVA_HOME/lib/security, but it didn't work either. Do you know how can I install them?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Java 8 Update 161

As pointed out in another answer and in Oracle's release notes for Java 8 Update 161, unlimited cryptography is enabled by default since Update 161 and you shouldn't have to do anything if using a fresh installation of this version or higher.

Java 8 Update 151

With Java 8 Update 151, Oracle included the same JCE mechanism into Java 8 that they already provided with Java 9. To enable JCE in Java 8 Update 151 or higher, just set the property

crypto.policy=unlimited

in $JAVA_HOME/jre/lib/security/java.security.

It's probably a good idea to remove the old policy JAR's if they were added earlier, as Oracle states in the release notes:

Because the old JCE jurisdiction files are left in /lib/security, they may not meet the latest security JAR signing standards, which were refreshed in 6u131, 7u121, 8u111, and later updates.

Older Versions

Answers suggesting to install the JCE files via Homebrew won't work anymore, as the casks were deleted from the Homebrew repository after release of the Java 8 Update 151. If using an older version of Java 8, you'll have to put the JCE-Policy-JAR manually as described in another answer.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...