[Pki-devel] [PATCH] 671 Fixed KRA installation.

Endi Sukma Dewata edewata at redhat.com
Tue Feb 2 20:35:18 UTC 2016


Due to a recent change the KRA installation failed because the
installer was trying to read the pki_external_csr_path parameter
which is not available for KRA installation. The installer has
been fixed to read the parameter in external CA case only.

https://fedorahosted.org/pki/ticket/456

-- 
Endi S. Dewata
-------------- next part --------------
From 1c1385da125dbd3df6662e950aaeecdf35499600 Mon Sep 17 00:00:00 2001
From: "Endi S. Dewata" <edewata at redhat.com>
Date: Tue, 2 Feb 2016 03:32:50 +0100
Subject: [PATCH] Fixed KRA installation.

Due to a recent change the KRA installation failed because the
installer was trying to read the pki_external_csr_path parameter
which is not available for KRA installation. The installer has
been fixed to read the parameter in external CA case only.

https://fedorahosted.org/pki/ticket/456
---
 base/server/python/pki/server/deployment/pkihelper.py                | 1 -
 base/server/python/pki/server/deployment/scriptlets/configuration.py | 3 ++-
 base/server/sbin/pkispawn                                            | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/base/server/python/pki/server/deployment/pkihelper.py b/base/server/python/pki/server/deployment/pkihelper.py
index 0f5485a46274d0deff75b8fad52a034ace1118f0..429e1e93e35d91d92040d751f5d4ac24864e95a9 100644
--- a/base/server/python/pki/server/deployment/pkihelper.py
+++ b/base/server/python/pki/server/deployment/pkihelper.py
@@ -504,7 +504,6 @@ class ConfigurationFile:
         self.external = config.str2bool(self.mdict['pki_external'])
         self.external_step_one = not config.str2bool(self.mdict['pki_external_step_two'])
         self.external_step_two = not self.external_step_one
-        self.external_csr_path = self.mdict['pki_external_csr_path']
 
         if self.external:
             # generic extension support in CSR - for external CA
diff --git a/base/server/python/pki/server/deployment/scriptlets/configuration.py b/base/server/python/pki/server/deployment/scriptlets/configuration.py
index 7ecb4d76fd604a4f3aba1038f2bda3fd0e2f2d7e..d06d88f1dd0fd34f75f9a8ec93ae5b3684edaaa0 100644
--- a/base/server/python/pki/server/deployment/scriptlets/configuration.py
+++ b/base/server/python/pki/server/deployment/scriptlets/configuration.py
@@ -96,7 +96,6 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
         external = deployer.configuration_file.external
         step_one = deployer.configuration_file.external_step_one
         step_two = deployer.configuration_file.external_step_two
-        external_csr_path = deployer.configuration_file.external_csr_path
 
         try:
             if external and step_one:  # external/existing CA step 1
@@ -128,6 +127,7 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
 
                 # If filename specified, generate CA cert request and
                 # import it into CS.cfg.
+                external_csr_path = deployer.mdict['pki_external_csr_path']
                 if external_csr_path:
                     nssdb.create_request(
                         subject_dn=deployer.mdict['pki_ca_signing_subject_dn'],
@@ -150,6 +150,7 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
             elif external and step_two:  # external/existing CA step 2
 
                 # If specified, import existing CA cert request into CS.cfg.
+                external_csr_path = deployer.mdict['pki_external_csr_path']
                 if external_csr_path:
                     with open(external_csr_path) as f:
                         signing_csr = f.read()
diff --git a/base/server/sbin/pkispawn b/base/server/sbin/pkispawn
index bca33799c111cae40e530ec97c38cc0e06ce0223..7d839851faa20ebd5b53b0dd3be2fc77e0a3f69f 100755
--- a/base/server/sbin/pkispawn
+++ b/base/server/sbin/pkispawn
@@ -616,9 +616,9 @@ def main(argv):
 
     external = deployer.configuration_file.external
     step_one = deployer.configuration_file.external_step_one
-    external_csr_path = deployer.configuration_file.external_csr_path
 
     if external and step_one:
+        external_csr_path = deployer.mdict['pki_external_csr_path']
         if external_csr_path:
             print_external_ca_step_one_information(parser.mdict)
         else:
-- 
2.4.3



More information about the Pki-devel mailing list