我有一个我创建的 Spring Boot 应用程序实例化了 ActiveMqSslBroker 的一个实例。我正在尝试使用 HermesJMS 作为客户端连接到该代理。
我在 Hermes 中配置了连接工厂如下:
- 类:org.apache.activemq.ActiveMQSslConnectionFactory
- 经纪人网址:ssl://localhost:61616
- 密钥库:/path/to/client-keystore-containing-client-cert.ks
- keyStoreKeyPassword: *****
- 密钥存储类型:PKCS12
- 信任存储:/path/to/trust-store-containing-broker-cert.ts
- 信任商店密码:****
- 信任存储类型:PKCS12
代理在我的 spring-boot 应用程序中配置如下:
- SSL 连接器:
- 经纪人网址:ssl://localhost:61616
- 密钥管理器:
- 从 KeyManagerFactory.getKeyManagers() 返回
- 密钥库:/path/to/key-store-containing-broker-cert.ks
- 从 KeyManagerFactory.getKeyManagers() 返回
- 信任管理器:
- 从 TrustManagerFactory.getTrustManagers() 返回
- TrustStore:/path/to/trust-store-containing-client-cert.ks
- 从 TrustManagerFactory.getTrustManagers() 返回
代理拒绝来自 Hermes 的连接请求,并出现以下错误:
javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
所以显然 HermesJMS 没有发送包含在其配置的 keyStore 中的客户端证书。钥匙是否必须有一个特定的别名才能被 Hermes 拾取和使用?我可以设置一个属性来指定要使用的 keyStore 的别名吗?