mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-28 12:30:58 +00:00
set is_tls at mg_listen and mg_connect level
This commit is contained in:
1 parent
29594283c1
commit
b740c80855
25 files changed
+69
-49
No files matched your search
@@ -28,8 +28,8 @@ static void fn(struct mg_connection *c, int ev, void *ev_data) {
|
||||
// Connected to server. Extract host name from URL
|
||||
struct mg_str host = mg_url_host(s_url);
|
||||
|
||||
// If s_url is https://, tell client connection to use TLS
|
||||
if (mg_url_is_ssl(s_url)) {
|
||||
// If s_url is https://, init TLS client connection
|
||||
if (c->is_tls) {
|
||||
struct mg_tls_opts opts = {.ca = s_ca, .name = host};
|
||||
mg_tls_init(c, &opts);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user