-
Notifications
You must be signed in to change notification settings - Fork 1
Import ca.crt as a trusted certificate on OS X
###Change to CA working directory
goconf
cd static-content/localhost/cert.metadatacenter.orgx
###Locate the cacert file
Find out the currently active java version:
java -version
####Locate cacerts file
Locate the corresponding cacert file, based on the Java version (pick the cacerts that has the proper Java version in its path):
locate cacerts
You will need an up-to-date locate index for this to run. If you encounter the following error message:
WARNING: The locate database (/var/db/locate.database) does not exist.
To create the database, run the following command:
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist
Please be aware that the database can take some time to generate; once
the database has been created, this message will no longer appear.
then you should create the index as follows (and wait until it is built; it is a background task, you won't be notified about its completion):
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist
####Alternative way of locating the cacerts file
sudo find / -type f -name cacerts
###Import root cert
sudo keytool -import -alias metadatacenter.orgx -keystore /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/security/cacerts -file ./ca-metadatacenter.orgx.crt
The password should be changeit
###Useful, if mistakes were made
If you imported the wrong file, or you imported the proper file into the wrong certificate store, you can delete it using:
keytool -delete -noprompt -alias metadatacenter.orgx -keystore /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/security/cacerts
If you wan to see the list of certificates in a store, you can use:
keytool -list -keystore /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/security/cacerts