TLS: add SNI support for secure connections#3685
Merged
marcelstoer merged 3 commits intonodemcu:devfrom Aug 30, 2025
Merged
Conversation
Author
|
I just pushed commits for extending SNI support for MMQT and Websockets 4bf7acd |
Member
|
Sorry, please rebase on |
Author
|
Rebase done! |
jmattsson
reviewed
Aug 28, 2025
Member
jmattsson
left a comment
There was a problem hiding this comment.
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 😅)
Member
|
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: ***@***.***>
|
Member
|
@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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.