证书签名验证失败

时间:2016-01-29 19:16:34

标签: java validation amazon-web-services ssl

我的网站托管在亚马逊上。它建立在java 1.4.2_13的微软版本上。我注意到电子邮件没有出去。我没有对代码进行任何更改。我在亚马逊的网站上找到了this文件,并按照他们的指示查明我们的java环境没有通过测试。所以,我导入了新的ssl根证书。我可以验证它是否在密钥库中,但是当我运行shaTest并且仍然没有发送电子邮件时,我收到以下错误消息。任何帮助表示赞赏。谢谢!

Exception in thread "main" javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: Certificate signature validation failed
    at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.b(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect (Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at java.net.URLConnection.getContent(Unknown Source)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getContent(Unknown Source)
    at java.net.URL.getContent(Unknown Source)
    at ShaTest.main(ShaTest.java:11)
Caused by: sun.security.validator.ValidatorException: Certificate signature validation failed
    at sun.security.validator.SimpleValidator.engineValidate(Unknown Source)
    at sun.security.validator.Validator.validate(Unknown Source)
    at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
    at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(Unknown Source)
    ... 14 more
Caused by: java.security.NoSuchAlgorithmException: 1.2.840.113549.1.1.11 Signature not available
    at java.security.Security.getEngineClassName(Unknown Source)
    at java.security.Security.getEngineClassName(Unknown Source)
    at java.security.Security.getImpl(Unknown Source)
    at java.security.Signature.getInstance(Unknown Source)
    at sun.security.x509.X509CertImpl.verify(Unknown Source)
    at sun.security.x509.X509CertImpl.verify(Unknown Source)
    ... 18 more

1 个答案:

答案 0 :(得分:3)

Java本身在1.4.2中获得了SHA256支持,但微软Java可能没有 - 特别是因为它已经停止了很长时间。 You might be able to use bouncycastle

注意Java 1.4出现在 2002 中。那是14年前的事了。那应该是一个巨大的红旗;我不会在连接到互联网的任何机器上运行它。