What is difference between cacerts and keystore?

dimas picture dimas · Jul 30, 2013 · Viewed 131.9k times · Source

What's the difference between the two, cacerts and keystore?

If I use the definition found in these links, cacerts and keystore, it seems that they're a collection of certificates, but in context of a (Java) distributed system. Which one is used to authenticate during an SSL connection? Both or just one of them or alternate?

Answer

Marquis of Lorne picture Marquis of Lorne · Jul 30, 2013

'cacerts' is a truststore. A trust store is used to authenticate peers. A keystore is used to authenticate yourself.