summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Jones2011-04-18 22:27:34 +0100
committerSteven Jones2011-04-18 22:27:34 +0100
commita86f82a272ab10391b99584ea563ed1d7af5023e (patch)
tree62a6ae848a40de67236e7f88a9a2f4d0608c5521
parent93e0701541dc3aa8d6ef0646b478d0c4387c4029 (diff)
Fix up the previous commit.dev-ssl-chained-1062168
-rw-r--r--http/apache_ssl/vhost_ssl.tpl.php11
-rw-r--r--http/http.ssl.inc18
2 files changed, 14 insertions, 15 deletions
diff --git a/http/apache_ssl/vhost_ssl.tpl.php b/http/apache_ssl/vhost_ssl.tpl.php
index 899ac03..bf628bb 100644
--- a/http/apache_ssl/vhost_ssl.tpl.php
+++ b/http/apache_ssl/vhost_ssl.tpl.php
@@ -30,12 +30,11 @@
SSLCertificateKeyFile <?php print $ssl_cert_key; ?>
- <?php
- if(!empty($ssl_chain_cert)) {
- print "SSLCertificateChainFile $ssl_chain_cert";
- }
- ?>
-<?php
+ <?php if (!empty($ssl_chain_cert)) : ?>
+ SSLCertificateChainFile <?php print $ssl_chain_cert; ?>
+ <?php endif; ?>
+
+<?php
if (sizeof($this->aliases)) {
print "\n ServerAlias " . implode("\n ServerAlias ", $this->aliases) . "\n";
diff --git a/http/http.ssl.inc b/http/http.ssl.inc
index 1e61c7d..8c49b6e 100644
--- a/http/http.ssl.inc
+++ b/http/http.ssl.inc
@@ -105,12 +105,12 @@ class provisionService_http_ssl extends provisionService_http_public {
$path = "{$this->server->http_ssld_path}/{$ssl_key}";
$certs['ssl_cert_key'] = "{$path}/openssl.key";
$certs['ssl_cert'] = "{$path}/openssl.crt";
-
- // If the chain file exists, add it
+
+ // If a certificate chain file exists, add it.
$chain_cert_source = "{$source_path}/openssl_chain.crt";
- if( provision_file()->exists($chain_cert_source)->status() ) {
- $certs['ssl_chain_cert'] = "{$path}/openssl_chain.crt";
+ if (provision_file()->exists($chain_cert_source)->status()) {
$certs['ssl_chain_cert_source'] = $chain_cert_source;
+ $certs['ssl_chain_cert'] = "{$path}/openssl_chain.crt";
}
return $certs;
}
@@ -302,11 +302,11 @@ class provisionConfig_http_ssl_site extends provisionConfig_http_site {
provision_file()->copy(
$this->data['ssl_cert_key_source'],
$this->data['ssl_cert_key']);
- // Copy the chain certificate, if it is set
- if(!empty($this->data['ssl_chain_cert_source'])) {
- provision_file()->copy(
- $this->data['ssl_chain_cert_source'],
- $this->data['ssl_chain_cert']);
+ // Copy the chain certificate, if it is set.
+ if (!empty($this->data['ssl_chain_cert_source'])) {
+ provision_file()->copy(
+ $this->data['ssl_chain_cert_source'],
+ $this->data['ssl_chain_cert']);
}
// Sync the key directory to the remote server.
$this->data['server']->sync($path, array(