Fix #1803 - conditional for SSL_set1_host(). In unit test, disable time.windows.com, use google and apple SNTP servers

This commit is contained in:
cpq committed 2022-10-19 09:06:47 +01:00
1 parent 2e14d125ba
commit 17ada1c894
3 files changed
+14 -13

No files matched your search

+2
View File
@@ -90,11 +90,13 @@ void mg_tls_init(struct mg_connection *c, const struct mg_tls_opts *opts) {
}
}
if (opts->ciphers != NULL) SSL_set_cipher_list(tls->ssl, opts->ciphers);
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
if (opts->srvname.len > 0) {
char *s = mg_mprintf("%.*s", (int) opts->srvname.len, opts->srvname.ptr);
SSL_set1_host(tls->ssl, s);
free(s);
}
#endif
c->tls = tls;
c->is_tls = 1;
c->is_tls_hs = 1;