mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-17 19:30:36 +00:00
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:
1 parent
2e14d125ba
commit
17ada1c894
3 files changed
+14
-13
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user