summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiranjan Mallapadi <mrniranjan@redhat.com>2014-09-09 16:45:59 +0530
committerNiranjan Mallapadi <mrniranjan@redhat.com>2014-09-09 16:56:15 +0530
commitdccbe66ea8e839c851ac4448f4d69bb73d563b13 (patch)
treea140a38905997a821799efa77105a6e5d703ef39
parent7cf3bd73a7c41d8633fb2a92053a55e0e36a4925 (diff)
Modified create_new_cert_request to add ROLE Info
create_new_cert_request() in pki-cert-cli-lib.sh needed $MYROLE to fetch transport cert from the CA instance of the current topology to run CRMFPopClient
-rwxr-xr-xtests/dogtag/shared/pki-cert-cli-lib.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/dogtag/shared/pki-cert-cli-lib.sh b/tests/dogtag/shared/pki-cert-cli-lib.sh
index a2ed0127b..ac12451ef 100755
--- a/tests/dogtag/shared/pki-cert-cli-lib.sh
+++ b/tests/dogtag/shared/pki-cert-cli-lib.sh
@@ -317,7 +317,19 @@ create_new_cert_request()
rlLog "Execute generateCRMFRequest to generate CRMF Request"
rlRun "java -cp $CLASSPATH generateCRMFRequest -client_certdb_dir $dir -client_certdb_pwd $password -debug false -request_subject \"$subject\" -request_keytype $algo -request_keysize $key_size -output_file $cert_request_file 1> $dir/crmf.out" 0 "Execute generateCRMFRequest to generata CRMF Request"
fi
-
+ ### FIXME: This should not be needed, But putting here temporarily so as to not break this function API
+
+ if [ "$MYROLE" == "MASTER" ]; then
+ ROOTCA_TOMCAT_INSTANCE_NAME=pki-master
+ CA_SERVER_ROOT=/var/lib/pki/$ROOTCA_TOMCAT_INSTANCE_NAME/ca/
+ elif [ $MY_ROLE == "SUBCA1" ]; then
+ SUBCA1_TOMCAT_INSTANCE_NAME=pki-subca1
+ CA_SERVER_ROOT=/var/lib/pki/$SUBCA1_TOMCAT_INSTANCE_NAME/ca/
+ elif [ $MY_ROLE = "SUBCA2" ]; then
+ SUBCA2_TOMCAT_INSTANCE_NAME=pki-subca2
+ CA_SERVER_ROOT=/var/lib/pki/$SUBCA2_TOMCAT_INSTANCE_NAME/ca/
+ fi
+
if [ "$request_type" == "crmf" ] && [ "$archive" == "true" ];then
rlLog "Get Transport Cert"
rlRun "cat $CA_SERVER_ROOT/conf/CS.cfg | grep ca.connector.KRA.transportCert | awk -F \"=\" '{print \$2}' > transport.txt"