This is a client program with TLS+MQTT. I've used two open source libraries here, libemqtt and mbedtls. Thanks to the authors of both open source libraries, and thanks to open source.
Ubuntu 16.04 or other linux systems
make
make clean
./MQTTCNWithTLS
the certificate that the program is loading is in the project directory and needs to be replaced according to the client certificate generated by you.
If you want to see the Chinese defailed documentation, please log on to the website. https://blog.csdn.net/ptonlix/article/details/79866925 --teach how to use mosquitto to bulid mqtt server with TLS. https://blog.csdn.net/ptonlix/article/details/79869756 --Verify the project code.