device to cloud using (MQTT) self signed certificate RRS feed

  • Question

  • Hey there,

    I'm trying to test the Azure IoT Hub. MQTTBox is used for testing. I have generated certificate.pem and key.pem from openssl. Command used is

    1. openssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 365 -out certificate.pem – to generate a new private key and public certificate

    i have used certificate.pem on client certificate section and key.pem on client key file.

    MQTT client id =  TESTUSER

    protocol = mqtt/tls 

    HOST is iothubhostname.azure-devices.net:8883

    ssl/tls certificate type=self signed certificate.


    passowrd= none

    but the connection error occurring .

    i have created the device on Azure web portal using fingerprint of the certificate.pem

    • is the command for generating certificate and key is correct?
    • no need to add any file on CA file option?
    • is a need to fill the user name option?
    • is the procedure for doing is correct or is there any steps missing?

    PS:please don't refer to any site because I already checked that.

    • Moved by Naomi N Monday, August 10, 2020 3:04 PM Not really a best forum but Azure forums were already moved - someone may help in C#
    Monday, August 10, 2020 2:54 PM


  • Hi DEN_CIL,

    Thank you for posting here.

    All English Microsoft Azure forums have been migrated to Microsoft Q&A, you can select one or more related tags and ask your questions to get better support.

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by DEN_CIL Wednesday, August 12, 2020 6:28 AM
    Tuesday, August 11, 2020 2:22 AM