summaryrefslogtreecommitdiffstats
path: root/base/deploy/src/scriptlets/pkihelper.py
diff options
context:
space:
mode:
authorMatthew Harmsen <mharmsen@redhat.com>2012-12-06 14:23:21 -0800
committerMatthew Harmsen <mharmsen@redhat.com>2012-12-06 14:41:28 -0800
commit8d5eb937f99fd18398401f3f744eb85775293e23 (patch)
treefec1f35d9b315f574e6393b402a65585392e23eb /base/deploy/src/scriptlets/pkihelper.py
parent6180bb1b8a450d0e69d10c5e9bd85996e2858599 (diff)
downloadpki-8d5eb937f99fd18398401f3f744eb85775293e23.tar.gz
pki-8d5eb937f99fd18398401f3f744eb85775293e23.tar.xz
pki-8d5eb937f99fd18398401f3f744eb85775293e23.zip
Implemented ability to utilize an external CA
* TRAC Ticket #231 - Dogtag 10: Update PKI Deployment to handle external CA
Diffstat (limited to 'base/deploy/src/scriptlets/pkihelper.py')
-rw-r--r--base/deploy/src/scriptlets/pkihelper.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/base/deploy/src/scriptlets/pkihelper.py b/base/deploy/src/scriptlets/pkihelper.py
index 2d7b75938..5d89a1201 100644
--- a/base/deploy/src/scriptlets/pkihelper.py
+++ b/base/deploy/src/scriptlets/pkihelper.py
@@ -685,7 +685,8 @@ class configuration_file:
master['pki_user_deployment_cfg'],
extra=config.PKI_INDENTATION_LEVEL_2)
sys.exit(1)
- if not config.str2bool(master['pki_step_two']):
+ if not config.str2bool(master['pki_external_step_two']):
+ # External CA (Step 1)
if not master.has_key('pki_external_csr_path') or\
not len(master['pki_external_csr_path']):
config.pki_log.error(
@@ -694,13 +695,15 @@ class configuration_file:
master['pki_user_deployment_cfg'],
extra=config.PKI_INDENTATION_LEVEL_2)
sys.exit(1)
- elif not os.path.isfile(master['pki_external_csr_path']):
+ elif os.path.exists(master['pki_external_csr_path']) and\
+ not os.path.isfile(master['pki_external_csr_path']):
config.pki_log.error(
log.PKI_FILE_ALREADY_EXISTS_NOT_A_FILE_1,
master['pki_external_csr_path'],
extra=config.PKI_INDENTATION_LEVEL_2)
sys.exit(1)
else:
+ # External CA (Step 2)
if not master.has_key('pki_external_ca_cert_chain_path') or\
not len(master['pki_external_ca_cert_chain_path']):
config.pki_log.error(
@@ -709,7 +712,9 @@ class configuration_file:
master['pki_user_deployment_cfg'],
extra=config.PKI_INDENTATION_LEVEL_2)
sys.exit(1)
- elif not os.path.isfile(
+ elif os.path.exists(
+ master['pki_external_ca_cert_chain_path']) and\
+ not os.path.isfile(
master['pki_external_ca_cert_chain_path']):
config.pki_log.error(
log.PKI_FILE_ALREADY_EXISTS_NOT_A_FILE_1,
@@ -724,7 +729,8 @@ class configuration_file:
master['pki_user_deployment_cfg'],
extra=config.PKI_INDENTATION_LEVEL_2)
sys.exit(1)
- elif not os.path.isfile(
+ elif os.path.exists(master['pki_external_ca_cert_path']) and\
+ not os.path.isfile(
master['pki_external_ca_cert_path']):
config.pki_log.error(
log.PKI_FILE_ALREADY_EXISTS_NOT_A_FILE_1,