Java Certificates

java

http://www.javacodegeeks.com/2014/07/java-keystore-tutorial.html
http://docs.oracle.com/javase/7/docs/technotes/tools/solaris/keytool.html
http://alvinalexander.com/java/java-using-keytool-list-query
https://www.digitalocean.com/community/tutorials/java-keytool-essentials-working-with-java-keystores
http://www.networking4all.com/en/support/ssl+certificates/manuals/java/java+based+webserver/keytool+commands/
http://alvinalexander.com/java/java-keytool-keystore-certificates
http://java67.blogspot.com/2012/09/keytool-command-examples-java-add-view-certificate-ssl.html
http://arunpc.com/2012/05/11/keytool-for-dummies/
http://docs.oracle.com/javase/tutorial/security/toolfilex/rstep1.html
http://docs.oracle.com/cd/E19316-01/820-2765/gdzea/index.html
http://docs.oracle.com/javase/6/docs/technotes/guides/security/certpath/CertPathProgGuide.html
http://blog.avisi.nl/2012/09/12/quick-way-to-retrieve-a-chain-of-ssl-certificates-from-a-server/comment-page-1/
http://lokeshtc.blogspot.com/2012/10/how-to-check-certificate-validity-using.html
http://www.websphereusergroup.org/pvnambiar/blog/2012/08/28/useful_keytool_commands_for_certificate_management

What is the default password for the Java keystore cacerts?

changeit

How to see a list of certificates that are in the Java certificate store / keystore?

  1. Launch the Windows Control Panel
  2. Click on Programs
  3. Click on Java
  4. Click on the Security tab
  5. Click on Certificates
  6. Select appropriate value for Certificate type
  7. Toggle between the User tab and the System tab

How to see a list of certificate that are in the Java certificate store using the keytool command?

  1. Determine where Java is installed. For example, c:\software\Java
  2. cd c:\software\Java\jre7\lib\security
  3. c:\software\Java\jre7\bin\keytool -keystore cacerts -list

How to import a certificate using the keytool command?

  1. c:\software\Java\jre7\bin\keytool -keystore cacerts -importcert -file c:\path\to\certificateFile -alias aliasName

How to delete a certificate from a Java certificate store using the keytool command?

keytool -delete -noprompt -alias aliasName -keystore keyStoreFile -storepass keystorePassword

How to print a certifcate?

keytool -printcert -v -file anycert.cer | more

How to display all the certificates in a keystore?

keytool -list -v | more 
keytool -list -keystore \j2sdk\jre\lib\security\cacerts | more

Is there any GUI tool to manage Java keystore?

How can we import the Fiddler Root Certificate into the Java keystore?

c:\dev\java\bin\keytool.exe -import -file c:\Users\Khai\Desktop\FiddlerRoot.cer -keystore FiddlerKeystore -alias Fiddler

The above command will ask you to provide a passphrase for the new keystore named FiddlerKeystore. Typically, Java should not need this passphrase for reading this keystore, but we will need this passphrase whenever we want to update this keystore.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License