get_domain_ssl_files returned the wrong path for the CSR for PRIMARY_HOSTNAME

This commit is contained in:
Joshua Tauberer 2014-06-30 19:49:41 +00:00
parent b5aa1b0f31
commit 06ba25151f
1 changed files with 6 additions and 2 deletions

View File

@ -87,8 +87,12 @@ def get_domain_ssl_files(domain, env):
else:
ssl_certificate = os.path.join(env["STORAGE_ROOT"], 'ssl/domains/%s_certifiate.pem' % safe_domain_name(domain))
# Where would the CSR go?
csr_path = os.path.join(env["STORAGE_ROOT"], 'ssl/domains/%s_cert_sign_req.csr' % safe_domain_name(domain))
# Where would the CSR go? As with the SSL cert itself, the CSR must be
# different for each domain name.
if domain == env['PRIMARY_HOSTNAME']:
csr_path = os.path.join(env["STORAGE_ROOT"], 'ssl/ssl_cert_sign_req.csr')
else:
csr_path = os.path.join(env["STORAGE_ROOT"], 'ssl/domains/%s_cert_sign_req.csr' % safe_domain_name(domain))
return ssl_key, ssl_certificate, csr_path