[
https://issues.apache.org/jira/browse/AMQ-6966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16503688#comment-16503688
]
Jose commented on AMQ-6966:
---------------------------
The configuration of the broker
{code:java}
<transportConnector name="mqttssl"
uri="mqtt+nio+ssl://0.0.0.0:7002?needClientAuth=true/>
<transportConnector name="mqttws"
uri="wss://0.0.0.0:7003?needClientAuth=true"/>{code}
Connection code
{code:java}
String caCrt = new ClassPathResource("ca.crt").getFile().getAbsolutePath();
String clientCrt = new
ClassPathResource("client.crt").getFile().getAbsolutePath(); String clientKey =
new ClassPathResource("client.key").getFile().getAbsolutePath(); MqttClient
client = new MqttClient("wss://localhost:7003", "clientId");
client.setCallback(this); MqttConnectOptions opts = new MqttConnectOptions();
opts.setAutomaticReconnect(false); SSLSocketFactory socketFactory =
SslUtil.getSocketFactory(caCrt, clientCrt, clientKey, "spotdyna");
opts.setSocketFactory(socketFactory);
{code}
If i connect to mqtts://localhost:7002 transportContext contains the certificate
If i connect to wss://localhost7003 using the same client code,
transportContext is null
Is a bug or is my fault ?
> mqtt over wss impossible get certificate details
> ------------------------------------------------
>
> Key: AMQ-6966
> URL: https://issues.apache.org/jira/browse/AMQ-6966
> Project: ActiveMQ
> Issue Type: Bug
> Components: MQTT
> Affects Versions: 5.15.3
> Reporter: Jose
> Priority: Major
>
> steps:
> * connect from paho mqtt client to mqtt+ssl transport in activemq
> * from plugin addConnection function call info.getTransportContext
> Expected, transportContext is an instance of X509Certificate[] so i can
> extract certificate details
>
> Issue:
> Execute the same but connect to wss transport in activemq
> info.getTransportContext return null
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)