【问题标题】:unable to find valid certification path to requested target(sun.security.provider.certpath.SunCertPathBuilderException: )无法找到请求目标的有效证书路径(sun.security.provider.certpath.SunCertPathBuilderException: )
【发布时间】:2013-12-23 05:59:07
【问题描述】:

我有一个部署在 worklight V6.0 上的 worklight 应用程序,尝试访问 LDAP 服务器进行身份验证...并尝试为应用程序启用 https。

我遇到了例外情况。

javax.naming.CommunicationException: sun.security.validator.ValidatorException:PKIX 路径构建失败: sun.security.provider.certpath.SunCertPathBuilderException:无法 找到请求目标的有效认证路径

[根异常是 javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException:PKIX 路径构建失败: sun.security.provider.certpath.SunCertPathBuilderException:无法 找到请求目标的有效认证路径];剩下的名字 'ou=bluepages,o=ibm.com'

引起:javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException:PKIX 路径构建失败: sun.security.provider.certpath.SunCertPathBuilderException:无法 找到请求目标的有效认证路径

原因:sun.security.provider.certpath.SunCertPathBuilderException: 无法找到请求目标的有效认证路径

请提出建议。

谢谢

【问题讨论】:

    标签: ibm-mobilefirst worklight-server worklight-security


    【解决方案1】:

    看起来 LDAP 服务器由自签名密钥保护,而 worklight 密钥库没有其公共证书。 检查 worklight.properties 文件中“ssl.keystore.*”定义的密钥库,如果需要,将 LDAP 证书导入密钥库。

    【讨论】:

    • 对不起,不是这个密钥库,它是用于适配器后端连接的。您需要检查运行 worklight 的机器上的默认 java keystore 或 OS kestore。
    • 感谢您的回复和更新。管理员通过将证书导入密钥库解决了问题。
    【解决方案2】:

    对我有用的解决方案:

    使用keytool 命令在正确的jre 文件夹中安装证书。我的 Eclipse 使用 jre 执行,之前我将证书安装在 jdk 文件夹中。

    keytool -import -trustcacerts -keystore "C:\Program Files\Java\jre1.8.0_192\lib\security\cacerts" -storepass changeit -alias LDAPRoot -import -file "xxxxxxxx.cer
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-01-03
      • 2022-06-14
      • 2016-11-20
      • 2020-06-15
      • 2017-04-22
      • 2013-02-03
      • 1970-01-01
      相关资源
      最近更新 更多