ActiveMQ嵌入式代理SSL

时间:2012-05-04 11:15:13

标签: grails ssl activemq

我正在尝试设置支持SSL的嵌入式ActiveMQ代理。

我不断得到同样的错误消息:

ActiveMQ Transport Server: ssl://localhost:61613, called closeSocket()
2012-05-04 12:53:11,961 [ActiveMQ Transport Server: ssl://localhost:61613] ERROR          broker.TransportConnector  - Could not accept connection : No available certificate or key corresponds to the SSL cipher suites which are enabled.

对此进行搜索可以指示生成密钥库和信任库时可能出现故障。

我尝试使用这些指南生成密钥库和信任库但没有成功。 http://docs.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#CreateKeystore

http://activemq.apache.org/how-do-i-use-ssl.html

我试图在grails中设置它,并在conf / spring / resources.groovy中定义embeddedActiveMq,如下所示:

SpringSslContext sslContext = new SpringSslContext()
    FileSystemResource keyStoreResource = new FileSystemResource("/path/to/keyStore")
    FileSystemResource trustStoreResource = new FileSystemResource("/path/to/trustStore")
    sslContext.setKeyStore(keyStoreResource)
    sslContext.setKeyStorePassword("password")
    sslContext.setTrustStore(trustStoreResource)
    sslContext.setTrustStorePassword("trustword")


    SslBrokerService broker = new SslBrokerService()
    broker.setBrokerName("broker")
    broker.setPersistent(true)
    broker.setUseJmx(true)
    broker.setSslContext(sslContext)

TransportConnector connector = new TransportConnector
connector.setUri(new("ssl://localhost:61613"))
broker.addConnector(connector)
broker.start()

我无法使用

获得任何其他有价值的调试信息
 System.setProperty("javax.net.debug", "ssl,handshake,data,trustmanager,keymanager")

是否存在java仍在尝试使用jre6 / lib / security中的证书文件的问题?

为了让密钥库等正常工作,您需要做些具体的事情吗?

2 个答案:

答案 0 :(得分:1)

查看ActiveMQ单元测试,尤其是SslBrokerServiceTest。 它显示了如何正确配置SslBrokerService以及如何创建KeyStoreTrustStore

答案 1 :(得分:0)

您在上面提供的链接(http://activemq.apache.org/how-do-i-use-ssl.html)实际上在Thawte为您的问题提供了问题排查指南。完成这些步骤并验证您是否正常工作。

另一个线索,可能是一个长镜头,但无论如何 - 当我遇到Java证书问题时(虽然大多数是DSA证书 - 确保你有更少麻烦的RSA证书),JVM安装对某些密码有出口限制。这是“补丁”的链接。我不认为你会这样,但无论如何,这可能是一个检查的想法。

http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html

相关问题