1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-15 17:37:22 +01:00

drop the CSR_COUNTRY setting and ask within the control panel

This commit is contained in:
Joshua Tauberer
2015-12-26 11:48:23 -05:00
parent 392d33b902
commit d53332b7cf
10 changed files with 45 additions and 55 deletions

View File

@@ -137,12 +137,12 @@ def get_domain_ssl_files(domain, ssl_certificates, env, allow_missing_cert=False
return cert_info['private-key'], cert_info['certificate'], via
def create_csr(domain, ssl_key, env):
def create_csr(domain, ssl_key, country_code, env):
return shell("check_output", [
"openssl", "req", "-new",
"-key", ssl_key,
"-sha256",
"-subj", "/C=%s/ST=/L=/O=/CN=%s" % (env["CSR_COUNTRY"], domain)])
"-subj", "/C=%s/ST=/L=/O=/CN=%s" % (country_code, domain)])
def install_cert(domain, ssl_cert, ssl_chain, env):
# Write the combined cert+chain to a temporary path and validate that it is OK.