summaryrefslogtreecommitdiffstats
path: root/base/server/python/pki/server/deployment/scriptlets/finalization.py
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2015-11-07 00:09:19 +0100
committerEndi S. Dewata <edewata@redhat.com>2015-11-25 00:26:21 +0100
commit20c985ae773b26f653cac6d22bd9d93923e18c8e (patch)
treed10cf2d40b0434e35c0214700f26d4998db6778c /base/server/python/pki/server/deployment/scriptlets/finalization.py
parentec9c68d68eabff3784fcf6dabf2c6745734b3c9c (diff)
downloadpki-20c985ae773b26f653cac6d22bd9d93923e18c8e.tar.gz
pki-20c985ae773b26f653cac6d22bd9d93923e18c8e.tar.xz
pki-20c985ae773b26f653cac6d22bd9d93923e18c8e.zip
Added mechanism to import existing CA certificate.
The deployment procedure for external CA has been modified such that it generates the CA CSR before starting the server. This allows the same procedure to be used to import CA certificate from an existing server. It also removes the requirement to keep the server running while waiting to get the CSR signed by an external CA. https://fedorahosted.org/pki/ticket/456
Diffstat (limited to 'base/server/python/pki/server/deployment/scriptlets/finalization.py')
-rw-r--r--base/server/python/pki/server/deployment/scriptlets/finalization.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/base/server/python/pki/server/deployment/scriptlets/finalization.py b/base/server/python/pki/server/deployment/scriptlets/finalization.py
index 56ddf0219..3c4f469ac 100644
--- a/base/server/python/pki/server/deployment/scriptlets/finalization.py
+++ b/base/server/python/pki/server/deployment/scriptlets/finalization.py
@@ -67,9 +67,15 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
if len(deployer.instance.tomcat_instance_subsystems()) == 1:
# Modify contents of 'serverCertNick.conf' (if necessary)
deployer.servercertnick_conf.modify()
- # Optionally, programmatically 'restart' the configured PKI instance
- if config.str2bool(deployer.mdict['pki_restart_configured_instance']):
- deployer.systemd.restart()
+
+ external = config.str2bool(deployer.mdict['pki_external'])
+ step_one = not config.str2bool(deployer.mdict['pki_external_step_two'])
+
+ if not (external and step_one):
+ # Optionally, programmatically 'restart' the configured PKI instance
+ if config.str2bool(deployer.mdict['pki_restart_configured_instance']):
+ deployer.systemd.restart()
+
# Optionally, 'purge' the entire temporary client infrastructure
# including the client NSS security databases and password files
#