Azure X509 certificate provisioning problem

Hi,

I’m trying to get my ESP32 to connect with Azure via IoT Hub. The problem I am having is that after using the command:

mos azure-iot-setup --azure-hub-name myiothub

Mongoose is successful in creating a device on my IoT hub with a "self-Signed x509 cert. However the MOS terminal is then reporting:

x509_verify_cert returned -9984

and

mongoose.c:4906 0x3ffda3f0 The certificate is not correctly signed by the trusted CA

I see in the old MongooseOS YouTube videos the tool just created a working “self-signed certificate” not a “self-signed x509” cert. I am using the Azure US west 2 region which should have this IoT cert provisioning feature enabled.

Anyway my problem is I can’t transmit IoT data payloads to Azure due to this issue, as nothing is showing up when I monitor my device for incoming payloads and the device is reporting as offline. I am hoping I do not have to manually verify the certificate and the tool can accomplish this via automatic provisioning as it worked before in the videos and in the tutorial.

Thanks for any help

https://community.mongoose-os.com/search?expanded=true&q=The%20certificate%20is%20not%20correctly%20signed%20by%20the%20trusted%20CA

Thanks for your response, however I looked through these previous questions before I posted my question and did not see a similar situation with Azure. I am also wondering if the MOS tool can be updated to solve this problem or if this is a cloud side issue I will need to work around to fix myself.

Thanks again

I wouldn’t expect mos tool to be updated in the near future. If you have a clear description in order to push a PR, it might
Depending on your device, you might choose a supported key format.

Yes that is a exactly what I was thinking. I can create a symmetric key or valid x509 certificate for authorization and try to match the default name my device is provisioned with. I’m hoping I can find the location on the devices file structure where that the key or certificate is held to swap it.

Thanks for your help