When trying to do HTTPS requests in circuitpython on XIAO ESP32-C3 it end with a failed SSL Handshake:
Traceback (most recent call last):
File "lib/adafruit_requests.py", line 515, in _get_socket
OSError: Failed SSL handshake
The circuitpython (8.2.1) code is basically doing this:
pool = socketpool.SocketPool(wifi.radio)
session = adafruit_requests.Session(pool, ssl.create_default_context())
session.get(...some HTTPS URL)
I have tried syncing the real time clock vs an NTP server before making the request but that did not help.
What needs to be done to be able to do HTTPS requests with the XIAO ESP32-C3?
I have tried a lot of things and until now i was not able to make a HTTP request, hopefully you can give me a hint that points me in the right direction.
Have you ever seen this:
看清工作室 肖ESP32C3 下载 (circuitpython.org)
SSL Handshake failure or error 525 indicates that the server and browser cannot establish a secure connection. This happens for a variety of reasons.
In general, error 525 indicates that the SSL handshake uses Cloudflare’s domain and that the source web server is down:
However, it is also important to understand whether SSL errors can occur on the client or server side. Common reasons for client SSL errors include:
The date or time on the client device is incorrect.
The browser configuration is incorrect.
The connection is intercepted by a third party.
Some server-side reasons include:
Password suites do not match.
The protocol used by the client is not supported by the server.
Incomplete, invalid, or expired certificates.
Typically, if the SSL handshake fails, the problem can be attributed to an error in the website or server and its SSL configuration.
You need to check carefully,there are 5 ways(related ideas) to slove it：
Update the system date and time
Check that your SSL certificate is valid
Configure your browser for the latest SSL/TLS protocol support
Verify that your server is properly configured to support SNI
Make sure the cipher suites match