Understanding X509TrustManager

How do checkClientTrusted and checkServerTrusted work? If it enters either of those methods and it is NOT trusted, how does it know that? If it trusted, then what does it do (or supposed to do in implementation).Also, when do these methods get invoked?-Avinash
[281 byte] By [aramanaa] at [2007-11-26 14:35:27]
# 1

It's supposed to be connected to a truststore, and it looks up the certificate in that truststore. If not there, and it can't build a trust chain as described in the Javadoc, it returns false.

checkClientTrusted is called by a server during the handshake. checkServerTrusted is called by a client during the handshake. getAcceptedIssuers is called by both at the beginning of the handshake.

ejpa at 2007-7-8 8:16:17 > top of Java-index,Security,Java Secure Socket Extension (JSSE)...