【发布时间】:2014-05-07 05:28:45
【问题描述】:
我获得了*.ourdomain.example.org 的 PFX“通配符”SSL 证书(我相信它是 VeriSign 证书)。然后,我使用this answer 帮助我将 PFX 转换为 JKS 密钥库条目并将其添加到 JKS 密钥库中。当我运行keytool -list -keystore mykeys.jks 时,我看到了:
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 1 entry
<my key's long GUUID>, May 1, 2014, PrivateKeyEntry,
Certificate fingerprint (SHA1): <cert's fingerprint>
所以我知道转换后的 PFX 证书在那里。但在运行时,当 JNDI 使用 SSL 建立与我的 AD 服务器的连接(通过 LDAPS)时,我看到以下异常:
javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target
我想知道在从 PFX 到 JKS 的转换中是否出现了问题。我相当确定 SSL 证书没有其他问题,因为在使用此 PFX 之前我使用的是自签名证书,并且我的浏览器给了我典型的“我不信任此证书”警告。添加转换后的 PFX 并重新启动我的应用程序后,这些警告就消失了。关于这里可能发生什么的任何想法?
【问题讨论】:
-
服务器是否发送了所需的威瑞信中间证书?
openssl s_client -connect <server>:<port>的输出是什么?
标签: java ssl keystore keytool pfx