SonicMQ SSL клиентское соединение
У меня проблемы с подключением к брокеру SonicMQ из моего Java-приложения.
это мой код клиента:
System.out.println("Connection setup started");
System.setProperty("javax.net.ssl.keyStoreType", "PKCS12");
System.setProperty("javax.net.ssl.keyStore", keyStoreFile.getAbsolutePath());
System.setProperty("javax.net.ssl.keyStorePassword","changeit");
ConnectionFactory connectionFactory = new progress.message.jclient.ConnectionFactory(args[0]);
Connection connection = connectionFactory.createConnection(args[1], args[2]);
В последней строке я получаю "Сертификат доверенного центра сертификации не указан". уведомление и
javax.jms.JMSException: Unable to register trusted CA certificate(s) or trust decider to verify the broker certificate
at progress.message.jimpl.JMSExceptionUtil.createJMSException(JMSExceptionUtil.java:42)
at progress.message.jimpl.Connection.<init>(Connection.java:755)
at progress.message.jclient.ConnectionFactory.createConnection(ConnectionFactory.java:2055)
at hr.aduro.translatorclient.TranslatorClient.main(TranslatorClient.java:80)
Caused by: [4020] progress.message.net.ESocketConfigException: Unable to register trusted CA certificate(s) or trust decider to verify the broker certificate
at progress.message.net.ssl.ProgressSslSocket.<init>(ProgressSslSocket.java:89)
at progress.message.net.ssl.ProgressSslSocket.<init>(ProgressSslSocket.java:163)
at progress.message.net.ssl.ProgressSslSocketFactory.createProgressSocket(ProgressSslSocketFactory.java:240)
at progress.message.net.ProgressSocketFactory.createProgressSocket(ProgressSocketFactory.java:179)
at progress.message.zclient.Connection.openSocket(Connection.java:3640)
at progress.message.zclient.Connection.connectWithRecoveryOpt(Connection.java:752)
at progress.message.zclient.ReconnectHelper.connectAndChaseSingleFailoverRedirect(ReconnectHelper.java:534)
at progress.message.zclient.Connection.connect(Connection.java:1503)
at progress.message.jimpl.Connection.<init>(Connection.java:536)
... 2 more
НОТА: keyStoreFile
это файл p12 в resources
папка и содержит открытый сертификат и пару закрытых ключей
Это озадачивает меня, и я потерял целый день на эту проблему и до сих пор не решен. Я знаю, что как только я укажу, что мой хост использует SSL, передавая URL как ssl://some-ip-address:port
фабрика соединений попытается найти центры сертификации. Проблема в том, что я не знаю, где указать, какой CA я использую.