Can anyone tell me how to used SSL/LTS for mqtt

0 votes
Using paho mqtt stack to add encrypted SSL key, please anyone suggest me how create & add certificate both side(client/server).

my publish/sub mqtt app struct is -

    /** The eyecatcher for this structure.  Must be MQTS */
    char struct_id[4];
    /** The version number of this structure.  Must be 0, or 1 to enable TLS version selection. */
    int struct_version;

    /** The file in PEM format containing the public digital certificates trusted by the client. */
    const char* trustStore;

    /** The file in PEM format containing the public certificate chain of the client. It may also include
    * the client's private key.
    */
    const char* keyStore;

    /** If not included in the sslKeyStore, this setting points to the file in PEM format containing
    * the client's private key.
    */
    const char* privateKey;
    /** The password to load the client's privateKey if encrypted. */
    const char* privateKeyPassword;

    /**
    * The list of cipher suites that the client will present to the server during the SSL handshake. For a
    * full explanation of the cipher list format, please see the OpenSSL on-line documentation:
    * http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT
    * If this setting is ommitted, its default value will be "ALL", that is, all the cipher suites -excluding
    * those offering no encryption- will be considered.
    * This setting can be used to set an SSL anonymous connection ("aNULL" string value, for instance).
    */
    const char* enabledCipherSuites;

    /** True/False option to enable verification of the server certificate **/
    int enableServerCertAuth;

    /** The SSL/TLS version to use. Specify one of MQTT_SSL_VERSION_DEFAULT (0),
    * MQTT_SSL_VERSION_TLS_1_0 (1), MQTT_SSL_VERSION_TLS_1_1 (2) or MQTT_SSL_VERSION_TLS_1_2 (3).
    * Only used if struct_version is >= 1.
    */
    int sslVersion;

    /**
     * Whether to carry out post-connect checks, including that a certificate
     * matches the given host name.
     * Exists only if struct_version >= 2
     */
    int verify;

    /**
     * From the OpenSSL documentation:
     * If CApath is not NULL, it points to a directory containing CA certificates in PEM format.
     * Exists only if struct_version >= 2
     */
    const char* CApath;
Jan 31 in IoT (Internet of Things) by @Babu99
54 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In IoT (Internet of Things)

0 votes
1 answer

How to read data from MQTT in Eclipse Paho?

You don't read data from a MQTT ...READ MORE

answered Aug 9, 2018 in IoT (Internet of Things) by anonymous2
• 4,260 points
77 views
0 votes
1 answer

When to use MQTT and when to use REST for event submission?

MQTT is designed to be a fast ...READ MORE

answered Sep 14, 2018 in IoT (Internet of Things) by Upasana
• 8,530 points
105 views
0 votes
1 answer

Can Qt be used for developing apps for windows IoT core?

QT does seem to support a compatible ...READ MORE

answered Sep 27, 2018 in IoT (Internet of Things) by Annie97
• 2,190 points
220 views
0 votes
1 answer

Send LoRa measures to Fiware IOT agent via MQTT

down vote I dont know if I understood ...READ MORE

answered Jul 13, 2018 in IoT (Internet of Things) by anonymous2
• 4,260 points
296 views
0 votes
1 answer

How to get Unicast, Dns and Gateway Address in UWP?

Try this code Snippet I found here: https://social.msdn.microsoft.com/Forums/en-US/27a8b7a8-8071-4bc1-bbd4-e7c1fc2bd8d7/windows-10-iot-core-how-do-you-create-a-tcp-server-and-client?forum=WindowsIoT ...READ MORE

answered Jul 17, 2018 in IoT (Internet of Things) by anonymous2
• 4,260 points
140 views
0 votes
1 answer

What is the maximum message length for a MQTT broker?

It's not entirely clear what you're asking ...READ MORE

answered Jul 17, 2018 in IoT (Internet of Things) by anonymous2
• 4,260 points
675 views
0 votes
1 answer

Need to enclose MQTTCLient Instance in try catch block

The instance doesn't need to be surrounded by try/catch, but ...READ MORE

answered Aug 21, 2018 in IoT (Internet of Things) by anonymous2
• 4,260 points
76 views
0 votes
1 answer

How do I compare MQTT and TCP packets ?

It depends on the higher-level protocols (above ...READ MORE

answered Aug 27, 2018 in IoT (Internet of Things) by anonymous2
• 4,260 points
56 views
0 votes
1 answer

setuptools: build shared libary from C++ code, then build Cython wrapper linked to shared libary

There is a seemingly undocumented feature of setup that ...READ MORE

answered Sep 11, 2018 in Python by Priyaj
• 56,540 points
26 views
0 votes
1 answer

setuptools: build shared libary from C++ code, then build Cython wrapper linked to shared libary

There is a seemingly undocumented feature of setup that ...READ MORE

answered Sep 21, 2018 in Python by Priyaj
• 56,540 points
127 views