Commit df76c09b authored by anarcat's avatar anarcat

Merge branch 'dev-ssl-chained-1062168' into 7.x-2.x

Conflicts:
	aegir.make
	provision.info
	upgrade.sh.txt
parents 8989c537 a86f82a2
......@@ -30,7 +30,11 @@
SSLCertificateKeyFile <?php print $ssl_cert_key; ?>
<?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";
......
......@@ -106,6 +106,12 @@ class provisionService_http_ssl extends provisionService_http_public {
$certs['ssl_cert_key'] = "{$path}/openssl.key";
$certs['ssl_cert'] = "{$path}/openssl.crt";
// 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_source'] = $chain_cert_source;
$certs['ssl_chain_cert'] = "{$path}/openssl_chain.crt";
}
return $certs;
}
......@@ -296,7 +302,12 @@ 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']);
}
// Sync the key directory to the remote server.
$this->data['server']->sync($path, array(
'exclude' => "{$path}/*.receipt", // Don't need to synch the receipts
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment