JavaMail

http://www.oracle.com/technetwork/java/faq-135477.html#debug

http://www.ece.uic.edu/~cpress/jmx/

SSL:

In SSL handshake purpose of trustStore is to verify credentials and purpose of keyStore is to provide credential.

keyStore in Java stores private key and certificates corresponding to there public keys and require if you are SSL Server or SSL requires client authentication.

TrustStore stores certificates from third party, your Java application communicate or certificates signed by CA(certificate authorities like Verisign, Thawte, Geotrust or GoDaddy) which can be used to identify third party.

TrustManager determines whether remote connection should be trusted or not i.e. whether remote party is who it claims to and KeyManager decides which authentication credentials should be sent to the remote host for authentication during SSL handshake.

If you are an SSL Server you will use private key during key exchange algorithm and send certificates corresponding to your public keys to client, this certificate is acquired from keyStore. On SSL client side, if its written in Java, it will use certificates stored in trustStore to verify identity of Server. SSL certificates are most commonly comes as .cer file which is added into keyStore or trustStore by using any key management utility e.g. keytool.

http://www.blogjava.net/tbwshc/archive/2012/07/13/383009.htmlhttp://www.blogjava.net/tbwshc/archive/2012/07/13/383009.html

原文地址:https://www.cnblogs.com/diyunpeng/p/3374758.html