Testing the MQTT TLS configuration with MQTT.fx
Now, we will use the MQTT.fx GUI utility to generate another MQTT client that uses an encrypted connection to publish messages to the same topic, sensors/drone01/altitude
. We have to make changes to the connection options to enable TLS and specify the certificate authority certificate file. Follow the next steps:
Launch MQTT.fx, select local mosquitto in the dropdown located on the upper-left corner, and click on the configuration icon on the right-hand side of this dropdown and on the left-hand side of the Connect button. MQTT.fx will display the Edit Connection Profiles dialog box with different options for the connection profile named local mosquitto.
Change the value specified in Broker Port from
1883
to8883
.Press the SSL/TLS button.
Activate the Enable SSL/TLS checkbox.
Activate the CA certificate file radio button.
Enter or select the full path to the
ca.crt
file that you created in thecertificates
folder in the CA Certificate File textbox...