title: What are the detail reasons for every SSLException
body: <p>the questions are:
  (1) How many exception reasons that SSL Exception has?
  (2) Are there any specifications or documents for SSL Exception?</p>
  
  <p>We all know that SSL Exception has many types, such as SSLException, SSLHandshakeException, SSLKeyException,SSLPeerUnverifiedException,SSLProtocolException, etc.
  for one of them, there are many exception reasons, below are some of them that I searched from internet:
  (1) SSLException
      1)  javax.net.ssl.SSLException: No available certificate or key corresponds to the SSL cipher suites which are enabled.</p>
  
  <pre><code>2)  javax.net.ssl.SSLException: Not trusted server certificate Caused by:
      java.security.cert.CertificateException:
          java.security.cert.CertPathValidatorException: TrustAnchor for CertPath not found.
  
  3)  javax.net.ssl.SSLException: No available certificate or key corresponds to the SSL cipher suites which are enabled.
  
  4)  javax.net.ssl.SSLException:
      java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException:
          the trustAnchors parameter must be non-empty
  
  5)  javax.net.ssl.SSLException: Invalid padding
  </code></pre>
  
  <p>(2) SSLHandshakeException
      1)  javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate</p>
  
  <pre><code>2)  javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Untrusted Server Certificate Chain
  
  3)  javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
  
  4)  java.net.SocketException: Default SSL context init failed: Keystore was tampered with, or password was incorrect
  
  5)  javax.net.ssl.SSLHandshakeException:
          sun.security.validator.ValidatorException: PKIX path building failed:
              sun.security.provider.certpath.SunCertPathBuilderException:
                  unable to find valid certification path to requested target
  </code></pre>