@@ -363,16 +363,36 @@ service_init(int r, struct daemon** d, struct config_file** c)
363
363
return 0 ;
364
364
}
365
365
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 ))) {
368
372
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
369
386
#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
+ }
373
393
#endif /* HAVE_NGTCP2 */
374
394
}
375
- if (!(daemon -> connect_sslctx = connect_sslctx_create (NULL , NULL ,
395
+ if (!(daemon -> connect_dot_sslctx = connect_sslctx_create (NULL , NULL ,
376
396
cfg -> tls_cert_bundle , cfg -> tls_win_cert )))
377
397
fatal_exit ("could not set up connect SSL_CTX" );
378
398
0 commit comments