summaryrefslogtreecommitdiffstats
path: root/pki/base/tps/lib/perl/PKI/TPS/ImportAdminCertPanel.pm
diff options
context:
space:
mode:
authorvakwetu <vakwetu@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2011-04-15 18:22:56 +0000
committervakwetu <vakwetu@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2011-04-15 18:22:56 +0000
commitb8c38f2350a944d8891d01cc6131f0488e1c6668 (patch)
tree4a5684c661b4c2875e08c2c100904feb59603425 /pki/base/tps/lib/perl/PKI/TPS/ImportAdminCertPanel.pm
parent34f9619ebca6d38f48792aaf7a44f331f8cc4631 (diff)
downloadpki-b8c38f2350a944d8891d01cc6131f0488e1c6668.tar.gz
pki-b8c38f2350a944d8891d01cc6131f0488e1c6668.tar.xz
pki-b8c38f2350a944d8891d01cc6131f0488e1c6668.zip
Bugzilla BZ 694569 - parameter used by pkiremove not updated
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@1964 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/base/tps/lib/perl/PKI/TPS/ImportAdminCertPanel.pm')
-rwxr-xr-xpki/base/tps/lib/perl/PKI/TPS/ImportAdminCertPanel.pm16
1 files changed, 14 insertions, 2 deletions
diff --git a/pki/base/tps/lib/perl/PKI/TPS/ImportAdminCertPanel.pm b/pki/base/tps/lib/perl/PKI/TPS/ImportAdminCertPanel.pm
index 468fbab2c..8a53edab4 100755
--- a/pki/base/tps/lib/perl/PKI/TPS/ImportAdminCertPanel.pm
+++ b/pki/base/tps/lib/perl/PKI/TPS/ImportAdminCertPanel.pm
@@ -86,6 +86,8 @@ sub update
my $instanceDir = $::config->get("service.instanceDir");
my $securePort = $::config->get("service.securePort");
my $subsystemName = $::config->get("preop.subsystem.name");
+ my $tokenname = $::config->get("preop.module.token");
+ my $token_pwd = $::pwdconf->get($tokenname);
my $db_password = `grep \"internal:\" \"$instanceDir/conf/password.conf\" | cut -c10-`;
my $name = $subsystemName;
my $subCertNickName = $::config->get("preop.cert.subsystem.nickname");
@@ -101,7 +103,12 @@ sub update
my $sd_host = $sdom_url->host;
my $sd_agent_port = $sdom_url->port;
- my $cmd = `/usr/bin/sslget -d \"$instanceDir/alias\" -p \"$db_password\" -v -n \"$subCertNickName\" -r \"/ca/agent/ca/updateDomainXML\" -e \"$params\" $sd_host:$sd_agent_port`;
+ my $cmd;
+ if (($tokenname eq "") || ($tokenname eq "NSS Certificate DB")) {
+ $cmd = `/usr/bin/sslget -d \"$instanceDir/alias\" -p \"$db_password\" -v -n \"$subCertNickName\" -r \"/ca/agent/ca/updateDomainXML\" -e \"$params\" $sd_host:$sd_agent_port`;
+ } else {
+ $cmd = `/usr/bin/sslget -d \"$instanceDir/alias\" -p \"$token_pwd\" -v -n \"$subCertNickName\" -r \"/ca/agent/ca/updateDomainXML\" -e \"$params\" $sd_host:$sd_agent_port`;
+ }
# Fetch the "updated" security domain and display it
&PKI::TPS::Wizard::debug_log("ImportAdminCertPanel: Dump contents of updated Security Domain . . .");
@@ -110,7 +117,12 @@ sub update
my $nickname = $::config->get("preop.cert.sslserver.nickname");
$sd_host = $sdom_info->host;
my $sd_admin_port = $sdom_info->port;
- my $content = `/usr/bin/sslget -d \"$instanceDir/alias\" -p \"$db_password\" -v -n \"$nickname\" -r \"/ca/admin/ca/getDomainXML\" $sd_host:$sd_admin_port`;
+ my $content;
+ if (($tokenname eq "") || ($tokenname eq "NSS Certificate DB")) {
+ $content = `/usr/bin/sslget -d \"$instanceDir/alias\" -p \"$db_password\" -v -n \"$nickname\" -r \"/ca/admin/ca/getDomainXML\" $sd_host:$sd_admin_port`;
+ } else {
+ $content = `/usr/bin/sslget -d \"$instanceDir/alias\" -p \"$token_pwd\" -v -n \"$nickname\" -r \"/ca/admin/ca/getDomainXML\" $sd_host:$sd_admin_port`;
+ }
$content =~ /(\<XMLResponse\>.*\<\/XMLResponse\>)/;
$content = $1;
&PKI::TPS::Wizard::debug_log($content);