mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-01 05:52:32 +07:00
fix built-in TLS not calling MG_EV_TLS_HS; uniformize mg_tls_init()
This commit is contained in:
@@ -31,6 +31,7 @@ static void fn(struct mg_connection *c, int ev, void *ev_data) {
|
||||
struct mg_tls_opts opts = {.ca = mg_unpacked("/certs/ca.pem"),
|
||||
.name = mg_url_host(server)};
|
||||
mg_tls_init(c, &opts);
|
||||
mg_tls_handshake(c); // speed up, not strictly necessary
|
||||
*state = AUTH;
|
||||
} else if (*state == AUTH) {
|
||||
char a[100], b[300] = "";
|
||||
|
||||
Reference in New Issue
Block a user