Testing the MQTT TLS client authentication with command-line tools

Now, we will use the Mosquitto command-line tools to test the client authentication configuration.

The following command specifies the certificate authority certificate file, the client certificate, and the client key. You have to replace ca.crt, board001.crt, and board001.key with the full path to these files created in the certificates directory. However, it is a better idea to copy these files to a new directory as if we were working with files that will be only available to the device that wants to establish a connection with Mosquitto. As with previous commands, this command uses the -h option followed by the MQTT server host. In this case, we specify the IPv4 address ...

Get Hands-On MQTT Programming with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.