diff --git a/acertmgr.py b/acertmgr.py index 325b9b8..3ff7386 100755 --- a/acertmgr.py +++ b/acertmgr.py @@ -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: