Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Paho » How to enable SSL over ActiveMQ using C client
How to enable SSL over ActiveMQ using C client [message #1751295] Sat, 07 January 2017 09:51
alice alex is currently offline alice alexFriend
Messages: 5
Registered: January 2017
Junior Member
I am trying to connect a C client with activeMQ using ssl.For this I created certificates using the following link
Also I confiugured activeMQ with transport connectors as:
<transportConnector name="ssl" uri="mqtt+ssl://"/>

The portion of C client uisng SSL is as follows:
MQTTClient_SSLOptions ssl_opts = MQTTClient_SSLOptions_initializer;
ssl_opts.enableServerCertAuth = 0;
conn_opts.ssl = &ssl_opts;
conn_opts.ssl->keyStore = "/home/user/certs/client-chain.pem";
conn_opts.ssl->privateKeyPassword = "password";
conn_opts.ssl->enabledCipherSuites = "DEFAULT";
MQTTClient_setCallbacks(client, NULL, connlost, msgarrvd, delivered);
if ((rc = MQTTClient_connect(client, &conn_opts)) != MQTTCLIENT_SUCCESS)
{ printf("%d",rc); }

But when I connect a C client to activeMQ I get connect failed return code -1 error...Kindly help me to fix this issue
Previous Topic:I am getting this error while connecting to MqttClient
Next Topic:Paho C library SSL connection to MQTT broker not working
Goto Forum:

Current Time: Wed Oct 28 06:52:09 GMT 2020

Powered by FUDForum. Page generated in 0.02096 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top