每个SSLException的详细原因是什么?

时间:2014-08-04 09:54:24

标签: sslexception

问题是: (1)SSL异常有多少异常原因? (2)SSL例外是否有任何规范或文件?

我们都知道SSL Exception有很多类型,例如SSLException,SSLHandshakeException,SSLKeyException,SSLPeerUnverifiedException,SSLProtocolException等。 对于其中一个,有许多例外原因,下面是我从互联网上搜索过的一些: (1)SSLException     1)javax.net.ssl.SSLException:没有可用的证书或密钥对应于已启用的SSL密码套件。

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

(2)SSLHandshakeException     1)javax.net.ssl.SSLHandshakeException:收到致命警报:bad_certificate

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

0 个答案:

没有答案