pgreco / rpms / ipa

Forked from forks/areguera/rpms/ipa 4 years ago
Clone

Blame SOURCES/0091-Fix-CAInstance.import_ra_cert-for-empty-passwords.patch

483b06
From 61b5a76bcd856d679f05c5f5f12f770cc6826783 Mon Sep 17 00:00:00 2001
483b06
From: Stanislav Laznicka <slaznick@redhat.com>
483b06
Date: Thu, 20 Apr 2017 10:09:05 +0200
483b06
Subject: [PATCH] Fix CAInstance.import_ra_cert for empty passwords
483b06
483b06
OpenSSL can't cope with empty files, add a newline after each password
483b06
483b06
https://pagure.io/freeipa/issue/6878
483b06
483b06
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
483b06
---
483b06
 ipaserver/install/cainstance.py | 2 +-
483b06
 1 file changed, 1 insertion(+), 1 deletion(-)
483b06
483b06
diff --git a/ipaserver/install/cainstance.py b/ipaserver/install/cainstance.py
483b06
index 640d2884130dd152012e50dde45514f5ca26a523..0672bccf79d7cc6133fdb20f0854366306bfc2e0 100644
483b06
--- a/ipaserver/install/cainstance.py
483b06
+++ b/ipaserver/install/cainstance.py
483b06
@@ -687,7 +687,7 @@ class CAInstance(DogtagInstance):
483b06
 
483b06
         Used when setting up replication
483b06
         """
483b06
-        with ipautil.write_tmp_file(password) as f:
483b06
+        with ipautil.write_tmp_file(password + '\n') as f:
483b06
             pwdarg = 'file:{file}'.format(file=f.name)
483b06
             # get the private key from the file
483b06
             ipautil.run([paths.OPENSSL,
483b06
-- 
483b06
2.12.2
483b06