1
0
mirror of https://github.com/moepman/acertmgr.git synced 2024-11-13 06:45:24 +01:00

acertmgr: Fix wrong variable (works due to global var at this point)

This commit is contained in:
Kishi85 2019-02-18 20:43:13 +01:00
parent 2dbc7302eb
commit da3dc4261f

View File

@ -83,16 +83,16 @@ def cert_get(settings):
# find challenge handlers for this certificate
challenge_handlers = dict()
for domain in config['domainlist']:
for domain in settings['domainlist']:
# Create the challenge handler
challenge_handlers[domain] = create_challenge_handler(settings['handlers'][domain])
try:
key = tools.read_key(key_file)
cr = tools.new_cert_request(config['domainlist'], key)
cr = tools.new_cert_request(settings['domainlist'], key)
print("Reading account key...")
acme.register_account()
crt = acme.get_crt_from_csr(cr, config['domainlist'], challenge_handlers)
crt = acme.get_crt_from_csr(cr, settings['domainlist'], challenge_handlers)
with io.open(crt_file, "w") as crt_fd:
crt_fd.write(tools.convert_cert_to_pem(crt))
@ -102,7 +102,7 @@ def cert_get(settings):
shutil.copy2(crt_file, crt_final)
os.chmod(crt_final, stat.S_IREAD)
# download current ca file for the new certificate if no static ca is configured
if "static_ca" in settings and not config['static_ca']:
if "static_ca" in settings and not settings['static_ca']:
tools.download_issuer_ca(crt_final, settings['ca_file'])
finally: