From: W.C.A. Wijngaards Date: Tue, 18 Mar 2025 13:01:53 +0000 (+0100) Subject: - Fix for windows compile create ssl contexts. X-Git-Tag: release-1.23.0rc1~38 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=30b9cb5f813003d0a2b1c2e678652396615b1b7d;p=thirdparty%2Funbound.git - Fix for windows compile create ssl contexts. --- diff --git a/doc/Changelog b/doc/Changelog index 697f0273d..cccddf8fa 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,5 +1,6 @@ 18 March 2025: Wouter - Fix #1251: WSAPoll first argument cannot be NULL. + - Fix for windows compile create ssl contexts. 17 March 2025: Wouter - Fix representation of types GPOS and RESINFO, add rdf type for diff --git a/winrc/win_svc.c b/winrc/win_svc.c index bd28bd206..40e12f1cf 100644 --- a/winrc/win_svc.c +++ b/winrc/win_svc.c @@ -363,16 +363,36 @@ service_init(int r, struct daemon** d, struct config_file** c) return 0; } if(cfg->ssl_service_key && cfg->ssl_service_key[0]) { - if(!(daemon->listen_sslctx = listen_sslctx_create( - cfg->ssl_service_key, cfg->ssl_service_pem, NULL))) + if(!(daemon->listen_dot_sslctx = listen_sslctx_create( + cfg->ssl_service_key, cfg->ssl_service_pem, NULL, + cfg->tls_ciphers, cfg->tls_ciphersuites, + (cfg->tls_session_ticket_keys.first && + cfg->tls_session_ticket_keys.first->str[0] != 0), + 1, 0))) { fatal_exit("could not set up listen SSL_CTX"); + } +#ifdef HAVE_NGHTTP2_NGHTTP2_H + if(cfg_has_https(cfg)) { + if(!(daemon->listen_doh_sslctx = listen_sslctx_create( + cfg->ssl_service_key, cfg->ssl_service_pem, NULL, + cfg->tls_ciphers, cfg->tls_ciphersuites, + (cfg->tls_session_ticket_keys.first && + cfg->tls_session_ticket_keys.first->str[0] != 0), + 0, 1))) { + fatal_exit("could not set up listen doh SSL_CTX"); + } + } +#endif #ifdef HAVE_NGTCP2 - if(!(daemon->quic_sslctx = quic_sslctx_create( - cfg->ssl_service_key, cfg->ssl_service_pem, NULL))) - fatal_exit("could not set up quic SSL_CTX"); + if(cfg_has_quic(cfg)) { + if(!(daemon->listen_quic_sslctx = quic_sslctx_create( + cfg->ssl_service_key, cfg->ssl_service_pem, NULL))) { + fatal_exit("could not set up quic SSL_CTX"); + } + } #endif /* HAVE_NGTCP2 */ } - if(!(daemon->connect_sslctx = connect_sslctx_create(NULL, NULL, + if(!(daemon->connect_dot_sslctx = connect_sslctx_create(NULL, NULL, cfg->tls_cert_bundle, cfg->tls_win_cert))) fatal_exit("could not set up connect SSL_CTX");