Fix CAInstance.import_ra_cert for empty passwords

OpenSSL can't cope with empty files, add a newline after each password

https://pagure.io/freeipa/issue/6878

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
Stanislav Laznicka
2017-04-20 10:09:05 +02:00
committed by Jan Cholasta
parent 4322b57e31
commit b38750eaa8

View File

@@ -690,7 +690,7 @@ class CAInstance(DogtagInstance):
Used when setting up replication
"""
with ipautil.write_tmp_file(password) as f:
with ipautil.write_tmp_file(password + '\n') as f:
pwdarg = 'file:{file}'.format(file=f.name)
# get the private key from the file
ipautil.run([paths.OPENSSL,