Skip to content

Commit

Permalink
- Only create the doh context when needed.
Browse files Browse the repository at this point in the history
  • Loading branch information
gthess committed Jan 17, 2025
1 parent f4ab1b0 commit 6502a9b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion daemon/unbound.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,11 @@ setup_sslctxs(struct daemon* daemon, struct config_file* cfg)
}
}
(void)setup_listen_sslctx(&daemon->listen_dot_sslctx, 1, 0, cfg);
(void)setup_listen_sslctx(&daemon->listen_doh_sslctx, 0, 1, cfg);
#ifdef HAVE_NGHTTP2_NGHTTP2_H
if(cfg_has_https(cfg)) {
(void)setup_listen_sslctx(&daemon->listen_doh_sslctx, 0, 1, cfg);
}
#endif
#ifdef HAVE_NGTCP2
if(!(daemon->listen_quic_sslctx = quic_sslctx_create(
cfg->ssl_service_key, cfg->ssl_service_pem, NULL))) {
Expand Down

0 comments on commit 6502a9b

Please sign in to comment.