java 我什么时候得到 javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: 找不到可信证书

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/33196335/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-02 21:20:23  来源:igfitidea点击:

When do I get javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found

javasslaxisjsse

提问by G G

I implemented trust store using SSLConnectionSocketFactory. In my client (which uses axis to talk to server), I am getting the following error when calling connectSocket(). In which cases I get this error?

我使用SSLConnectionSocketFactory. 在我的客户端(使用轴与服务器通信)中,调用connectSocket(). 在哪些情况下我会收到此错误?

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found

javax.net.ssl.SSLHandshakeException:sun.security.validator.ValidatorException:未找到受信任的证书

回答by Seb B.

You get that exception when the RootCA, the Intermediate-CA or the whole CA-chain is missing. This post might help you solve your problem: SSLHandshakeException

当 RootCA、中间 CA 或整个 CA 链丢失时,您会收到该异常。这篇文章可能会帮助您解决问题:SSLHandshakeException