- Check a stand-alone certificate: keytool -printcert -v -file mydomain.
- Check which certificates are in a Java keystore: keytool -list -v -keystore keystore.
- Check a particular keystore entry using an alias:
.
Subsequently, one may also ask, how do I check if a Keytool certificate is valid?
Java Keytool Commands for Checking
- Check a stand-alone certificatekeytool -printcert -v -file mydomain.crt.
- Check which certificates are in a Java keystorekeytool -list -v -keystore keystore.jks.
- Check a particular keystore entry using an aliaskeytool -list -v -keystore keystore.jks -alias mydomain.
One may also ask, how do I import a certificate using Keytool? Run the Java keytool command to import the certificate into the keystore.
- Open a command prompt and change to the following directory: <location> injre6.0in.
- Run the following command line.
- Enter yes when prompted to trust or add the certificate.
Considering this, how do you view Cacert?
To view the entries in a cacerts file, you can use the keytool utility provided with Sun J2SDK versions 1.4 or later. The following example uses the -list command to display the CA certificates in the cacerts file.
Where is Keytool located?
keytool is a tool to manage key and certificates. It is provided with any standard JDK distribution and can be located in %JAVA_HOME%in . For me it turned out to be in c/Program Files/Java/jdk1. 7.0_25/bin (Windows 8).