403b09
From fdcaf9f8437fcd12220af125a4fe0871c6d33f47 Mon Sep 17 00:00:00 2001
403b09
From: Jan Cholasta <jcholast@redhat.com>
403b09
Date: Thu, 4 Aug 2016 09:58:38 +0200
403b09
Subject: [PATCH] install: fix external CA cert validation
403b09
403b09
The code which loads the external CA cert chain was never executed because
403b09
of an incorrect usage of an iterator (iterating over it twice).
403b09
403b09
https://fedorahosted.org/freeipa/ticket/6166
403b09
403b09
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
403b09
---
403b09
 ipaserver/install/installutils.py | 2 +-
403b09
 1 file changed, 1 insertion(+), 1 deletion(-)
403b09
403b09
diff --git a/ipaserver/install/installutils.py b/ipaserver/install/installutils.py
403b09
index 25f48aed1eeaa03353465bc40abf3484ec19bf3b..66ba33326adcdb47c2ba77c573ba9b66a82b365e 100644
403b09
--- a/ipaserver/install/installutils.py
403b09
+++ b/ipaserver/install/installutils.py
403b09
@@ -1038,7 +1038,7 @@ def load_external_cert(files, subject_base):
403b09
             raise ScriptError(
403b09
                 "IPA CA certificate not found in %s" % (", ".join(files)))
403b09
 
403b09
-        trust_chain = reversed(nssdb.get_trust_chain(ca_nickname))
403b09
+        trust_chain = list(reversed(nssdb.get_trust_chain(ca_nickname)))
403b09
         ca_cert_chain = []
403b09
         for nickname in trust_chain:
403b09
             cert, subject, issuer = cache[nickname]
403b09
-- 
403b09
2.7.4
403b09