gpt4 book ai didi

java - 过期的证书会产生 sun.security.validator.ValidatorException 错误吗?

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

我目前代表一位正在度假的同事。他负责的一个应用这几天一直报如下错误。

Error: IOException sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

我做了一些研究,发现它可能与在信任库中找不到的自签名证书有关。

但是之前我什么都没改,一切正常,会不会是证书过期了?过期的证书会产生这样的错误消息吗?如果是这样,我能否以某种方式从 keystore 文件中确定到期日期?

最佳答案

它看起来不像是过期的证书。基于this question过期的证书应该产生 CertPathValidatorException: timestamp check failed 消息,例如

qtp1735121130-17, handling exception: javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: PKIX path validation failed:
java.security.cert.CertPathValidatorException: timestamp check failed

可以看看How to Analyze Java SSL Errors文章看看你还能做什么,归结为使用 -Djava.net.debug 选项和分析日志。

我首先将信任库中的自签名证书与环境中实际使用的证书进行比较。自签名证书很容易发行,也许有人已经发行了新版本。

关于java - 过期的证书会产生 sun.security.validator.ValidatorException 错误吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57076196/

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