Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-6554

How to enable SSL over ActiveMQ using C client

    XMLWordPrintableJSON

Details

    Description

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            arjun13 Alice
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: