1

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://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

Chinnu
  • 85
  • 10
  • 1
    Any errors in the activemq logs? – hardillb Jan 07 '17 at 10:28
  • duplicate of: http://stackoverflow.com/questions/41406787/how-to-enable-ssl-over-activemq-using-c-client – Tim Bish Jan 07 '17 at 14:23
  • @hardillb no errors is showing in the activemq log.It is not displaying atleaset connect failure error.I have doubt whether it is because of the certificates.I generated certifiactes as specified here [link](https://github.com/rethab/php-stomp-cert-example/blob/master/README.md)…Can you please check to see whther my certificates are valid or not – Chinnu Jan 09 '17 at 04:35

0 Answers0