Java 为Websphere MQ使用Weblogic密钥库
我配置了自定义标识密钥库和自定义信任密钥库。配置正确,因为在日志中我可以看到:Java 为Websphere MQ使用Weblogic密钥库,java,jakarta-ee,ssl,weblogic,ibm-mq,Java,Jakarta Ee,Ssl,Weblogic,Ibm Mq,我配置了自定义标识密钥库和自定义信任密钥库。配置正确,因为在日志中我可以看到: Loading the identity certificate and private key stored under the alias wlserver from the jks keystore file C:\home\dev\keystore Loading trusted certificates from the jks keystore file C:\home\dev\truststore 在
Loading the identity certificate and private key stored under the alias wlserver from the jks keystore file C:\home\dev\keystore
Loading trusted certificates from the jks keystore file C:\home\dev\truststore
在部署的应用程序中,我有一个MDB,它通过JMS使用安全通道读取MQ中的消息。SSL调试日志显示在建立连接时使用了错误的密钥库
<Jul 5, 2013 5:04:01 PM CEST> <Notice> <Stdout> <BEA-000000> <trustStore provider is :>
<Jul 5, 2013 5:04:01 PM CEST> <Notice> <Stdout> <BEA-000000> <trustStore type is : jks>
<Jul 5, 2013 5:04:01 PM CEST> <Notice> <Stdout> <BEA-000000> <init truststore>
<Jul 5, 2013 5:04:01 PM CEST> <Notice> <Stdout> <BEA-000000> <trustStore is: C:\home\projects\jdk\jre\lib\security\cacerts>
<Jul 5, 2013 5:04:01 PM CEST> <Notice> <Stdout> <BEA-000000> <init keymanager of type SunX509>
<Jul 5, 2013 5:04:01 PM CEST> <Notice> <Stdout> <BEA-000000> <init keystore>
<Jul 5, 2013 5:04:01 PM CEST> <Notice> <Stdout> <BEA-000000> <keyStore provider is :>
如果我通过指定-Djavax.net.ssl.trustStore-Djavax.net.ssl.keyStore-Djavax.net.ssl.keystrepassword
启动weblogic,则安全MDB连接可以工作
我应该如何配置Weblogic以便部署的应用程序使用Weblogic密钥库?从服务器设置的角度来看: 如果密钥库由
-Dweblogic.security.SSL.trustedCAKeyStore
命令行参数指定,则始终从该密钥库加载受信任的CA证书。此参数首先由weblogic检查。我们把它放在startweblog.cmd文件中
您是使用托管服务器和管理服务器运行,还是仅使用管理服务器?制作
确保所有服务器都在Keystores选项卡上设置了标识和信任路径(自定义标识、自定义信任)
正在加载的不正确密钥库是JRE提供的默认“demo”
从服务器上运行的应用程序的角度来看: 您可以在命令行上执行操作,也可以通过在应用程序中通过
System.setProperty(“javax.net.ssl.trustStore”,trustPath)
您还可以设置ssl.properties文件,然后将其馈送到应用程序,如:
-Dssl.properties=$HOME/.keystore/ssl.properties
您可以在这里找到一个示例ssl.properties文件:但我确信还有更多/更好的示例。我将使用
ssl.properties
方法。谢谢