Skip to content
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

fix built-in TLS not calling MG_EV_TLS_HS; uniformize mg_tls_init() #3023

Merged
merged 1 commit into from
Jan 27, 2025
Merged

Conversation

scaprile
Copy link
Collaborator

@scaprile scaprile commented Jan 24, 2025

mg_tls_handshake() from built-in TLS was not firing the MG_EV_TLS_HS event; the SMTP example was not working because of this. Fixed

We seem to have leftovers from our attempt to make TLS start automagically:
mg_tls_init() in both MbedTLS and OpenSSL had if (c->is_client && c->is_resolving == 0 && c->is_connecting == 0) mg_tls_handshake(c);. Built.in TLS did not do this. Obviously c->is_resolving = 0 and c->is_connecting = 0 at client connect, when mg_tls_init() is called. Besides that, connect_conn and its MIP equivalent call mg_tls_handshake(c) right after the event call to EV_CONNECT returns.
Removed

@scaprile scaprile requested a review from cpq January 24, 2025 22:16
@cpq cpq merged commit 2f0b095 into master Jan 27, 2025
70 of 80 checks passed
@cpq cpq deleted the smtp branch January 27, 2025 14:44
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

Successfully merging this pull request may close these issues.

2 participants