mirror of
https://github.com/moepman/acertmgr.git
synced 2025-01-01 03:21:49 +01:00
New format: ca to be able to create cert-chains.
This commit is contained in:
parent
0346a6b492
commit
23b70c798c
@ -47,6 +47,7 @@ mode: webdir
|
|||||||
#mode: standalone
|
#mode: standalone
|
||||||
#port: 13135
|
#port: 13135
|
||||||
webdir: /var/www/acme-challenge/
|
webdir: /var/www/acme-challenge/
|
||||||
|
cafile: /etc/acme/letencrypt_ca.crt
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
format: crt
|
format: crt
|
||||||
|
@ -165,6 +165,7 @@ def cert_get(domain, settings):
|
|||||||
# @return the action to be executed after the certificate update
|
# @return the action to be executed after the certificate update
|
||||||
def cert_put(domain, settings):
|
def cert_put(domain, settings):
|
||||||
# TODO error handling
|
# TODO error handling
|
||||||
|
ca_file = settings.get("cafile", "")
|
||||||
crt_user = settings['user']
|
crt_user = settings['user']
|
||||||
crt_group = settings['group']
|
crt_group = settings['group']
|
||||||
crt_perm = settings['perm']
|
crt_perm = settings['perm']
|
||||||
@ -185,7 +186,12 @@ def cert_put(domain, settings):
|
|||||||
src_fd = open(key_file, "r")
|
src_fd = open(key_file, "r")
|
||||||
crt_fd.write(src_fd.read())
|
crt_fd.write(src_fd.read())
|
||||||
src_fd.close()
|
src_fd.close()
|
||||||
# TODO fmt == "ca":
|
if fmt == "ca":
|
||||||
|
if not os.path.isfile(ca_file):
|
||||||
|
raise FileNotFoundError("The server key file (%s) is missing!" % ca_file)
|
||||||
|
src_fd = open(ca_file, "r")
|
||||||
|
crt_fd.write(src_fd.read())
|
||||||
|
src_fd.close()
|
||||||
else:
|
else:
|
||||||
# TODO error handling
|
# TODO error handling
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user