当我尝试在 weblogic 中调用 https 服务调用时出现 ssl 握手失败。我已将服务器证书添加到 weblogic 信任库-“cacerts”中。
用于在 weblogic 启动脚本中添加信任库的命令:
JAVA_OPTIONS="-Dweblogic.security.SSL.trustedCAKeyStore="/weblogic92/server/lib/cacerts" ${JAVA_OPTIONS}"
导出 JAVA_OPTIONS
我还缺少其他任何东西 - 任何解决此问题的指针?
使用 SSLPoke.java 测试了应用服务器框中的 ssl 连接,它是成功的。
java -Djavax.net.ssl.trustStore=/weblogic92/server/lib/cacerts
-Djavax.net.ssl.trustStorePassword=changeit SSLPoke 192.16.2.6 8443
Weblogic 服务器日志跟踪:
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
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1628)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:230)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:224)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1027)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:120)
at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:574)
at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:510)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:888)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1117)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:629)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)