Make sure ca_folder is created before chdir()ing into it.

This commit is contained in:
Soren Hansen 2011-04-06 19:41:35 +00:00 committed by Tarmac
commit 19efb8675f

View File

@ -269,6 +269,8 @@ def _sign_csr(csr_text, ca_folder):
LOG.debug(_("Flags path: %s"), ca_folder)
start = os.getcwd()
# Change working dir to CA
if not os.path.exists(ca_folder):
os.makedirs(ca_folder)
os.chdir(ca_folder)
utils.execute('openssl', 'ca', '-batch', '-out', outbound, '-config',
'./openssl.cnf', '-infiles', inbound)