【问题标题】:ActiveMQ embedded broker SSLActiveMQ 嵌入式代理 SSL
【发布时间】:2012-05-13 22:24:47
【问题描述】:

我正在尝试设置一个支持 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 中的证书文件的问题?

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

【问题讨论】:

    标签: grails ssl activemq


    【解决方案1】:

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

    【讨论】:

      【解决方案2】:

      您在上面提供的链接 (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

      【讨论】:

        猜你喜欢
        • 2011-05-28
        • 2013-01-06
        • 2018-02-16
        • 1970-01-01
        • 1970-01-01
        • 2013-06-16
        • 1970-01-01
        • 2018-02-16
        • 2011-09-14
        相关资源
        最近更新 更多