activemq ssl java.security.cert.CertificateException: No name matching localhost found
解决activemq ssl java.security.cert.CertificateException: No name matching localhost found的问题
目录
Broker SSL Connector以及SSL证书的配置
问题描述:
在AMQ Broker配置ssl+nio的connector,安装SSL证书,客户端通过ssl进行topic消息的发送与消费时出现java.security.cert.CertificateException: No name matching localhost found的问题,下文是具体的过程
SSL证书的制作(未做CA签名)
#创建broker的keystore
keytool -genkey -alias broker -keyalg RSA -keystore broker.ks
#从broker keystore中导出证书
keytool -export -alias broker -keystore broker.ks -file broker_cert
#创建客户端的keystore
keytool -genkey -alias client -keyalg RSA -keystore client.ks
#将服务器端的证书导入客户端的keystore
keytool -import -alias broker -keystore client.ts -file broker_cert