@BGunnarB
Can I point you to this tutorial I wrote a while ago to get MQTT working with ssl and cloudmqtt