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 https://github.com/rethab/php-stomp-cert-example/blob/master/README.md
Also I confiugured activeMQ with transport connectors as:
<transportConnector name="ssl" uri="mqtt+ssl://0.0.0.0:61613?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>

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: Mon Nov 19 18:22:33 GMT 2018

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

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

Back to the top