locked
Certificate error on iothub_client_sample_http RRS feed

  • Question

  • Hello everybody

    I've got an issue with the certificate when i try to run the iothub_client_sample_http from the azure iot sdk https://github.com/Azure/azure-iot-sdk-c

    # ./iothub_client_sample_http
    Starting the IoTHub client sample HTTP...
    Info: IoT Hub SDK for C, version 1.1.16
    IoTHubClient_LL_SetMessageCallback...successful.
    IoTHubClient_LL_SendEventAsync accepted message [0] for transmission to IoT Hub.
    Error: Time:Fri Jun 23 15:56:41 2017 File:/home/jeje/Bureau/Azure/azure-iot-sdk-c/c-utility/adapters/httpapi_curl.c Func:HTTPAPI_ExecuteRequest Line:552 curl_easy_perform() failed: Peer certificate cannot be authenticated with given CA certificates

    Error: Time:Fri Jun 23 15:56:41 2017 File:/home/jeje/Bureau/Azure/azure-iot-sdk-c/c-utility/adapters/httpapi_curl.c Func:HTTPAPI_ExecuteRequest Line:554 (result = HTTPAPI_OPEN_REQUEST_FAILED)
    Error: Time:Fri Jun 23 15:56:41 2017 File:/home/jeje/Bureau/Azure/azure-iot-sdk-c/c-utility/src/httpapiex.c Func:HTTPAPIEX_ExecuteRequest Line:475 unable to recover sending to a working state
    Error: Time:Fri Jun 23 15:56:41 2017 File:/home/jeje/Bureau/Azure/azure-iot-sdk-c/iothub_client/src/iothubtransporthttp.c Func:DoEvent Line:1652 unable to HTTPAPIEX_SAS_ExecuteRequest

    (Sorry i can't post the screenshot from my terminal because "Body text cannot contain images or links until we are able to verify your account."

    I cross compile the sdk from an i686_pc_linux_gnu to the target/host armv7l_timesys_linux_gnueabi, to do so i've added myself curl and libuuid.

    I've just added my connection string to the iothub_client_sample_http.c.( i was able to send messages to the iot hub from my pc with the c# simulator)

    Thank you for your time

    Edit: July 3rd 2017:

    I was looking at the data between my device and the Azure IoT hub and i find that the error was

    "Alert (Level: Fatal, Description: Unknown CA)"

    from my device in reponse at the

    "Server Hello, Certicate, Server Key Exchange, Server Hello Done"

    from 40.118.27.192. the protocol from those exchange is TLSv1.2.

    • Edited by mamar_sama Monday, July 3, 2017 3:22 PM
    Friday, June 23, 2017 3:40 PM