]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix for windows compile create ssl contexts.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 18 Mar 2025 13:01:53 +0000 (14:01 +0100)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 18 Mar 2025 13:01:53 +0000 (14:01 +0100)
doc/Changelog
winrc/win_svc.c

index 697f0273dd58ddb6d9203dcadada78f66b430513..cccddf8faa574667e89a35f94048eed581f87ceb 100644 (file)
@@ -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
index bd28bd206061c3e0a93072b0000e1d6ae6d4540f..40e12f1cff8760bc58cfb0da9147cd8579c5281a 100644 (file)
@@ -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");