From eba9f2c99c7134c7b714bc74597837160797f233 Mon Sep 17 00:00:00 2001
From: Endi Sukma Dewata <edewata@redhat.com>
Date: Fri, 24 May 2013 02:09:40 -0400
Subject: [PATCH] Renamed CA_HOST into PKI_CA_HOSTNAME.

The CA_HOST variable has been renamed into PKI_CA_HOSTNAME
for consistency.
---
 base/ra/shared/conf/CS.cfg.in       | 2 +-
 base/server/config/pkislots.cfg     | 1 +
 base/server/src/engine/pkiparser.py | 2 ++
 base/tps/setup/create.pl            | 6 +++---
 base/tps/shared/conf/CS.cfg.in      | 2 +-
 5 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/base/ra/shared/conf/CS.cfg.in b/base/ra/shared/conf/CS.cfg.in
index 8290eea0fbaad67efd4fb62248f34445de071a4d..3a2a11af06de63c46435a6d6a7373e70bafbe091 100644
--- a/base/ra/shared/conf/CS.cfg.in
+++ b/base/ra/shared/conf/CS.cfg.in
@@ -179,7 +179,7 @@ conn.ca1._020=# where
 conn.ca1._021=#  <n>  - CA connection ID
 conn.ca1._022=#########################################
 failover.pod.enable=false
-conn.ca1.hostport=[CA_HOST]:[CA_PORT]
+conn.ca1.hostport=[PKI_CA_HOSTNAME]:[CA_PORT]
 conn.ca1.clientNickname=[HSM_LABEL][NICKNAME]
 conn.ca1.servlet.enrollment=/ca/ee/ca/profileSubmitSSLClient
 conn.ca1.servlet.addagent=/ca/admin/ca/registerRaUser
diff --git a/base/server/config/pkislots.cfg b/base/server/config/pkislots.cfg
index dcdc48f3df29cdf41f9f6effd7b7c916e969b0db..56a3fc47cd207a8b0b37e9fff79ae91d85d8c168 100644
--- a/base/server/config/pkislots.cfg
+++ b/base/server/config/pkislots.cfg
@@ -37,6 +37,7 @@ PKI_AGENT_CLIENTAUTH_SLOT=[PKI_AGENT_CLIENTAUTH]
 PKI_AGENT_SECURE_PORT_SLOT=[PKI_AGENT_SECURE_PORT]
 PKI_AJP_PORT_SLOT=[PKI_AJP_PORT]
 PKI_AJP_REDIRECT_PORT_SLOT=[PKI_AJP_REDIRECT_PORT]
+PKI_CA_HOSTNAME_SLOT=[PKI_CA_HOSTNAME]
 PKI_CERT_DB_PASSWORD_SLOT=[PKI_CERT_DB_PASSWORD]
 PKI_CFG_PATH_NAME_SLOT=[PKI_CFG_PATH_NAME]
 PKI_CLOSE_AJP_PORT_COMMENT_SLOT=[PKI_CLOSE_AJP_PORT_COMMENT]
diff --git a/base/server/src/engine/pkiparser.py b/base/server/src/engine/pkiparser.py
index 65eb2a4570ed817382ff93acf42828c91cb34415..cb202dd6be1ffca4efd221c788cd9cf1b533285a 100644
--- a/base/server/src/engine/pkiparser.py
+++ b/base/server/src/engine/pkiparser.py
@@ -654,6 +654,8 @@ class PKIConfigParser:
                     config.pki_master_dict['pki_ajp_port']
                 config.pki_master_dict['PKI_AJP_REDIRECT_PORT_SLOT'] =\
                     config.pki_master_dict['pki_https_port']
+                config.pki_master_dict['PKI_CA_HOSTNAME_SLOT'] =\
+                    config.pki_master_dict['pki_ca_hostname']
                 config.pki_master_dict['PKI_CERT_DB_PASSWORD_SLOT'] =\
                     config.pki_master_dict['pki_pin']
                 config.pki_master_dict['PKI_CFG_PATH_NAME_SLOT'] =\
diff --git a/base/tps/setup/create.pl b/base/tps/setup/create.pl
index 8082d5847ad40f32d536de1dd186c528ed832bae..4b88bc6cd615461e5788deae0b92f1e7b06df1d3 100755
--- a/base/tps/setup/create.pl
+++ b/base/tps/setup/create.pl
@@ -288,14 +288,14 @@ ASK_AUTH_ROOT:
   print ("************************************************\n");
   print ("\n");
 
-ASK_CA_HOST:
+ASK_PKI_CA_HOSTNAME:
   print ("Enter the hostname of the CA [$defaultServerName]: ");
   chomp ($caHost = <STDIN>);
   if ($caHost eq "") {
     $caHost = "$defaultServerName";
   }
   if ($caHost eq "") {
-    goto ASK_CA_HOST;
+    goto ASK_PKI_CA_HOSTNAME;
   }
 
 ASK_CA_PORT:
@@ -692,7 +692,7 @@ sub CopyTemplate
     s/\[TUS_PORT\]/$tusPort/g;
     s/\[TUS_ROOT\]/$tusRoot/g;
     s/\[TUS_PASS\]/$tusPass/g;
-    s/\[CA_HOST\]/$caHost/g;
+    s/\[PKI_CA_HOSTNAME\]/$caHost/g;
     s/\[CA_PORT\]/$caPort/g;
     s/\[DRM_HOST\]/$drmHost/g;
     s/\[DRM_PORT\]/$drmPort/g;
diff --git a/base/tps/shared/conf/CS.cfg.in b/base/tps/shared/conf/CS.cfg.in
index b5421b16298defe0658dfd1b33a9596573bb92df..fcf817695438992e26df6d849001fd5d95df3c8e 100644
--- a/base/tps/shared/conf/CS.cfg.in
+++ b/base/tps/shared/conf/CS.cfg.in
@@ -150,7 +150,7 @@ conn.ca1._028=# where
 conn.ca1._029=#  <n>  - CA connection ID
 conn.ca1._030=#########################################
 failover.pod.enable=false
-conn.ca1.hostport=[CA_HOST]:[CA_PORT]
+conn.ca1.hostport=[PKI_CA_HOSTNAME]:[CA_PORT]
 conn.ca1.clientNickname=[HSM_LABEL][NICKNAME]
 conn.ca1.servlet.enrollment=/ca/ee/ca/profileSubmitSSLClient
 conn.ca1.servlet.renewal=/ca/ee/ca/profileSubmitSSLClient
-- 
1.8.1.4

