Skip to content

Commit 30b9cb5

Browse files
committed
- Fix for windows compile create ssl contexts.
1 parent b0d20e2 commit 30b9cb5

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed

doc/Changelog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
18 March 2025: Wouter
22
- Fix #1251: WSAPoll first argument cannot be NULL.
3+
- Fix for windows compile create ssl contexts.
34

45
17 March 2025: Wouter
56
- Fix representation of types GPOS and RESINFO, add rdf type for

winrc/win_svc.c

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -363,16 +363,36 @@ service_init(int r, struct daemon** d, struct config_file** c)
363363
return 0;
364364
}
365365
if(cfg->ssl_service_key && cfg->ssl_service_key[0]) {
366-
if(!(daemon->listen_sslctx = listen_sslctx_create(
367-
cfg->ssl_service_key, cfg->ssl_service_pem, NULL)))
366+
if(!(daemon->listen_dot_sslctx = listen_sslctx_create(
367+
cfg->ssl_service_key, cfg->ssl_service_pem, NULL,
368+
cfg->tls_ciphers, cfg->tls_ciphersuites,
369+
(cfg->tls_session_ticket_keys.first &&
370+
cfg->tls_session_ticket_keys.first->str[0] != 0),
371+
1, 0))) {
368372
fatal_exit("could not set up listen SSL_CTX");
373+
}
374+
#ifdef HAVE_NGHTTP2_NGHTTP2_H
375+
if(cfg_has_https(cfg)) {
376+
if(!(daemon->listen_doh_sslctx = listen_sslctx_create(
377+
cfg->ssl_service_key, cfg->ssl_service_pem, NULL,
378+
cfg->tls_ciphers, cfg->tls_ciphersuites,
379+
(cfg->tls_session_ticket_keys.first &&
380+
cfg->tls_session_ticket_keys.first->str[0] != 0),
381+
0, 1))) {
382+
fatal_exit("could not set up listen doh SSL_CTX");
383+
}
384+
}
385+
#endif
369386
#ifdef HAVE_NGTCP2
370-
if(!(daemon->quic_sslctx = quic_sslctx_create(
371-
cfg->ssl_service_key, cfg->ssl_service_pem, NULL)))
372-
fatal_exit("could not set up quic SSL_CTX");
387+
if(cfg_has_quic(cfg)) {
388+
if(!(daemon->listen_quic_sslctx = quic_sslctx_create(
389+
cfg->ssl_service_key, cfg->ssl_service_pem, NULL))) {
390+
fatal_exit("could not set up quic SSL_CTX");
391+
}
392+
}
373393
#endif /* HAVE_NGTCP2 */
374394
}
375-
if(!(daemon->connect_sslctx = connect_sslctx_create(NULL, NULL,
395+
if(!(daemon->connect_dot_sslctx = connect_sslctx_create(NULL, NULL,
376396
cfg->tls_cert_bundle, cfg->tls_win_cert)))
377397
fatal_exit("could not set up connect SSL_CTX");
378398

0 commit comments

Comments
 (0)