[mod] create list in one step

This commit is contained in:
Laurent Peuch 2016-11-28 14:32:24 +01:00
parent 7f046f0880
commit 5b73ab448f

View file

@ -192,11 +192,12 @@ def _certificate_install_selfsigned(domain_list, force=False):
# Use OpenSSL command line to create a certificate signing request, # Use OpenSSL command line to create a certificate signing request,
# and self-sign the cert # and self-sign the cert
commands = [] commands = [
commands.append("openssl req -new -config %s -days 3650 -out %s -keyout %s -nodes -batch" "openssl req -new -config %s -days 3650 -out %s -keyout %s -nodes -batch"
% (conf_file, csr_file, key_file)) % (conf_file, csr_file, key_file),
commands.append("openssl ca -config %s -days 3650 -in %s -out %s -batch" "openssl ca -config %s -days 3650 -in %s -out %s -batch"
% (conf_file, csr_file, crt_file)) % (conf_file, csr_file, crt_file),
]
for command in commands: for command in commands:
p = subprocess.Popen( p = subprocess.Popen(