From 0cc6556df0a2167d6b1a485d57ca7e88335be5db Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Tue, 12 Jan 2016 17:43:41 +0100 Subject: [PATCH] Implement check© in cert_get --- acertmgr.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/acertmgr.py b/acertmgr.py index aa5bf49..16a09e0 100755 --- a/acertmgr.py +++ b/acertmgr.py @@ -11,6 +11,7 @@ import dateutil.parser import dateutil.relativedelta import os import re +import shutil import subprocess import tempfile import yaml @@ -93,11 +94,10 @@ def cert_get(domain, settings): with open(crt_file, "w") as crt_fd: crt_fd.write(crt) - # TODO check if resulting certificate is valid - # TODO store resulting certificate at final location - - except Exception: - raise + # if resulting certificate is valid: store in final location + if cert_isValid(crt_file, 60): + crt_final = ACME_DIR + "%s.crt" % domain + shutil.copy2(crt_file, crt_final) finally: os.remove(csr_file)