gpt4 book ai didi

java - 由于 SSL 证书发送邮件失败,如何添加新证书或检查这是否真的是源错误?

转载 作者:太空宇宙 更新时间:2023-11-03 13:53:23 26 4
gpt4 key购买 nike

我是 ssl 证书的新手,一个月前在我们的服务器(规范低于 1.1)中,“发送邮件”服务停止工作。我查看了日志,似乎是 ssl 证书有问题(Trace below 1.2)

  • 1.1 服务器规范:jdk 1.4.2,jboss ga 4.0.2 windows server 2003
  • 1.2 跟踪:

    Caused by: javax.net.ssl.SSLHandshakeException:     sun.security.validator.ValidatorException: Certificate signature validation failed
    at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA12275)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
    at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
    at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
    at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA12275)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA12275)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
    at com.sun.net.ssl.internal.ssl.AppInputStream.read(DashoA12275)
    at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:97)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
    at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:75)
    at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1440)
    ... 36 more
    Caused by: sun.security.validator.ValidatorException: Certificate signature validation failed
    at sun.security.validator.SimpleValidator.engineValidate(SimpleValidator.java:137)
    at sun.security.validator.Validator.validate(Validator.java:202)
    at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(DashoA12275)
    at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(DashoA12275)
    ... 48 more
    Caused by: java.security.NoSuchAlgorithmException: 1.2.840.113549.1.1.11 Signature not available
    at java.security.Security.getEngineClassName(Security.java:672)
    at java.security.Security.getEngineClassName(Security.java:683)
    at java.security.Security.getImpl(Security.java:1132)
    at java.security.Signature.getInstance(Signature.java:169)
    at sun.security.x509.X509CertImpl.verify(X509CertImpl.java:425)
    at sun.security.x509.X509CertImpl.verify(X509CertImpl.java:383)
    at sun.security.validator.SimpleValidator.engineValidate(SimpleValidator.java:135)
    ... 51 more

引起我注意的是“签名不可用”,所以我检查并阅读了很多但似乎无法找到这个问题的根源,没有人对服务器证书或 java.security 文件进行任何更改,当我发送邮件时,似乎出现错误的代码也会出现。奇怪的是一切都在我的测试服务器上运行,但在我的生产服务器上却不行。

最佳答案

您正在尝试运行不支持 sha256 算法的 java1.4,

尝试 http://www.bouncycastle.org/latest_releases.html

或者移动到更新的 jdk 1.5/6 就可以了

关于java - 由于 SSL 证书发送邮件失败,如何添加新证书或检查这是否真的是源错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32487988/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com