-
Notifications
You must be signed in to change notification settings - Fork 3.1k
TLS: add SNI support for secure connections #3685
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
Conversation
|
I just pushed commits for extending SNI support for MMQT and Websockets 4bf7acd |
|
Sorry, please rebase on |
|
Rebase done! |
jmattsson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a great addition!
Just one comment around some debug prints, but otherwise a big thumbs up from me 👍 (with the caveat I haven't looked at the 8266 branch in years 😅)
|
Thanks, looks safe then! 👍
…On Sat, Aug 30, 2025 at 05:48, Caio Hamamura ***@***.***(mailto:On Sat, Aug 30, 2025 at 05:48, Caio Hamamura <<a href=)> wrote:
@caiohamamura commented on this pull request.
---------------------------------------------------------------
In [app/mbedtls/app/espconn_mbedtls.c](#3685 (comment)):
> @@ -626,6 +626,20 @@ static bool mbedtls_msg_config(mbedtls_msg *msg)
ret = mbedtls_ssl_setup(&msg->ssl, &msg->conf);
lwIP_REQUIRE_NOERROR(ret, exit);
+ /* Add hostname for SNI support */
+ if (ssl_client_options.hostname != NULL) {
+ os_printf("Configuring SNI for hostname: %s\n", ssl_client_options.hostname);
So is it safe, or do you think I should remove some messages there?
—
Reply to this email directly, [view it on GitHub](#3685 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AAGUJZ4DDQFEBQBPS2KNOVT3QCU7VAVCNFSM6AAAAACFBRUECGVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTCNRZHEZTCOJYGE).
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
|
@caiohamamura This is gold, thank you! I just went through a pile of old HTTPS issues (you linked to some of them) and tested the URLs we were testing back then. Just sending HTTP GET to them through our
The output is always the same and I'm sure it's totally unrelated to what this PR fixes. Didn't investigate further, though. |
Probably fixes most TLS (https) issues #2970 #1707 #1484.
devbranch rather than for thereleasebranch.docs/*.This will add SNI support for secure connections by providing these modifications:
ssl_options: Add achar *hostnamefieldespconn_secure_set_hostname: function to provides an interface to set thessl_client_options.hostname.httpclient.chttp_dns_callbackfunction: before connecting throughespconn_secure_connectit will setespconn_secure_set_hostname( hostname )mbedtls_msg_config: it will now callmbedtls_ssl_set_hostnamegivenssl_client_options.hostnameis provided, which will then address SNI.