mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2026-03-18 18:07:22 +01:00
get_domain_ssl_files returned the wrong path for the CSR for PRIMARY_HOSTNAME
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user