mirror of
https://github.com/moepman/acertmgr.git
synced 2025-01-01 05:31:51 +01:00
Implement check© in cert_get
This commit is contained in:
parent
4089faa997
commit
0cc6556df0
10
acertmgr.py
10
acertmgr.py
@ -11,6 +11,7 @@ import dateutil.parser
|
|||||||
import dateutil.relativedelta
|
import dateutil.relativedelta
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import tempfile
|
import tempfile
|
||||||
import yaml
|
import yaml
|
||||||
@ -93,11 +94,10 @@ def cert_get(domain, settings):
|
|||||||
with open(crt_file, "w") as crt_fd:
|
with open(crt_file, "w") as crt_fd:
|
||||||
crt_fd.write(crt)
|
crt_fd.write(crt)
|
||||||
|
|
||||||
# TODO check if resulting certificate is valid
|
# if resulting certificate is valid: store in final location
|
||||||
# TODO store resulting certificate at final location
|
if cert_isValid(crt_file, 60):
|
||||||
|
crt_final = ACME_DIR + "%s.crt" % domain
|
||||||
except Exception:
|
shutil.copy2(crt_file, crt_final)
|
||||||
raise
|
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
os.remove(csr_file)
|
os.remove(csr_file)
|
||||||
|
Loading…
Reference in New Issue
Block a user