MQTT Tests with Paho
To format the certificates, openssl is required.
To communicate with the agrirouter via MQTT two certificates are involved. The first certificate is the server certificate, the second certificate is the one that is client specific.
The server certificate is signed by a common public intermediate CA whose root CA is already present in most system and software trust stores.
Onboarding an MQTT endpoint provides a certificate, an MQTT client id and two topics; see onboarding.
Alternatively, the connection can be setup using a router device.
The certificate received from onboarding process needs to be formatted to work with PAHO (PAHO only, not needed for most of the other clients):
Copy the whole certificate field, replace the "\n" with line breaks (\r+\n) and save it to a *.pem file
Call the following command from within the folder you stored the *.pem file:
openssl pkcs12 -export -in myCert.pem -inkey myCert.pem -out myCert.jks
Read the connection criteria from the onboarding result and click on connect.