我即将更新/添加Java证书到MacOS中的证书列表。
为了知道要添加的'cacerts'文件 - 运行此命令:
sudo find / -iname "*cacerts*" 2> /dev/null
这是一个结果:
/Applications/DataGrip.app/Contents/jdk/Contents/Home/jre/lib/security/cacerts
/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/security/cacerts
/Applications/IntelliJ IDEA.app/Contents/jdk/Contents/Home/jre/lib/security/cacerts
/Applications/NetBeans/glassfish-4.1.1/glassfish/domains/domain1/config/cacerts.jks
/Applications/zoom.us.app/Contents/Resources/zcacert.pem
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/security/cacerts
/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/security/cacerts
/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/jre/lib/security/cacerts
/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/security/cacerts
/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/security/cacerts
/Library/Java/JavaVirtualMachines/jdk1.8.0_141.jdk/Contents/Home/jre/lib/security/cacerts
/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/jre/lib/security/cacerts
/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/jre/lib/security/cacerts
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/excon-0.54.0/data/cacert.pem
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/google-api-client-0.8.7/lib/cacerts.pem
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient/cacert.pem
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient/cacert1024.pem
/opt/chefdk/embedded/ssl/certs/cacert.pem
/opt/chefdk/LICENSES/cacerts-README.md
/opt/vagrant/embedded/cacert.pem
/opt/vagrant/embedded/gems/gems/httpclient-2.8.3/lib/httpclient/cacert.pem
/opt/vagrant/embedded/gems/gems/httpclient-2.8.3/lib/httpclient/cacert1024.pem
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/test/pycacert.pem
/System/Library/Java/Support/CoreDeploy.bundle/Contents/Home/lib/security/cacerts
/System/Library/Java/Support/Deploy.bundle/Contents/Home/lib/security/cacerts
/Users/user1/java/certificates/add_capitalone_cacert.sh
/Users/user1/java/certificates/cacerts
/Users/user1/Library/Caches/IdeaIC2017.1/tasks/cacerts
/Users/user1/Library/Caches/IdeaIC2017.2/tasks/cacerts
/Users/user1/Library/VirtualBox/vbox-ssl-cacertificate.crt
如何知道我应该添加哪一个?
(我正在使用InteliJ IDE进行开发,但不确定是否应使用该路径/Applications/IntelliJ IDEA.app/...
来存储)
答案 0 :(得分:1)
这取决于哪个JDK / JRE Intellij正在使用。 cacerts文件通常位于JAVA_HOME / jre / lib / security下。我们为内部签名的证书更新此商店。
答案 1 :(得分:1)
在Intellij IDE中编写一个简单的测试类,以打印出它正在使用的版本。用它来打印路径......
的System.out.println(System.getProperty(" java.home&#34));