它看起来像一个标准问题,但我无法在任何地方找到明确的方向.
我有java代码尝试连接到可能具有自签名(或过期)证书的服务器.代码报告以下错误:
[HttpMethodDirector] I/O exception (javax.net.ssl.SSLHandshakeException) caught
when processing request: sun.security.validator.ValidatorException: PKIX path
building failed: sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target
Run Code Online (Sandbox Code Playgroud)
据我了解,我必须使用keytool并告诉java允许这种连接是可以的.
解决此问题的所有说明都假设我完全熟练使用keytool,例如
为服务器生成私钥并将其导入密钥库
有没有人可以发布详细说明?
我正在运行unix,所以bash脚本最好.
不确定它是否重要,但代码是在jboss中执行的.