-
Export your certified through firefox and save it with .cer extension.
-
Go to JDK certificates directory. Example:
/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/jre/lib/security
-
Type the following command on one line:
sudo keytool -import -alias example -keystore cacerts -file ~/your_cert.cer
-
For default passworld you can use: changeit
-
Now run keytool -list again to verify that your private root certificate was added:
keytool -list -keystore cacerts
You can run the following command to list the content of your keystore file (and alias name):
keytool -v -list -keystore cacerts
If you are looking for a specific alias, you can also specify it in the command:
keytool -list -keystore cacerts -alias foo
If the alias is not found, it will display an exception:
keytool error: java.lang.Exception: Alias does not exist
If a problem occurred during the PatchPro installation, you might just remove the certificates and import them again.
1. Become superuser.
2. Remove the previously imported certificates.
# keytool -delete -alias your_cert -keystore cacerts
Enter keystore password: changeit