summaryrefslogtreecommitdiffstats
path: root/pki
diff options
context:
space:
mode:
authormharmsen <mharmsen@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2009-06-01 20:25:15 +0000
committermharmsen <mharmsen@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2009-06-01 20:25:15 +0000
commita4975abe5eaf59b9594e3e7011daf24c823b2f12 (patch)
tree746b0fdd0ffeb7252a33df7f4dd239bae8392679 /pki
parent3f75048ac5c5e297c30c097e421da242cab2af53 (diff)
downloadpki-a4975abe5eaf59b9594e3e7011daf24c823b2f12.tar.gz
pki-a4975abe5eaf59b9594e3e7011daf24c823b2f12.tar.xz
pki-a4975abe5eaf59b9594e3e7011daf24c823b2f12.zip
Bugzilla Bug #503255 - Fix confusing "Security Domain" message when using
"status". git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@537 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki')
-rwxr-xr-xpki/base/ca/shared/etc/init.d/httpd242
-rwxr-xr-xpki/base/kra/shared/etc/init.d/httpd196
-rwxr-xr-xpki/base/ocsp/shared/etc/init.d/httpd196
-rwxr-xr-xpki/base/ra/etc/init.d/httpd196
-rwxr-xr-xpki/base/ra/lib/perl/PKI/RA/DisplayCertChainPanel.pm1
-rwxr-xr-xpki/base/tks/shared/etc/init.d/httpd196
-rwxr-xr-xpki/base/tps/etc/init.d/httpd196
-rwxr-xr-xpki/base/tps/lib/perl/PKI/TPS/DisplayCertChainPanel.pm1
8 files changed, 1152 insertions, 72 deletions
diff --git a/pki/base/ca/shared/etc/init.d/httpd b/pki/base/ca/shared/etc/init.d/httpd
index 49c8e1517..859943d5e 100755
--- a/pki/base/ca/shared/etc/init.d/httpd
+++ b/pki/base/ca/shared/etc/init.d/httpd
@@ -208,7 +208,7 @@ fi
pidfile=${PIDFILE:-/var/run/[PKI_INSTANCE_ID].pid}
lockfile=${LOCKFILE:-/var/lock/subsys/[PKI_INSTANCE_ID]}
-PKI_SECURITY_DOMAIN=[PKI_INSTANCE_PATH]/conf/pki_security_domain
+pki_instance_configuration_file=[PKI_INSTANCE_PATH]/conf/CS.cfg
RESTART_SERVER=[PKI_INSTANCE_PATH]/conf/restart_server_after_configuration
RETVAL=0
@@ -216,7 +216,7 @@ check_pki_configuration_status()
{
rv=0
- rv=`grep -c ^preop [PKI_INSTANCE_PATH]/conf/CS.cfg`
+ rv=`grep -c ^preop ${pki_instance_configuration_file}`
rv=`expr ${rv} + 0`
@@ -294,76 +294,191 @@ get_pki_status_definitions()
fi
}
-get_pki_security_domain_definitions()
+get_pki_configuration_definitions()
{
- # establish well-known strings
- begin_pki_status_comment="<!-- DO NOT REMOVE - Begin PKI Status Definitions -->"
- end_pki_status_comment="<!-- DO NOT REMOVE - End PKI Status Definitions -->"
- announce_urls=0
- total_ports=0
- secure_admin_port_statement="Secure Admin Port = "
-
- # initialize looping variables
- pki_status_comment_found=0
+ # Obtain the PKI Subsystem Type
+ line=`grep ^cs.type= ${pki_instance_configuration_file}`
+ pki_subsystem=`echo "${line}" | cut -b9-`
+ if [ "${line}" != "" ] ; then
+ if [ "${pki_subsystem}" != "CA" ] &&
+ [ "${pki_subsystem}" != "KRA" ] &&
+ [ "${pki_subsystem}" != "OCSP" ] &&
+ [ "${pki_subsystem}" != "TKS" ] &&
+ [ "${pki_subsystem}" != "RA" ] &&
+ [ "${pki_subsystem}" != "TPS" ]
+ then
+ return 255
+ fi
+ if [ "${pki_subsystem}" == "KRA" ] ; then
+ # Rename "KRA" to "DRM"
+ pki_subsystem="DRM"
+ fi
+ else
+ return 255
+ fi
- # first check to see that an instance-specific "server.xml" file exists
- if [ ! -f [PKI_SERVER_XML_CONF] ] ; then
- echo "File '[PKI_SERVER_XML_CONF]' does not exist!"
- exit 255
+ # If "${pki_subsystem}" is a CA, DRM, OCSP, or TKS,
+ # check to see if "${pki_subsystem}" is a "Clone"
+ pki_clone=""
+ if [ "${pki_subsystem}" == "CA" ] ||
+ [ "${pki_subsystem}" == "DRM" ] ||
+ [ "${pki_subsystem}" == "OCSP" ] ||
+ [ "${pki_subsystem}" == "TKS" ]
+ then
+ line=`grep ^subsystem.select= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_clone=`echo "${line}" | cut -b18-`
+ if [ "${pki_clone}" != "Clone" ] ; then
+ # Reset "${pki_clone}" to be empty
+ pki_clone=""
+ fi
+ else
+ return 255
+ fi
fi
- # read this instance-specific "server.xml" file line-by-line
- # to obtain the current PKI Status Definitions
- exec < [PKI_SERVER_XML_CONF]
- while read line; do
- # first look for the well-known end PKI Status comment
- # (to turn off processing)
- if [ "$line" == "$end_pki_status_comment" ] ; then
- pki_status_comment_found=0
- break;
+ # If "${pki_subsystem}" is a CA, and is NOT a "Clone", check to
+ # see "${pki_subsystem}" is a "Root" or a "Subordinate" CA
+ pki_hierarchy=""
+ if [ "${pki_subsystem}" == "CA" ] &&
+ [ "${pki_clone}" != "Clone" ]
+ then
+ line=`grep ^hierarchy.select= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_hierarchy=`echo "${line}" | cut -b18-`
+ else
+ return 255
fi
+ fi
- # then look for the well-known begin PKI Status comment
- # (to turn on processing)
- if [ "$line" == "$begin_pki_status_comment" ] ; then
- pki_status_comment_found=1
+ # If ${pki_subsystem} is a CA, check to
+ # see if it is also a Security Domain
+ pki_security_domain=""
+ if [ "${pki_subsystem}" == "CA" ] ; then
+ line=`grep ^securitydomain.select= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_security_domain=`echo "${line}" | cut -b23-`
+ if [ "${pki_security_domain}" == "new" ] ; then
+ # Set a fixed value for "${pki_security_domain}"
+ pki_security_domain="(Security Domain)"
+ else
+ # Reset "${pki_security_domain}" to be empty
+ pki_security_domain=""
+ fi
+ else
+ return 255
fi
+ fi
- # once the well-known begin PKI Status comment has been found,
- # begin processing to obtain all of the PKI Status Definitions
- if [ $pki_status_comment_found -eq 1 ] ; then
+ # Always obtain this PKI instance's "registered"
+ # security domain information
+ pki_security_domain_name=""
+ pki_security_domain_hostname=""
+ pki_security_domain_https_admin_port=""
- # announce security domain URL
- if [ ${announce_urls} -eq 0 ] ; then
- echo
- echo
- echo " Security Domain URL:"
- echo " =========================================================================="
- announce_urls=`expr ${total_ports} + 1`
- fi
+ line=`grep ^securitydomain.name= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_security_domain_name=`echo "${line}" | cut -b21-`
+ else
+ return 255
+ fi
- # look for a PKI Status Definition and print the
- # security domain portion of it
- head=`echo "$line" | cut -b1-20`
- url=`echo "$line" | cut -b21-`
- if [ "$head" == "$secure_admin_port_statement" ]
- then
- security_domain=`echo "$url" | awk '{loc=index($0, "/ca/services"); printf substr($0, 1, (loc-1))}'` ;
- echo " $security_domain" ;
- total_ports=`expr ${total_ports} + 1`
- fi
- fi
- done
+ line=`grep ^securitydomain.host= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_security_domain_hostname=`echo "${line}" | cut -b21-`
+ else
+ return 255
+ fi
- if [ ${announce_urls} -ne 0 ] ; then
- echo " =========================================================================="
+ line=`grep ^securitydomain.httpsadminport= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_security_domain_https_admin_port=`echo "${line}" | cut -b31-`
+ else
+ return 255
fi
- if [ ${total_ports} -eq 1 ] ; then
- return 0
+ # Compose the "PKI Instance Name" Status Line
+ pki_instance_name="PKI Instance Name: [PKI_INSTANCE_ID]"
+
+ # Compose the "PKI Subsystem Type" Status Line
+ header="PKI Subsystem Type: "
+ if [ "${pki_clone}" != "" ] ; then
+ if [ "${pki_security_domain}" != "" ]; then
+ # Possible Values:
+ #
+ # "CA Clone (Security Domain)"
+ #
+ data="${pki_subsystem} ${pki_clone} ${pki_security_domain}"
+ else
+ # Possible Values:
+ #
+ # "CA Clone"
+ # "DRM Clone"
+ # "OCSP Clone"
+ # "TKS Clone"
+ #
+ data="${pki_subsystem} ${pki_clone}"
+ fi
+ elif [ "${pki_hierarchy}" != "" ] ; then
+ if [ "${pki_security_domain}" != "" ]; then
+ # Possible Values:
+ #
+ # "Root CA (Security Domain)"
+ # "Subordinate CA (Security Domain)"
+ #
+ data="${pki_hierarchy} ${pki_subsystem} ${pki_security_domain}"
+ else
+ # Possible Values:
+ #
+ # "Root CA"
+ # "Subordinate CA"
+ #
+ data="${pki_hierarchy} ${pki_subsystem}"
+ fi
+ else
+ # Possible Values:
+ #
+ # "DRM"
+ # "OCSP"
+ # "RA"
+ # "TKS"
+ # "TPS"
+ #
+ data="${pki_subsystem}"
+ fi
+ pki_subsystem_type="${header} ${data}"
+
+ # Compose the "Registered PKI Security Domain Information" Status Line
+ header="Name: "
+ registered_pki_security_domain_name="${header} ${pki_security_domain_name}"
+
+ header="URL: "
+ if [ "${pki_security_domain_hostname}" != "" ] &&
+ [ "${pki_security_domain_https_admin_port}" != "" ]
+ then
+ data="https://${pki_security_domain_hostname}:${pki_security_domain_https_admin_port}"
else
return 255
fi
+ registered_pki_security_domain_url="${header} ${data}"
+
+ # Print the "PKI Subsystem Type" Status Line
+ echo
+ echo " ${pki_instance_name}"
+
+ # Print the "PKI Subsystem Type" Status Line
+ echo
+ echo " ${pki_subsystem_type}"
+
+ # Print the "Registered PKI Security Domain Information" Status Line
+ echo
+ echo " Registered PKI Security Domain Information:"
+ echo " =========================================================================="
+ echo " ${registered_pki_security_domain_name}"
+ echo " ${registered_pki_security_domain_url}"
+ echo " =========================================================================="
+
+ return 0
}
get_pki_secure_port()
@@ -1074,20 +1189,13 @@ status()
if [ $? -eq 0 ] ; then
get_pki_status_definitions
if [ $? -ne 0 ] ; then
+ echo
echo "[PKI_INSTANCE_ID] Status Definitions not found"
fi
- if [ -f ${PKI_SECURITY_DOMAIN} ] ; then
- get_pki_security_domain_definitions
- if [ $? -ne 0 ] ; then
- echo "[PKI_INSTANCE_ID] Security Domain Definitions not found"
- fi
- else
- echo
+ get_pki_configuration_definitions
+ if [ $? -ne 0 ] ; then
echo
- echo " Security Domain URL:"
- echo " =========================================================================="
- echo " '[PKI_INSTANCE_ID]' is NOT a Security Domain!"
- echo " =========================================================================="
+ echo "[PKI_INSTANCE_ID] Configuration Definitions not found"
fi
fi
echo
diff --git a/pki/base/kra/shared/etc/init.d/httpd b/pki/base/kra/shared/etc/init.d/httpd
index a6c356743..2026d2e2e 100755
--- a/pki/base/kra/shared/etc/init.d/httpd
+++ b/pki/base/kra/shared/etc/init.d/httpd
@@ -208,6 +208,7 @@ fi
pidfile=${PIDFILE:-/var/run/[PKI_INSTANCE_ID].pid}
lockfile=${LOCKFILE:-/var/lock/subsys/[PKI_INSTANCE_ID]}
+pki_instance_configuration_file=[PKI_INSTANCE_PATH]/conf/CS.cfg
RESTART_SERVER=[PKI_INSTANCE_PATH]/conf/restart_server_after_configuration
RETVAL=0
@@ -215,7 +216,7 @@ check_pki_configuration_status()
{
rv=0
- rv=`grep -c ^preop [PKI_INSTANCE_PATH]/conf/CS.cfg`
+ rv=`grep -c ^preop ${pki_instance_configuration_file}`
rv=`expr ${rv} + 0`
@@ -293,6 +294,193 @@ get_pki_status_definitions()
fi
}
+get_pki_configuration_definitions()
+{
+ # Obtain the PKI Subsystem Type
+ line=`grep ^cs.type= ${pki_instance_configuration_file}`
+ pki_subsystem=`echo "${line}" | cut -b9-`
+ if [ "${line}" != "" ] ; then
+ if [ "${pki_subsystem}" != "CA" ] &&
+ [ "${pki_subsystem}" != "KRA" ] &&
+ [ "${pki_subsystem}" != "OCSP" ] &&
+ [ "${pki_subsystem}" != "TKS" ] &&
+ [ "${pki_subsystem}" != "RA" ] &&
+ [ "${pki_subsystem}" != "TPS" ]
+ then
+ return 255
+ fi
+ if [ "${pki_subsystem}" == "KRA" ] ; then
+ # Rename "KRA" to "DRM"
+ pki_subsystem="DRM"
+ fi
+ else
+ return 255
+ fi
+
+ # If "${pki_subsystem}" is a CA, DRM, OCSP, or TKS,
+ # check to see if "${pki_subsystem}" is a "Clone"
+ pki_clone=""
+ if [ "${pki_subsystem}" == "CA" ] ||
+ [ "${pki_subsystem}" == "DRM" ] ||
+ [ "${pki_subsystem}" == "OCSP" ] ||
+ [ "${pki_subsystem}" == "TKS" ]
+ then
+ line=`grep ^subsystem.select= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_clone=`echo "${line}" | cut -b18-`
+ if [ "${pki_clone}" != "Clone" ] ; then
+ # Reset "${pki_clone}" to be empty
+ pki_clone=""
+ fi
+ else
+ return 255
+ fi
+ fi
+
+ # If "${pki_subsystem}" is a CA, and is NOT a "Clone", check to
+ # see "${pki_subsystem}" is a "Root" or a "Subordinate" CA
+ pki_hierarchy=""
+ if [ "${pki_subsystem}" == "CA" ] &&
+ [ "${pki_clone}" != "Clone" ]
+ then
+ line=`grep ^hierarchy.select= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_hierarchy=`echo "${line}" | cut -b18-`
+ else
+ return 255
+ fi
+ fi
+
+ # If ${pki_subsystem} is a CA, check to
+ # see if it is also a Security Domain
+ pki_security_domain=""
+ if [ "${pki_subsystem}" == "CA" ] ; then
+ line=`grep ^securitydomain.select= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_security_domain=`echo "${line}" | cut -b23-`
+ if [ "${pki_security_domain}" == "new" ] ; then
+ # Set a fixed value for "${pki_security_domain}"
+ pki_security_domain="(Security Domain)"
+ else
+ # Reset "${pki_security_domain}" to be empty
+ pki_security_domain=""
+ fi
+ else
+ return 255
+ fi
+ fi
+
+ # Always obtain this PKI instance's "registered"
+ # security domain information
+ pki_security_domain_name=""
+ pki_security_domain_hostname=""
+ pki_security_domain_https_admin_port=""
+
+ line=`grep ^securitydomain.name= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_security_domain_name=`echo "${line}" | cut -b21-`
+ else
+ return 255
+ fi
+
+ line=`grep ^securitydomain.host= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_security_domain_hostname=`echo "${line}" | cut -b21-`
+ else
+ return 255
+ fi
+
+ line=`grep ^securitydomain.httpsadminport= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_security_domain_https_admin_port=`echo "${line}" | cut -b31-`
+ else
+ return 255
+ fi
+
+ # Compose the "PKI Instance Name" Status Line
+ pki_instance_name="PKI Instance Name: [PKI_INSTANCE_ID]"
+
+ # Compose the "PKI Subsystem Type" Status Line
+ header="PKI Subsystem Type: "
+ if [ "${pki_clone}" != "" ] ; then
+ if [ "${pki_security_domain}" != "" ]; then
+ # Possible Values:
+ #
+ # "CA Clone (Security Domain)"
+ #
+ data="${pki_subsystem} ${pki_clone} ${pki_security_domain}"
+ else
+ # Possible Values:
+ #
+ # "CA Clone"
+ # "DRM Clone"
+ # "OCSP Clone"
+ # "TKS Clone"
+ #
+ data="${pki_subsystem} ${pki_clone}"
+ fi
+ elif [ "${pki_hierarchy}" != "" ] ; then
+ if [ "${pki_security_domain}" != "" ]; then
+ # Possible Values:
+ #
+ # "Root CA (Security Domain)"
+ # "Subordinate CA (Security Domain)"
+ #
+ data="${pki_hierarchy} ${pki_subsystem} ${pki_security_domain}"
+ else
+ # Possible Values:
+ #
+ # "Root CA"
+ # "Subordinate CA"
+ #
+ data="${pki_hierarchy} ${pki_subsystem}"
+ fi
+ else
+ # Possible Values:
+ #
+ # "DRM"
+ # "OCSP"
+ # "RA"
+ # "TKS"
+ # "TPS"
+ #
+ data="${pki_subsystem}"
+ fi
+ pki_subsystem_type="${header} ${data}"
+
+ # Compose the "Registered PKI Security Domain Information" Status Line
+ header="Name: "
+ registered_pki_security_domain_name="${header} ${pki_security_domain_name}"
+
+ header="URL: "
+ if [ "${pki_security_domain_hostname}" != "" ] &&
+ [ "${pki_security_domain_https_admin_port}" != "" ]
+ then
+ data="https://${pki_security_domain_hostname}:${pki_security_domain_https_admin_port}"
+ else
+ return 255
+ fi
+ registered_pki_security_domain_url="${header} ${data}"
+
+ # Print the "PKI Subsystem Type" Status Line
+ echo
+ echo " ${pki_instance_name}"
+
+ # Print the "PKI Subsystem Type" Status Line
+ echo
+ echo " ${pki_subsystem_type}"
+
+ # Print the "Registered PKI Security Domain Information" Status Line
+ echo
+ echo " Registered PKI Security Domain Information:"
+ echo " =========================================================================="
+ echo " ${registered_pki_security_domain_name}"
+ echo " ${registered_pki_security_domain_url}"
+ echo " =========================================================================="
+
+ return 0
+}
+
get_pki_secure_port()
{
# establish well-known strings
@@ -1001,8 +1189,14 @@ status()
if [ $? -eq 0 ] ; then
get_pki_status_definitions
if [ $? -ne 0 ] ; then
+ echo
echo "[PKI_INSTANCE_ID] Status Definitions not found"
fi
+ get_pki_configuration_definitions
+ if [ $? -ne 0 ] ; then
+ echo
+ echo "[PKI_INSTANCE_ID] Configuration Definitions not found"
+ fi
fi
echo
else
diff --git a/pki/base/ocsp/shared/etc/init.d/httpd b/pki/base/ocsp/shared/etc/init.d/httpd
index cb74c1ab4..17196c91d 100755
--- a/pki/base/ocsp/shared/etc/init.d/httpd
+++ b/pki/base/ocsp/shared/etc/init.d/httpd
@@ -208,6 +208,7 @@ fi
pidfile=${PIDFILE:-/var/run/[PKI_INSTANCE_ID].pid}
lockfile=${LOCKFILE:-/var/lock/subsys/[PKI_INSTANCE_ID]}
+pki_instance_configuration_file=[PKI_INSTANCE_PATH]/conf/CS.cfg
RESTART_SERVER=[PKI_INSTANCE_PATH]/conf/restart_server_after_configuration
RETVAL=0
@@ -215,7 +216,7 @@ check_pki_configuration_status()
{
rv=0
- rv=`grep -c ^preop [PKI_INSTANCE_PATH]/conf/CS.cfg`
+ rv=`grep -c ^preop ${pki_instance_configuration_file}`
rv=`expr ${rv} + 0`
@@ -293,6 +294,193 @@ get_pki_status_definitions()
fi
}
+get_pki_configuration_definitions()
+{
+ # Obtain the PKI Subsystem Type
+ line=`grep ^cs.type= ${pki_instance_configuration_file}`
+ pki_subsystem=`echo "${line}" | cut -b9-`
+ if [ "${line}" != "" ] ; then
+ if [ "${pki_subsystem}" != "CA" ] &&
+ [ "${pki_subsystem}" != "KRA" ] &&
+ [ "${pki_subsystem}" != "OCSP" ] &&
+ [ "${pki_subsystem}" != "TKS" ] &&
+ [ "${pki_subsystem}" != "RA" ] &&
+ [ "${pki_subsystem}" != "TPS" ]
+ then
+ return 255
+ fi
+ if [ "${pki_subsystem}" == "KRA" ] ; then
+ # Rename "KRA" to "DRM"
+ pki_subsystem="DRM"
+ fi
+ else
+ return 255
+ fi
+
+ # If "${pki_subsystem}" is a CA, DRM, OCSP, or TKS,
+ # check to see if "${pki_subsystem}" is a "Clone"
+ pki_clone=""
+ if [ "${pki_subsystem}" == "CA" ] ||
+ [ "${pki_subsystem}" == "DRM" ] ||
+ [ "${pki_subsystem}" == "OCSP" ] ||
+ [ "${pki_subsystem}" == "TKS" ]
+ then
+ line=`grep ^subsystem.select= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_clone=`echo "${line}" | cut -b18-`
+ if [ "${pki_clone}" != "Clone" ] ; then
+ # Reset "${pki_clone}" to be empty
+ pki_clone=""
+ fi
+ else
+ return 255
+ fi
+ fi
+
+ # If "${pki_subsystem}" is a CA, and is NOT a "Clone", check to
+ # see "${pki_subsystem}" is a "Root" or a "Subordinate" CA
+ pki_hierarchy=""
+ if [ "${pki_subsystem}" == "CA" ] &&
+ [ "${pki_clone}" != "Clone" ]
+ then
+ line=`grep ^hierarchy.select= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_hierarchy=`echo "${line}" | cut -b18-`
+ else
+ return 255
+ fi
+ fi
+
+ # If ${pki_subsystem} is a CA, check to
+ # see if it is also a Security Domain
+ pki_security_domain=""
+ if [ "${pki_subsystem}" == "CA" ] ; then
+ line=`grep ^securitydomain.select= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_security_domain=`echo "${line}" | cut -b23-`
+ if [ "${pki_security_domain}" == "new" ] ; then
+ # Set a fixed value for "${pki_security_domain}"
+ pki_security_domain="(Security Domain)"
+ else
+ # Reset "${pki_security_domain}" to be empty
+ pki_security_domain=""
+ fi
+ else
+ return 255
+ fi
+ fi
+
+ # Always obtain this PKI instance's "registered"
+ # security domain information
+ pki_security_domain_name=""
+ pki_security_domain_hostname=""
+ pki_security_domain_https_admin_port=""
+
+ line=`grep ^securitydomain.name= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_security_domain_name=`echo "${line}" | cut -b21-`
+ else
+ return 255
+ fi
+
+ line=`grep ^securitydomain.host= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_security_domain_hostname=`echo "${line}" | cut -b21-`
+ else
+ return 255
+ fi
+
+ line=`grep ^securitydomain.httpsadminport= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_security_domain_https_admin_port=`echo "${line}" | cut -b31-`
+ else
+ return 255
+ fi
+
+ # Compose the "PKI Instance Name" Status Line
+ pki_instance_name="PKI Instance Name: [PKI_INSTANCE_ID]"
+
+ # Compose the "PKI Subsystem Type" Status Line
+ header="PKI Subsystem Type: "
+ if [ "${pki_clone}" != "" ] ; then
+ if [ "${pki_security_domain}" != "" ]; then
+ # Possible Values:
+ #
+ # "CA Clone (Security Domain)"
+ #
+ data="${pki_subsystem} ${pki_clone} ${pki_security_domain}"
+ else
+ # Possible Values:
+ #
+ # "CA Clone"
+ # "DRM Clone"
+ # "OCSP Clone"
+ # "TKS Clone"
+ #
+ data="${pki_subsystem} ${pki_clone}"
+ fi
+ elif [ "${pki_hierarchy}" != "" ] ; then
+ if [ "${pki_security_domain}" != "" ]; then
+ # Possible Values:
+ #
+ # "Root CA (Security Domain)"
+ # "Subordinate CA (Security Domain)"
+ #
+ data="${pki_hierarchy} ${pki_subsystem} ${pki_security_domain}"
+ else
+ # Possible Values:
+ #
+ # "Root CA"
+ # "Subordinate CA"
+ #
+ data="${pki_hierarchy} ${pki_subsystem}"
+ fi
+ else
+ # Possible Values:
+ #
+ # "DRM"
+ # "OCSP"
+ # "RA"
+ # "TKS"
+ # "TPS"
+ #
+ data="${pki_subsystem}"
+ fi
+ pki_subsystem_type="${header} ${data}"
+
+ # Compose the "Registered PKI Security Domain Information" Status Line
+ header="Name: "
+ registered_pki_security_domain_name="${header} ${pki_security_domain_name}"
+
+ header="URL: "
+ if [ "${pki_security_domain_hostname}" != "" ] &&
+ [ "${pki_security_domain_https_admin_port}" != "" ]
+ then
+ data="https://${pki_security_domain_hostname}:${pki_security_domain_https_admin_port}"
+ else
+ return 255
+ fi
+ registered_pki_security_domain_url="${header} ${data}"
+
+ # Print the "PKI Subsystem Type" Status Line
+ echo
+ echo " ${pki_instance_name}"
+
+ # Print the "PKI Subsystem Type" Status Line
+ echo
+ echo " ${pki_subsystem_type}"
+
+ # Print the "Registered PKI Security Domain Information" Status Line
+ echo
+ echo " Registered PKI Security Domain Information:"
+ echo " =========================================================================="
+ echo " ${registered_pki_security_domain_name}"
+ echo " ${registered_pki_security_domain_url}"
+ echo " =========================================================================="
+
+ return 0
+}
+
get_pki_secure_port()
{
# establish well-known strings
@@ -1001,8 +1189,14 @@ status()
if [ $? -eq 0 ] ; then
get_pki_status_definitions
if [ $? -ne 0 ] ; then
+ echo
echo "[PKI_INSTANCE_ID] Status Definitions not found"
fi
+ get_pki_configuration_definitions
+ if [ $? -ne 0 ] ; then
+ echo
+ echo "[PKI_INSTANCE_ID] Configuration Definitions not found"
+ fi
fi
echo
else
diff --git a/pki/base/ra/etc/init.d/httpd b/pki/base/ra/etc/init.d/httpd
index 97cf8e016..77c60966c 100755
--- a/pki/base/ra/etc/init.d/httpd
+++ b/pki/base/ra/etc/init.d/httpd
@@ -158,6 +158,7 @@ INITLOG_ARGS=""
# Path to the server binary and short-form for messages.
httpd=${HTTPD:-[FORTITUDE_DIR]/sbin/httpd}
prog=[INSTANCE_ID]
+pki_instance_configuration_file=[SERVER_ROOT]/conf/CS.cfg
pidfile=${PIDFILE:-[SERVER_ROOT]/logs/[INSTANCE_ID].pid}
lockfile=${LOCKFILE:-/var/lock/subsys/[INSTANCE_ID]}
RESTART_SERVER=[SERVER_ROOT]/conf/restart_server_after_configuration
@@ -184,7 +185,7 @@ check_pki_configuration_status()
{
rv=0
- rv=`grep -c ^preop [SERVER_ROOT]/conf/CS.cfg`
+ rv=`grep -c ^preop ${pki_instance_configuration_file}`
rv=`expr ${rv} + 0`
@@ -274,6 +275,193 @@ get_pki_status_definitions()
fi
}
+get_pki_configuration_definitions()
+{
+ # Obtain the PKI Subsystem Type
+ line=`grep ^cs.type= ${pki_instance_configuration_file}`
+ pki_subsystem=`echo "${line}" | cut -b9-`
+ if [ "${line}" != "" ] ; then
+ if [ "${pki_subsystem}" != "CA" ] &&
+ [ "${pki_subsystem}" != "KRA" ] &&
+ [ "${pki_subsystem}" != "OCSP" ] &&
+ [ "${pki_subsystem}" != "TKS" ] &&
+ [ "${pki_subsystem}" != "RA" ] &&
+ [ "${pki_subsystem}" != "TPS" ]
+ then
+ return 255
+ fi
+ if [ "${pki_subsystem}" == "KRA" ] ; then
+ # Rename "KRA" to "DRM"
+ pki_subsystem="DRM"
+ fi
+ else
+ return 255
+ fi
+
+ # If "${pki_subsystem}" is a CA, DRM, OCSP, or TKS,
+ # check to see if "${pki_subsystem}" is a "Clone"
+ pki_clone=""
+ if [ "${pki_subsystem}" == "CA" ] ||
+ [ "${pki_subsystem}" == "DRM" ] ||
+ [ "${pki_subsystem}" == "OCSP" ] ||
+ [ "${pki_subsystem}" == "TKS" ]
+ then
+ line=`grep ^subsystem.select= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_clone=`echo "${line}" | cut -b18-`
+ if [ "${pki_clone}" != "Clone" ] ; then
+ # Reset "${pki_clone}" to be empty
+ pki_clone=""
+ fi
+ else
+ return 255
+ fi
+ fi
+
+ # If "${pki_subsystem}" is a CA, and is NOT a "Clone", check to
+ # see "${pki_subsystem}" is a "Root" or a "Subordinate" CA
+ pki_hierarchy=""
+ if [ "${pki_subsystem}" == "CA" ] &&
+ [ "${pki_clone}" != "Clone" ]
+ then
+ line=`grep ^hierarchy.select= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_hierarchy=`echo "${line}" | cut -b18-`
+ else
+ return 255
+ fi
+ fi
+
+ # If ${pki_subsystem} is a CA, check to
+ # see if it is also a Security Domain
+ pki_security_domain=""
+ if [ "${pki_subsystem}" == "CA" ] ; then
+ line=`grep ^securitydomain.select= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_security_domain=`echo "${line}" | cut -b23-`
+ if [ "${pki_security_domain}" == "new" ] ; then
+ # Set a fixed value for "${pki_security_domain}"
+ pki_security_domain="(Security Domain)"
+ else
+ # Reset "${pki_security_domain}" to be empty
+ pki_security_domain=""
+ fi
+ else
+ return 255
+ fi
+ fi
+
+ # Always obtain this PKI instance's "registered"
+ # security domain information
+ pki_security_domain_name=""
+ pki_security_domain_hostname=""
+ pki_security_domain_https_admin_port=""
+
+ line=`grep ^securitydomain.name= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_security_domain_name=`echo "${line}" | cut -b21-`
+ else
+ return 255
+ fi
+
+ line=`grep ^securitydomain.host= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_security_domain_hostname=`echo "${line}" | cut -b21-`
+ else
+ return 255
+ fi
+
+ line=`grep ^securitydomain.httpsadminport= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_security_domain_https_admin_port=`echo "${line}" | cut -b31-`
+ else
+ return 255
+ fi
+
+ # Compose the "PKI Instance Name" Status Line
+ pki_instance_name="PKI Instance Name: [INSTANCE_ID]"
+
+ # Compose the "PKI Subsystem Type" Status Line
+ header="PKI Subsystem Type: "
+ if [ "${pki_clone}" != "" ] ; then
+ if [ "${pki_security_domain}" != "" ]; then
+ # Possible Values:
+ #
+ # "CA Clone (Security Domain)"
+ #
+ data="${pki_subsystem} ${pki_clone} ${pki_security_domain}"
+ else
+ # Possible Values:
+ #
+ # "CA Clone"
+ # "DRM Clone"
+ # "OCSP Clone"
+ # "TKS Clone"
+ #
+ data="${pki_subsystem} ${pki_clone}"
+ fi
+ elif [ "${pki_hierarchy}" != "" ] ; then
+ if [ "${pki_security_domain}" != "" ]; then
+ # Possible Values:
+ #
+ # "Root CA (Security Domain)"
+ # "Subordinate CA (Security Domain)"
+ #
+ data="${pki_hierarchy} ${pki_subsystem} ${pki_security_domain}"
+ else
+ # Possible Values:
+ #
+ # "Root CA"
+ # "Subordinate CA"
+ #
+ data="${pki_hierarchy} ${pki_subsystem}"
+ fi
+ else
+ # Possible Values:
+ #
+ # "DRM"
+ # "OCSP"
+ # "RA"
+ # "TKS"
+ # "TPS"
+ #
+ data="${pki_subsystem}"
+ fi
+ pki_subsystem_type="${header} ${data}"
+
+ # Compose the "Registered PKI Security Domain Information" Status Line
+ header="Name: "
+ registered_pki_security_domain_name="${header} ${pki_security_domain_name}"
+
+ header="URL: "
+ if [ "${pki_security_domain_hostname}" != "" ] &&
+ [ "${pki_security_domain_https_admin_port}" != "" ]
+ then
+ data="https://${pki_security_domain_hostname}:${pki_security_domain_https_admin_port}"
+ else
+ return 255
+ fi
+ registered_pki_security_domain_url="${header} ${data}"
+
+ # Print the "PKI Subsystem Type" Status Line
+ echo
+ echo " ${pki_instance_name}"
+
+ # Print the "PKI Subsystem Type" Status Line
+ echo
+ echo " ${pki_subsystem_type}"
+
+ # Print the "Registered PKI Security Domain Information" Status Line
+ echo
+ echo " Registered PKI Security Domain Information:"
+ echo " =========================================================================="
+ echo " ${registered_pki_security_domain_name}"
+ echo " ${registered_pki_security_domain_url}"
+ echo " =========================================================================="
+
+ return 0
+}
+
get_pki_secure_port()
{
# establish well-known strings
@@ -516,8 +704,14 @@ status()
if [ $? -eq 0 ] ; then
get_pki_status_definitions
if [ $? -ne 0 ] ; then
+ echo
echo "[INSTANCE_ID] Status Definitions not found"
fi
+ get_pki_configuration_definitions
+ if [ $? -ne 0 ] ; then
+ echo
+ echo "[INSTANCE_ID] Configuration Definitions not found"
+ fi
fi
echo
else
diff --git a/pki/base/ra/lib/perl/PKI/RA/DisplayCertChainPanel.pm b/pki/base/ra/lib/perl/PKI/RA/DisplayCertChainPanel.pm
index 06f8b992e..6c691eeb4 100755
--- a/pki/base/ra/lib/perl/PKI/RA/DisplayCertChainPanel.pm
+++ b/pki/base/ra/lib/perl/PKI/RA/DisplayCertChainPanel.pm
@@ -231,6 +231,7 @@ sub get_domain_xml
&PKI::RA::Wizard::debug_log("DisplayCertChainPanel: security domain '" .
$xml->{'Name'}[0] . "'");
$::config->put("preop.securitydomain.name", $xml->{'Name'}[0]);
+ $::config->put("securitydomain.name", $xml->{'Name'}[0]);
# parse xml and store information in CS.cfg
my $count = 0;
diff --git a/pki/base/tks/shared/etc/init.d/httpd b/pki/base/tks/shared/etc/init.d/httpd
index 3ee446aeb..6b71faac1 100755
--- a/pki/base/tks/shared/etc/init.d/httpd
+++ b/pki/base/tks/shared/etc/init.d/httpd
@@ -208,6 +208,7 @@ fi
pidfile=${PIDFILE:-/var/run/[PKI_INSTANCE_ID].pid}
lockfile=${LOCKFILE:-/var/lock/subsys/[PKI_INSTANCE_ID]}
+pki_instance_configuration_file=[PKI_INSTANCE_PATH]/conf/CS.cfg
RESTART_SERVER=[PKI_INSTANCE_PATH]/conf/restart_server_after_configuration
RETVAL=0
@@ -215,7 +216,7 @@ check_pki_configuration_status()
{
rv=0
- rv=`grep -c ^preop [PKI_INSTANCE_PATH]/conf/CS.cfg`
+ rv=`grep -c ^preop ${pki_instance_configuration_file}`
rv=`expr ${rv} + 0`
@@ -293,6 +294,193 @@ get_pki_status_definitions()
fi
}
+get_pki_configuration_definitions()
+{
+ # Obtain the PKI Subsystem Type
+ line=`grep ^cs.type= ${pki_instance_configuration_file}`
+ pki_subsystem=`echo "${line}" | cut -b9-`
+ if [ "${line}" != "" ] ; then
+ if [ "${pki_subsystem}" != "CA" ] &&
+ [ "${pki_subsystem}" != "KRA" ] &&
+ [ "${pki_subsystem}" != "OCSP" ] &&
+ [ "${pki_subsystem}" != "TKS" ] &&
+ [ "${pki_subsystem}" != "RA" ] &&
+ [ "${pki_subsystem}" != "TPS" ]
+ then
+ return 255
+ fi
+ if [ "${pki_subsystem}" == "KRA" ] ; then
+ # Rename "KRA" to "DRM"
+ pki_subsystem="DRM"
+ fi
+ else
+ return 255
+ fi
+
+ # If "${pki_subsystem}" is a CA, DRM, OCSP, or TKS,
+ # check to see if "${pki_subsystem}" is a "Clone"
+ pki_clone=""
+ if [ "${pki_subsystem}" == "CA" ] ||
+ [ "${pki_subsystem}" == "DRM" ] ||
+ [ "${pki_subsystem}" == "OCSP" ] ||
+ [ "${pki_subsystem}" == "TKS" ]
+ then
+ line=`grep ^subsystem.select= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_clone=`echo "${line}" | cut -b18-`
+ if [ "${pki_clone}" != "Clone" ] ; then
+ # Reset "${pki_clone}" to be empty
+ pki_clone=""
+ fi
+ else
+ return 255
+ fi
+ fi
+
+ # If "${pki_subsystem}" is a CA, and is NOT a "Clone", check to
+ # see "${pki_subsystem}" is a "Root" or a "Subordinate" CA
+ pki_hierarchy=""
+ if [ "${pki_subsystem}" == "CA" ] &&
+ [ "${pki_clone}" != "Clone" ]
+ then
+ line=`grep ^hierarchy.select= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_hierarchy=`echo "${line}" | cut -b18-`
+ else
+ return 255
+ fi
+ fi
+
+ # If ${pki_subsystem} is a CA, check to
+ # see if it is also a Security Domain
+ pki_security_domain=""
+ if [ "${pki_subsystem}" == "CA" ] ; then
+ line=`grep ^securitydomain.select= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_security_domain=`echo "${line}" | cut -b23-`
+ if [ "${pki_security_domain}" == "new" ] ; then
+ # Set a fixed value for "${pki_security_domain}"
+ pki_security_domain="(Security Domain)"
+ else
+ # Reset "${pki_security_domain}" to be empty
+ pki_security_domain=""
+ fi
+ else
+ return 255
+ fi
+ fi
+
+ # Always obtain this PKI instance's "registered"
+ # security domain information
+ pki_security_domain_name=""
+ pki_security_domain_hostname=""
+ pki_security_domain_https_admin_port=""
+
+ line=`grep ^securitydomain.name= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_security_domain_name=`echo "${line}" | cut -b21-`
+ else
+ return 255
+ fi
+
+ line=`grep ^securitydomain.host= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_security_domain_hostname=`echo "${line}" | cut -b21-`
+ else
+ return 255
+ fi
+
+ line=`grep ^securitydomain.httpsadminport= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_security_domain_https_admin_port=`echo "${line}" | cut -b31-`
+ else
+ return 255
+ fi
+
+ # Compose the "PKI Instance Name" Status Line
+ pki_instance_name="PKI Instance Name: [PKI_INSTANCE_ID]"
+
+ # Compose the "PKI Subsystem Type" Status Line
+ header="PKI Subsystem Type: "
+ if [ "${pki_clone}" != "" ] ; then
+ if [ "${pki_security_domain}" != "" ]; then
+ # Possible Values:
+ #
+ # "CA Clone (Security Domain)"
+ #
+ data="${pki_subsystem} ${pki_clone} ${pki_security_domain}"
+ else
+ # Possible Values:
+ #
+ # "CA Clone"
+ # "DRM Clone"
+ # "OCSP Clone"
+ # "TKS Clone"
+ #
+ data="${pki_subsystem} ${pki_clone}"
+ fi
+ elif [ "${pki_hierarchy}" != "" ] ; then
+ if [ "${pki_security_domain}" != "" ]; then
+ # Possible Values:
+ #
+ # "Root CA (Security Domain)"
+ # "Subordinate CA (Security Domain)"
+ #
+ data="${pki_hierarchy} ${pki_subsystem} ${pki_security_domain}"
+ else
+ # Possible Values:
+ #
+ # "Root CA"
+ # "Subordinate CA"
+ #
+ data="${pki_hierarchy} ${pki_subsystem}"
+ fi
+ else
+ # Possible Values:
+ #
+ # "DRM"
+ # "OCSP"
+ # "RA"
+ # "TKS"
+ # "TPS"
+ #
+ data="${pki_subsystem}"
+ fi
+ pki_subsystem_type="${header} ${data}"
+
+ # Compose the "Registered PKI Security Domain Information" Status Line
+ header="Name: "
+ registered_pki_security_domain_name="${header} ${pki_security_domain_name}"
+
+ header="URL: "
+ if [ "${pki_security_domain_hostname}" != "" ] &&
+ [ "${pki_security_domain_https_admin_port}" != "" ]
+ then
+ data="https://${pki_security_domain_hostname}:${pki_security_domain_https_admin_port}"
+ else
+ return 255
+ fi
+ registered_pki_security_domain_url="${header} ${data}"
+
+ # Print the "PKI Subsystem Type" Status Line
+ echo
+ echo " ${pki_instance_name}"
+
+ # Print the "PKI Subsystem Type" Status Line
+ echo
+ echo " ${pki_subsystem_type}"
+
+ # Print the "Registered PKI Security Domain Information" Status Line
+ echo
+ echo " Registered PKI Security Domain Information:"
+ echo " =========================================================================="
+ echo " ${registered_pki_security_domain_name}"
+ echo " ${registered_pki_security_domain_url}"
+ echo " =========================================================================="
+
+ return 0
+}
+
get_pki_secure_port()
{
# establish well-known strings
@@ -1001,8 +1189,14 @@ status()
if [ $? -eq 0 ] ; then
get_pki_status_definitions
if [ $? -ne 0 ] ; then
+ echo
echo "[PKI_INSTANCE_ID] Status Definitions not found"
fi
+ get_pki_configuration_definitions
+ if [ $? -ne 0 ] ; then
+ echo
+ echo "[PKI_INSTANCE_ID] Configuration Definitions not found"
+ fi
fi
echo
else
diff --git a/pki/base/tps/etc/init.d/httpd b/pki/base/tps/etc/init.d/httpd
index da83ad246..567381c6e 100755
--- a/pki/base/tps/etc/init.d/httpd
+++ b/pki/base/tps/etc/init.d/httpd
@@ -161,6 +161,7 @@ INITLOG_ARGS=""
# Path to the server binary and short-form for messages.
httpd=${HTTPD:-[FORTITUDE_DIR]/sbin/httpd}
prog=[INSTANCE_ID]
+pki_instance_configuration_file=[SERVER_ROOT]/conf/CS.cfg
pidfile=${PIDFILE:-[SERVER_ROOT]/logs/[INSTANCE_ID].pid}
lockfile=${LOCKFILE:-/var/lock/subsys/[INSTANCE_ID]}
RESTART_SERVER=[SERVER_ROOT]/conf/restart_server_after_configuration
@@ -187,7 +188,7 @@ check_pki_configuration_status()
{
rv=0
- rv=`grep -c ^preop [SERVER_ROOT]/conf/CS.cfg`
+ rv=`grep -c ^preop ${pki_instance_configuration_file}`
rv=`expr ${rv} + 0`
@@ -286,6 +287,193 @@ get_pki_status_definitions()
fi
}
+get_pki_configuration_definitions()
+{
+ # Obtain the PKI Subsystem Type
+ line=`grep ^cs.type= ${pki_instance_configuration_file}`
+ pki_subsystem=`echo "${line}" | cut -b9-`
+ if [ "${line}" != "" ] ; then
+ if [ "${pki_subsystem}" != "CA" ] &&
+ [ "${pki_subsystem}" != "KRA" ] &&
+ [ "${pki_subsystem}" != "OCSP" ] &&
+ [ "${pki_subsystem}" != "TKS" ] &&
+ [ "${pki_subsystem}" != "RA" ] &&
+ [ "${pki_subsystem}" != "TPS" ]
+ then
+ return 255
+ fi
+ if [ "${pki_subsystem}" == "KRA" ] ; then
+ # Rename "KRA" to "DRM"
+ pki_subsystem="DRM"
+ fi
+ else
+ return 255
+ fi
+
+ # If "${pki_subsystem}" is a CA, DRM, OCSP, or TKS,
+ # check to see if "${pki_subsystem}" is a "Clone"
+ pki_clone=""
+ if [ "${pki_subsystem}" == "CA" ] ||
+ [ "${pki_subsystem}" == "DRM" ] ||
+ [ "${pki_subsystem}" == "OCSP" ] ||
+ [ "${pki_subsystem}" == "TKS" ]
+ then
+ line=`grep ^subsystem.select= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_clone=`echo "${line}" | cut -b18-`
+ if [ "${pki_clone}" != "Clone" ] ; then
+ # Reset "${pki_clone}" to be empty
+ pki_clone=""
+ fi
+ else
+ return 255
+ fi
+ fi
+
+ # If "${pki_subsystem}" is a CA, and is NOT a "Clone", check to
+ # see "${pki_subsystem}" is a "Root" or a "Subordinate" CA
+ pki_hierarchy=""
+ if [ "${pki_subsystem}" == "CA" ] &&
+ [ "${pki_clone}" != "Clone" ]
+ then
+ line=`grep ^hierarchy.select= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_hierarchy=`echo "${line}" | cut -b18-`
+ else
+ return 255
+ fi
+ fi
+
+ # If ${pki_subsystem} is a CA, check to
+ # see if it is also a Security Domain
+ pki_security_domain=""
+ if [ "${pki_subsystem}" == "CA" ] ; then
+ line=`grep ^securitydomain.select= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_security_domain=`echo "${line}" | cut -b23-`
+ if [ "${pki_security_domain}" == "new" ] ; then
+ # Set a fixed value for "${pki_security_domain}"
+ pki_security_domain="(Security Domain)"
+ else
+ # Reset "${pki_security_domain}" to be empty
+ pki_security_domain=""
+ fi
+ else
+ return 255
+ fi
+ fi
+
+ # Always obtain this PKI instance's "registered"
+ # security domain information
+ pki_security_domain_name=""
+ pki_security_domain_hostname=""
+ pki_security_domain_https_admin_port=""
+
+ line=`grep ^securitydomain.name= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_security_domain_name=`echo "${line}" | cut -b21-`
+ else
+ return 255
+ fi
+
+ line=`grep ^securitydomain.host= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_security_domain_hostname=`echo "${line}" | cut -b21-`
+ else
+ return 255
+ fi
+
+ line=`grep ^securitydomain.httpsadminport= ${pki_instance_configuration_file}`
+ if [ "${line}" != "" ] ; then
+ pki_security_domain_https_admin_port=`echo "${line}" | cut -b31-`
+ else
+ return 255
+ fi
+
+ # Compose the "PKI Instance Name" Status Line
+ pki_instance_name="PKI Instance Name: [INSTANCE_ID]"
+
+ # Compose the "PKI Subsystem Type" Status Line
+ header="PKI Subsystem Type: "
+ if [ "${pki_clone}" != "" ] ; then
+ if [ "${pki_security_domain}" != "" ]; then
+ # Possible Values:
+ #
+ # "CA Clone (Security Domain)"
+ #
+ data="${pki_subsystem} ${pki_clone} ${pki_security_domain}"
+ else
+ # Possible Values:
+ #
+ # "CA Clone"
+ # "DRM Clone"
+ # "OCSP Clone"
+ # "TKS Clone"
+ #
+ data="${pki_subsystem} ${pki_clone}"
+ fi
+ elif [ "${pki_hierarchy}" != "" ] ; then
+ if [ "${pki_security_domain}" != "" ]; then
+ # Possible Values:
+ #
+ # "Root CA (Security Domain)"
+ # "Subordinate CA (Security Domain)"
+ #
+ data="${pki_hierarchy} ${pki_subsystem} ${pki_security_domain}"
+ else
+ # Possible Values:
+ #
+ # "Root CA"
+ # "Subordinate CA"
+ #
+ data="${pki_hierarchy} ${pki_subsystem}"
+ fi
+ else
+ # Possible Values:
+ #
+ # "DRM"
+ # "OCSP"
+ # "RA"
+ # "TKS"
+ # "TPS"
+ #
+ data="${pki_subsystem}"
+ fi
+ pki_subsystem_type="${header} ${data}"
+
+ # Compose the "Registered PKI Security Domain Information" Status Line
+ header="Name: "
+ registered_pki_security_domain_name="${header} ${pki_security_domain_name}"
+
+ header="URL: "
+ if [ "${pki_security_domain_hostname}" != "" ] &&
+ [ "${pki_security_domain_https_admin_port}" != "" ]
+ then
+ data="https://${pki_security_domain_hostname}:${pki_security_domain_https_admin_port}"
+ else
+ return 255
+ fi
+ registered_pki_security_domain_url="${header} ${data}"
+
+ # Print the "PKI Subsystem Type" Status Line
+ echo
+ echo " ${pki_instance_name}"
+
+ # Print the "PKI Subsystem Type" Status Line
+ echo
+ echo " ${pki_subsystem_type}"
+
+ # Print the "Registered PKI Security Domain Information" Status Line
+ echo
+ echo " Registered PKI Security Domain Information:"
+ echo " =========================================================================="
+ echo " ${registered_pki_security_domain_name}"
+ echo " ${registered_pki_security_domain_url}"
+ echo " =========================================================================="
+
+ return 0
+}
+
get_pki_secure_port()
{
# establish well-known strings
@@ -538,8 +726,14 @@ status()
if [ $? -eq 0 ] ; then
get_pki_status_definitions
if [ $? -ne 0 ] ; then
+ echo
echo "[INSTANCE_ID] Status Definitions not found"
fi
+ get_pki_configuration_definitions
+ if [ $? -ne 0 ] ; then
+ echo
+ echo "[INSTANCE_ID] Configuration Definitions not found"
+ fi
fi
echo
else
diff --git a/pki/base/tps/lib/perl/PKI/TPS/DisplayCertChainPanel.pm b/pki/base/tps/lib/perl/PKI/TPS/DisplayCertChainPanel.pm
index 1ab9c3cf1..74d45984a 100755
--- a/pki/base/tps/lib/perl/PKI/TPS/DisplayCertChainPanel.pm
+++ b/pki/base/tps/lib/perl/PKI/TPS/DisplayCertChainPanel.pm
@@ -232,6 +232,7 @@ sub get_domain_xml
&PKI::TPS::Wizard::debug_log("DisplayCertChainPanel: security domain '" .
$xml->{'Name'}[0] . "'");
$::config->put("preop.securitydomain.name", $xml->{'Name'}[0]);
+ $::config->put("securitydomain.name", $xml->{'Name'}[0]);
# parse xml and store information in CS.cfg
my $count = 0;