-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Latest Core Breaks WiFiClientSecure Insecure HTTPS #4992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
you need to call |
@me-no-dev I already tried this but that does not fix it. I will try it again. In 1.0.4 .setInsecure() was not yet available, but since 1.0.6 had implemented this I went ahead and tried that without success. |
you did call it before |
@me-no-dev Just tried it again with .setInsecure() added as shown below and it continues to fail. If I switch back to 1.0.4 if works as expected (just have to remove the .setInsecure()):
|
Unless you intend to interact directly with the client connection, there is no reason to include it. HTTPClient provides all the functionality you need. |
@bwjohns4 can you post the debug serial output again? |
@me-no-dev Well.... I spoke too soon. I have a few different WiFiClientSecure functions and I added the .setInsecure() to one that doesn't get called first, so it confused the test. After adding it to all calls, it appears to work fine. Apologies! |
Apparently after 1.0.4 (unsure of 1.0.5) you MUST use .setInsecure() whereas with 1.0.4 and before you did NOT include that (nor was it available) |
I have ran into the same issues. Arduino IDE 1.8.19, ESP32 library version 1.0.6. Please forgive my confusion, but why would one use a HTTPS client only to then use a method called .setInsecure()? In that case what's the point of using a https library in the first place? .setInsecure() does allow me to establish a connection, but when I do a subsequent GET request I get: [E][ssl_client.cpp:36] _handle_error(): [data_to_read():287]: (-29184) SSL - An invalid SSL record was received I also tried reverting to 1.0.4. It works without .setInsecure(), but I get: [I][ssl_client.cpp:156] start_ssl_client(): WARNING: Use certificates for a more secure communication! The subsequent GET request still returns the same: [E][ssl_client.cpp:33] _handle_error(): [data_to_read():270]: (-29184) SSL - An invalid SSL record was received |
The referenced fix by effitient does not appear to have fixed the problem. The problem still continues. |
As it was caused by wrorng function usage. |
Can someone show where/how to correct this in which ever file? |
That actually doesn't tell me anything, except that something is wrong somewhere. What function usage was incorrect? What is the correct function usage please? Let me make clear - I am using .setInsecure() before .connect() and a subsequent GET() still fails. |
Hardware:
Board: ESP32 Dev Module
Core Installation version: 1.0.6
IDE name: Platform.io
Flash Frequency: 40Mhz
PSRAM enabled: unsure
Upload Speed: PlatformIO default
Computer OS: Windows 10
Description:
WiFiClientSecure doesn't work when I upgrade to latest 1.0.6 Arduino Core (via PlatformIO Espressif32 3.2.0 Release). I'm not validating any certificates or thumbprints on the other end, just using it as insecure HTTPS. It works fine on 1.0.4 (via PlatformIO Espressif 3.0.0 Release), but breaks when upgrading to 1.0.6 (unsure if problem still exists in 1.0.5). I know that in 1.0.4 there is no .setInsecure() method, but that method has recently been added. I did try including that in my code, but that didn't make any recognizable difference.
I have so far traced it back to start_ssl_client() within ssl_client.cpp where it fails at the first check and returns -1, but haven't made it any further:
Sketch: (leave the backquotes for code formatting)
Debug Messages:
The text was updated successfully, but these errors were encountered: