8000 WiFiClientSecure does not connect to some websites · Issue #550 · espressif/arduino-esp32 · GitHub
[go: up one dir, main page]

Skip to content

WiFiClientSecure does not connect to some websites #550

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

Closed
chemicstry opened this issue Aug 1, 2017 · 6 comments
Closed

WiFiClientSecure does not connect to some websites #550

chemicstry opened this issue Aug 1, 2017 · 6 comments

Comments

@chemicstry
Copy link
Contributor

I'm having problem connecting to SSL websites (specifically proxied by CloudFlare) with WiFiClientSecure. Other websites seem to work fine.

Here is console output:

[I][ssl_client.cpp:45] start_ssl_client(): Free heap before TLS 191592
[I][ssl_client.cpp:47] start_ssl_client(): Starting socket
[I][ssl_client.cpp:75] start_ssl_client(): Seeding the random number generator
[I][ssl_client.cpp:84] start_ssl_client(): Setting up the SSL/TLS structure...
[I][ssl_client.cpp:108] start_ssl_client(): WARNING: Use certificates for a more secure communication!
[I][ssl_client.cpp:153] start_ssl_client(): Performing the SSL/TLS handshake...
[E][ssl_client.cpp:25] handle_error(): SSL - A fatal alert message was received from our peer
[E][ssl_client.cpp:27] handle_error(): MbedTLS message code: -30592
[E][WiFiClientSecure.cpp:102] connect(): lwip_connect_r: 11
[I][ssl_client.cpp:204] stop_ssl_socket(): Cleaning SSL connection.
[I][ssl_client.cpp:204] stop_ssl_socket(): Cleaning SSL connection.

However, when using https_request example from esp-idf I can connect to the same website (CloudFlare) successfully. I believe it could be some mbedtls configuration issue in ssl_client.cpp

@copercini
Copy link
Contributor
copercini commented Aug 1, 2017

Quite strange, I tested with https://codepen.io and https://laravel.com/ (which looks like proxied by CloudFlare) and works fine

What URL does this occur in?

@chemicstry
Copy link
Contributor Author

Maybe they are using their own certificates? I'm using CF's issued certificates on https://gaben.win/ and it gives me the error above.

@copercini
Copy link
Contributor

Found it! https://github.com/espressif/arduino-esp32/blob/master/libraries/WiFiClientSecure/src/ssl_client.cpp#L138

setting host as "gaben.win" everything works fine

@chemicstry
Copy link
Contributor Author

It works now. Thank you.

It was a problem with multi-host certificate right? Is it still WIP?

@copercini
Copy link
Contributor

It's just pass the "host" from arduino sketch to this mbedtls API.

I'm quite busy right now, but on weekend will make a PR solving it...

copercini added a commit that referenced this issue Aug 24, 2017
Server Name Indication (SNI) support for WiFiClientSecure

Fix #571 and #550
@copercini copercini mentioned this issue Aug 24, 2017
copercini added a commit that referenced this issue Aug 24, 2017
Server Name Indication (SNI) support for WiFiClientSecure

Fix #571 and #550
@copercini
Copy link
Contributor

@chemicstry Should be fixed now =)

Raienryu97 pushed a commit to Raienryu97/arduino-esp32 that referenced this issue Aug 24, 2017
Server Name Indication (SNI) support for WiFiClientSecure

Fix espressif#571 and espressif#550
turmary pushed a commit to Seeed-Studio/Seeed_Arduino_atWiFiClientSecure that referenced this issue Jan 22, 2020
Server Name Indication (SNI) support for WiFiClientSecure

Fix espressif/arduino-esp32#571 and espressif/arduino-esp32#550
blue-2357 pushed a commit to blue-2357/arduino-esp32 that referenced this issue Jul 17, 2024
Server Name Indication (SNI) support for WiFiClientSecure

Fix espressif/arduino-esp32#571 and espressif/arduino-esp32#550
dash0820 added a commit to dash0820/arduino-esp32-stripped that referenced this issue Mar 10, 2025
Server Name Indication (SNI) support for WiFiClientSecure

Fix espressif/arduino-esp32#571 and espressif/arduino-esp32#550
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0