I’m trying to implement a secure MQTT Client connection with an ESP32 microcontroller. There is an HiveMQ example for the ESP8266 using the library “CertStoreBearSSL”, but unfortunately, this library seems the be not available for ESP32. Aer there any alternatives or other solutions?
What kind of certificate can be used for mass production, it is very inconvenient to use a certificate that may suddenly expire and that needs to be renewed on the client’s device.
For Cloud, Clients(devices) will only need to trust the server root CA certificate. If it’s set up correctly then clients should always leverage the certificate chain and validate only against the root certificate. You can generate server root CA for your cloud instance and add it to truststore of all your devices.
Please check here to know how to generate a server root CA certificate for a cloud instance.