We have tried the iothub_ll_client_x509_sample.c example program from the Linux System and IOT device is created on the IOT Hub using X509 type authentication.
These are the steps followed to create Root and Leaf certificates.
https://github.com/Azure/azure-iot-sdk-c/blob/master/tools/CACertificates/CACertificateOverview.md
The following is the Environment Details :
Operating system : Ubuntu
Tool Used : Bash in Ubuntu
Script used for :
Certificate Generation https://github.com/Azure/azure-iot-sdk-c/blob/master/tools/CACertificates/certGen.sh
Root Certificate is Uploaded to IOT Hub and Proof of possession is Completed.
Observation :
Not able to send message to the IOT Hub. The following is the Logs of the Console.
ubuntu@ubuntu:/media/ubuntu/Projects/Z_Rough_Workspace/Azure_Device_Provisioning_test/azure-iot-sdk-c/cmake/iothub_client/samples/iothub_ll_client_x509_sample$ ./iothub_ll_client_x509_sample
Creating IoTHub handle
Sending message 1 to IoTHub
Sending message 2 to IoTHub
Sending message 3 to IoTHub
Sending message 4 to IoTHub
Sending message 5 to IoTHub
Error: Time:Wed Feb 13 06:49:37 2019 File:/media/ubuntu/Azure_Device_Provisioning_test/azure-iot-sdk-c/iothub_client/src/iothubtransport_mqtt_common.c Func:mqtt_operation_complete_callback Line:1728 Connection Not Accepted: 0x5: Not Authorized
Error: Time:Wed Feb 13 06:49:37 2019 File:/media/ubuntu/Azure_Device_Provisioning_test/azure-iot-sdk-c/iothub_client/src/iothubtransport_mqtt_common.c Func:mqtt_operation_complete_callback Line:1728 Connection Not Accepted: 0x5: Not Authorized
Error: Time:Wed Feb 13 06:49:39 2019 File:/media/ubuntu/Azure_Device_Provisioning_test/azure-iot-sdk-c/iothub_client/src/iothubtransport_mqtt_common.c Func:mqtt_operation_complete_callback Line:1728 Connection Not Accepted: 0x5: Not Authorized
Error: Time:Wed Feb 13 06:49:43 2019 File:/media/ubuntu/Azure_Device_Provisioning_test/azure-iot-sdk-c/iothub_client/src/iothubtransport_mqtt_common.c Func:mqtt_operation_complete_callback Line:1728 Connection Not Accepted: 0x5: Not Authorized
^C
Any Support would be very helpful.
Moved byDave PatrickMVPThursday, February 14, 2019 4:30 AMlooking for forum