From 9a33bc918c1078402479101249b770ebc7e64d6b Mon Sep 17 00:00:00 2001 From: Stephane Lapie Date: Mon, 20 Jan 2014 16:03:33 +0900 Subject: Separate CAs for client certs and server cert chain - Modified the VirtualHost screen to make more clear the difference between "server certificate chain" and "client certification authority" - Modified configuration generation accordingly with proper options (SSLCertificateChainFile for server cert chain, SSLCACertificateFile for client certificates) according to Apache documentation --- config/apache_mod_security-dev/apache_mod_security.inc | 9 +++++++-- config/apache_mod_security-dev/apache_virtualhost.xml | 14 ++++++++++++-- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/config/apache_mod_security-dev/apache_mod_security.inc b/config/apache_mod_security-dev/apache_mod_security.inc index 31be95cf..2728e2e9 100644 --- a/config/apache_mod_security-dev/apache_mod_security.inc +++ b/config/apache_mod_security-dev/apache_mod_security.inc @@ -569,9 +569,14 @@ EOF; $vh_config.= " SSLCertificateKeyFile ". APACHEDIR . "/etc/apache22/{$virtualhost["ssl_cert"]}.key\n"; } } - $svr_ca =lookup_ca($virtualhost["reverse_int_ca"]); + $svr_ca =lookup_ca($virtualhost["ssl_cert_chain"]); if ($svr_ca != false) { - file_put_contents(APACHEDIR . "/etc/apache22/{$virtualhost["reverse_int_ca"]}.crt",apache_textarea_decode($svr_ca['crt']),LOCK_EX); + file_put_contents(APACHEDIR . "/etc/apache22/{$virtualhost["ssl_cert_chain"]}.crt",apache_textarea_decode($svr_ca['crt']),LOCK_EX); + $vh_config.= " SSLCertificateChainFile ". APACHEDIR . "/etc/apache22/{$virtualhost["ssl_cert_chain"]}.crt\n"; + } + $cli_ca =lookup_ca($virtualhost["reverse_int_ca"]); + if ($cli_ca != false) { + file_put_contents(APACHEDIR . "/etc/apache22/{$virtualhost["reverse_int_ca"]}.crt",apache_textarea_decode($cli_ca['crt']),LOCK_EX); $vh_config.= " SSLCACertificateFile ". APACHEDIR . "/etc/apache22/{$virtualhost["reverse_int_ca"]}.crt\n"; } } diff --git a/config/apache_mod_security-dev/apache_virtualhost.xml b/config/apache_mod_security-dev/apache_virtualhost.xml index 747ef975..7851e683 100644 --- a/config/apache_mod_security-dev/apache_virtualhost.xml +++ b/config/apache_mod_security-dev/apache_virtualhost.xml @@ -267,9 +267,19 @@ none - Intermediate CA certificate (optional) + HTTPS SSL certificate chain + ssl_cert_chain + Select intermediate CA assigned to server certificate. Not all certificates require this. + select_source + + descr + refid + none + + + Client certificates CA (optional) reverse_int_ca - Select intermediate CA assigned to certificate. Not all certificates require this. + Select CA assigned to client certificates. select_source descr -- cgit v1.2.3