Java67 - Java Program Example Tutorial Blog

Java67 - Java Program Example Tutorial Blog


trustStore vs keyStore in Java SSL

Posted: 12 Dec 2012 05:06 AM PST

Main difference between trustStore vs keyStore is that trustStore (as name suggest) is used to store certificates from trusted Certificate authorities(CA) which is used to verify certificate presented by Server in SSL Connection while keyStore is used to store private key and own identity certificate which program should present to other party (Server or client) to verify its identity. That was one liner difference between trustStore vs  keyStore in Java but no dobut these two terms are quite confusion not just for any one who is first time doing SSL connection in Java but also many intermediate and senior level programmer. One reason of this could be SSL setup being one time job and not many programmers gets opportunity to do that. In this Java article we will explore both keystore and truststore and understand key differences between them. By the way you can use keytool command to view certificates from truststore and keystore. keytool command comes with Java installation and its available in bin directory of JAVA_HOME.
Read more »


Post a Comment