1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-11-22 02:17:26 +00:00

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

View File

@ -87,8 +87,12 @@ def get_domain_ssl_files(domain, env):
else: else:
ssl_certificate = os.path.join(env["STORAGE_ROOT"], 'ssl/domains/%s_certifiate.pem' % safe_domain_name(domain)) ssl_certificate = os.path.join(env["STORAGE_ROOT"], 'ssl/domains/%s_certifiate.pem' % safe_domain_name(domain))
# Where would the CSR go? # Where would the CSR go? As with the SSL cert itself, the CSR must be
csr_path = os.path.join(env["STORAGE_ROOT"], 'ssl/domains/%s_cert_sign_req.csr' % safe_domain_name(domain)) # 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 return ssl_key, ssl_certificate, csr_path