@@ -570,6 +570,9 @@ def find_mimetypes():
570
570
SSLCACertificateFile %(ssl_ca_certificate_file)s
571
571
SSLVerifyClient none
572
572
</IfDefine>
573
+ <IfDefine MOD_WSGI_CERTIFICATE_CHAIN>
574
+ SSLCertificateChainFile %(ssl_certificate_chain_file)s
575
+ </IfDefine>
573
576
</VirtualHost>
574
577
<VirtualHost *:%(https_port)s>
575
578
ServerName %(server_name)s
@@ -583,6 +586,9 @@ def find_mimetypes():
583
586
SSLCACertificateFile %(ssl_ca_certificate_file)s
584
587
SSLVerifyClient none
585
588
</IfDefine>
589
+ <IfDefine MOD_WSGI_CERTIFICATE_CHAIN>
590
+ SSLCertificateChainFile %(ssl_certificate_chain_file)s
591
+ </IfDefine>
586
592
<IfDefine MOD_WSGI_HTTPS_ONLY>
587
593
<IfDefine MOD_WSGI_HSTS_POLICY>
588
594
Header set Strict-Transport-Security %(hsts_policy)s
@@ -603,6 +609,9 @@ def find_mimetypes():
603
609
SSLCACertificateFile %(ssl_ca_certificate_file)s
604
610
SSLVerifyClient none
605
611
</IfDefine>
612
+ <IfDefine MOD_WSGI_CERTIFICATE_CHAIN>
613
+ SSLCertificateChainFile %(ssl_certificate_chain_file)s
614
+ </IfDefine>
606
615
</VirtualHost>
607
616
</IfDefine>
608
617
</IfDefine>
@@ -1819,6 +1828,11 @@ def check_percentage(option, opt_str, value, parser):
1819
1828
'whole site will be disabled and verification will only be '
1820
1829
'required for the specified sub URL.' ),
1821
1830
1831
+ optparse .make_option ('--ssl-certificate-chain-file' , default = None ,
1832
+ metavar = 'FILE-PATH' , help = 'Specify the path to a file '
1833
+ 'containing the certificates of Certification Authorities (CA) '
1834
+ 'which form the certificate chain of the server certificate.' ),
1835
+
1822
1836
optparse .make_option ('--ssl-environment' , action = 'store_true' ,
1823
1837
default = False , help = 'Flag indicating whether the standard set '
1824
1838
'of SSL related variables are passed in the per request '
@@ -2477,6 +2491,10 @@ def _cmd_setup_server(command, args, options):
2477
2491
options ['ssl_ca_certificate_file' ] = os .path .abspath (
2478
2492
options ['ssl_ca_certificate_file' ])
2479
2493
2494
+ if options ['ssl_certificate_chain_file' ]:
2495
+ options ['ssl_certificate_chain_file' ] = os .path .abspath (
2496
+ options ['ssl_certificate_chain_file' ])
2497
+
2480
2498
if options ['entry_point' ]:
2481
2499
args = [options ['entry_point' ]]
2482
2500
@@ -2939,6 +2957,8 @@ def _cmd_setup_server(command, args, options):
2939
2957
options ['httpd_arguments_list' ].append ('-DMOD_WSGI_WITH_HTTPS' )
2940
2958
if options ['ssl_ca_certificate_file' ]:
2941
2959
options ['httpd_arguments_list' ].append ('-DMOD_WSGI_VERIFY_CLIENT' )
2960
+ if options ['ssl_certificate_chain_file' ]:
2961
+ options ['httpd_arguments_list' ].append ('-DMOD_WSGI_CERTIFICATE_CHAIN' )
2942
2962
2943
2963
if options ['ssl_environment' ]:
2944
2964
options ['httpd_arguments_list' ].append ('-DMOD_WSGI_SSL_ENVIRONMENT' )
0 commit comments