URL: https://github.com/freeipa/freeipa/pull/722
Author: stlaz
 Title: #722: Fix server upgrade
Action: opened

PR body:
"""
OpenSSL can't cope with empty files, add a newline after each password

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

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/722/head:pr722
git checkout pr722
From 7945c8a9a021978c5dc82bbfe8b3b52410be5d53 Mon Sep 17 00:00:00 2001
From: Stanislav Laznicka <slazn...@redhat.com>
Date: Thu, 20 Apr 2017 10:09:05 +0200
Subject: [PATCH] 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
---
 ipaserver/install/cainstance.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ipaserver/install/cainstance.py b/ipaserver/install/cainstance.py
index b6b915c..84d60bf 100644
--- a/ipaserver/install/cainstance.py
+++ b/ipaserver/install/cainstance.py
@@ -690,7 +690,7 @@ def import_ra_cert(self, rafile, password=''):
 
         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,
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to