From e3f2878909c1f92a0d92ed2a8ce00c96135e1346 Mon Sep 17 00:00:00 2001 From: Stanislav Laznicka Date: Apr 20 2017 10:20:27 +0000 Subject: 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 --- diff --git a/ipaserver/install/cainstance.py b/ipaserver/install/cainstance.py index 640d288..0672bcc 100644 --- a/ipaserver/install/cainstance.py +++ b/ipaserver/install/cainstance.py @@ -687,7 +687,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,