Azure / azure-sdk-for-c

This repository is for active development of the Azure SDK for Embedded C. For consumers of the SDK we recommend visiting our versioned developer docs at https://azure.github.io/azure-sdk-for-c.
MIT License
225 stars 120 forks source link

Trying to build the sample Azure_IoT_Hub_ESP8266 but get an error: 'X509List' does not name a type #2068

Closed Pelago closed 7 months ago

Pelago commented 2 years ago

Describe the bug Trying to build the sample Azure_IoT_Hub_ESP8266 but get an error: 'X509List' does not name a type

Exception or Stack Trace Azure_IoT_Hub_ESP8266:68:8: error: 'X509List' does not name a type static X509List cert((const char*)ca_pem); ^ C:\Users\PATRIK~1\AppData\Local\Temp\arduino_modified_sketch_25349\Azure_IoT_Hub_ESP8266.ino: In function 'void initializeClients()': Azure_IoT_Hub_ESP8266:145:15: error: 'class axTLS::WiFiClientSecure' has no member named 'setTrustAnchors' wifi_client.setTrustAnchors(&cert); ^ Azure_IoT_Hub_ESP8266:145:32: error: 'cert' was not declared in this scope wifi_client.setTrustAnchors(&cert);

exit status 1 'X509List' does not name a type

To Reproduce Just create a new project in Arduino IDE and make appropriate changes in the iot_configs.h file and build the sketch

Code Snippet static X509List cert((const char*)ca_pem);

Expected behavior I would expect the sample to work or at least in the code explain how this X509List has to be created

Screenshots image

.

Setup (please complete the following information):

Additional context I'm looking for a way to connect an ESP8266 to a IotEdgeGateway 1.1 sending data to be relayed to Azure IoTHub. This sample looked as if it was using X.509 cert and i wanted to find out if this sample could lead the way to my solution. I have been working this problem for weeks googling everything but i can't find any working samples for my Leaf/child device to connect to my IotEdgeGateway and pass the telemetry data

Information Checklist Please make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

asergaz commented 2 years ago

This relates with: https://stackoverflow.com/questions/70754868/how-to-connect-esp8266-through-iotedgegateway-running-on-rpi-ubuntu-using-azur

github-actions[bot] commented 7 months ago

Hi @Pelago, we deeply appreciate your input into this project. Regrettably, this issue has remained inactive for over 2 years, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support.