我正在尝试设置一个支持ActiveMQ的嵌入式SSL。
即时消息不断收到相同的错误消息:
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中的证书文件的问题吗?
为了让keystore等能正常工作,你需要做些什么吗?
发布于 2015-03-19 21:36:11
看看ActiveMQ单元测试,特别是SslBrokerServiceTest。它展示了如何正确配置SslBrokerService以及如何创建KeyStore和TrustStore。
发布于 2012-06-03 23:11:50
您在上面提供的链接(http://activemq.apache.org/how-do-i-use-ssl.html)实际上为您在Thawte上的问题提供了故障排除指南的引用。通过这些步骤,验证您是否让它正常工作。
另一条线索,这可能不太可能,但不管怎样,当我在Java语言中遇到证书问题时(尽管主要是DSA证书-确保您有RSA证书以减少的麻烦),所安装的JVM对某些密码有导出限制。这里有一个指向"patch“的链接。我不认为这将是你的情况,但不管怎样,可能是一个想法来检查。
http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html
https://stackoverflow.com/questions/10447741
复制相似问题