【发布时间】:2023-04-03 02:48:01
【问题描述】:
我正在使用 ActiveMQ 5.14 我的 ssl 配置是:
<sslContext>
<sslContext keyStore="file:${activemq.base}/conf/keystore/activemq/activemq.bcfks" keyStorePassword="password" keyStoreType="BCFKS"
trustStore="file:${activemq.base}/conf/keystore/activemq/cacerts.bcfks" trustStorePassword="password" trustStoreType="BCFKS" />
</sslContext>
我们的 JVM 配置为 FIPS 模式:
security.provider.4=com.safelogic.cryptocomply.jcajce.provider.CryptoComplyFipsProvider
security.provider.5=com.sun.net.ssl.internal.ssl.Provider CCJ
如果 FIPS 模式处于 ActiveMQ 启动失败并出现错误:
Error creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in class path resource [activemq.xml]: Invocation of init method failed; nested exception is java.io.IOException: Transport Connector could not be registered in JMX: java.io.IOException: FIPS mode: SecureRandom must be from provider CCJ | org.apache.activemq.xbean.XBeanBrokerFactory$1 | main
我尝试使用 Spring spel 初始化secureRandom:
secureRandom="#{T(java.security.SecureRandom).getInstance('DEFAULT','CCJ')}" -
或
secureRandom="CCJ"
没用!!! 如何强制 SecureRandom 提供程序来自类型“CCJ”
谢谢,
【问题讨论】:
标签: java spring activemq bouncycastle fips