summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2013-03-18 16:29:48 +0000
committerweasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2013-03-18 16:29:48 +0000
commitc96e27d244663f22c4b04520ed3b62824ad6c099 (patch)
tree06e3d1585544e6bd7bc852cf8b8515f35fae9fb0
parentb7dd58015e4c6e7db37c805c13e02aa2638e1d19 (diff)
Include chainfile if exists for http ssl
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@597 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
-rwxr-xr-xbin/ldap2apache2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/ldap2apache b/bin/ldap2apache
index b77404b..a444048 100755
--- a/bin/ldap2apache
+++ b/bin/ldap2apache
@@ -182,6 +182,7 @@ clients.each{ |c|
if ssl
crtfile = "/etc/ssl/certs/apache-#{server_name}.pem"
+ chainfile = "/etc/ssl/certs/apache-#{server_name}-chain.pem"
keyfile = "/etc/ssl/private/apache-#{server_name}.key"
STDERR.puts "Warning: #{crtfile} does not exist" unless FileTest.exists?(crtfile)
STDERR.puts "Warning: #{keyfile} does not exist" unless FileTest.exists?(keyfile)
@@ -190,6 +191,7 @@ clients.each{ |c|
config << " SSLEngine on"
config << " SSLCertificateFile #{crtfile}"
config << " SSLCertificateKeyFile #{keyfile}"
+ config << " SSLCertificateChainFile #{chainfile}" if FileTest.exists?(chainfile)
config << ' <Files ~ "\.php$">'
config << ' SSLOptions +StdEnvVars'
config << ' </Files>'