summaryrefslogtreecommitdiffstats
path: root/pki/base/tps/lib/perl/PKI/TPS/CAInfoPanel.pm
diff options
context:
space:
mode:
authorvakwetu <vakwetu@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2010-11-15 20:22:45 +0000
committervakwetu <vakwetu@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2010-11-15 20:22:45 +0000
commit23e51797c4d54e60c7285fc03baceda10cf5e4fb (patch)
tree74d43130ae63b048789a73b4b7541c0d370d12d7 /pki/base/tps/lib/perl/PKI/TPS/CAInfoPanel.pm
parentbf560d2a301c3673ed7c4f221d0d60385bd14f16 (diff)
downloadpki-23e51797c4d54e60c7285fc03baceda10cf5e4fb.tar.gz
pki-23e51797c4d54e60c7285fc03baceda10cf5e4fb.tar.xz
pki-23e51797c4d54e60c7285fc03baceda10cf5e4fb.zip
Bugzilla Bug 651916 - kra and ocsp are using incorrect ports to talk to CA and complete configuration in DonePanel
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@1498 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/base/tps/lib/perl/PKI/TPS/CAInfoPanel.pm')
-rwxr-xr-xpki/base/tps/lib/perl/PKI/TPS/CAInfoPanel.pm38
1 files changed, 26 insertions, 12 deletions
diff --git a/pki/base/tps/lib/perl/PKI/TPS/CAInfoPanel.pm b/pki/base/tps/lib/perl/PKI/TPS/CAInfoPanel.pm
index f17bb2bce..b86cc343a 100755
--- a/pki/base/tps/lib/perl/PKI/TPS/CAInfoPanel.pm
+++ b/pki/base/tps/lib/perl/PKI/TPS/CAInfoPanel.pm
@@ -76,11 +76,13 @@ sub update
my ($q) = @_;
&PKI::TPS::Wizard::debug_log("CAInfoPanel: update");
- my $count = $q->param('urls');
+ my $count = $q->param('urls') || "";
+ if ($count eq "") {
+ $::symbol{errorString} = "No CA information provided. CA, TKS and optionally DRM must be installed prior to TPS installation";
+ return 0;
+ }
&PKI::TPS::Wizard::debug_log("CAInfoPanel: update - got urls = $count");
- &PKI::TPS::Wizard::debug_log("CAInfoPanel: update - selected ca= $count");
-
my $instanceID = $::config->get("service.instanceID");
my $host = "";
my $https_ee_port = "";
@@ -89,9 +91,20 @@ sub update
my $domain_xml = "";
if ($count =~ /http/) {
+ # this is for pkisilent
my $info = new URI::URL($count);
- $host = $info->host;
- $https_ee_port = $info->port;
+ $host = $info->host || "";
+ if ($host eq "") {
+ $::symbol{errorString} = "No CA host provided.";
+ return 0;
+ }
+
+ $https_ee_port = $info->port || "";
+ if ($https_ee_port eq "") {
+ $::symbol{errorString} = "No CA EE port provided.";
+ return 0;
+ }
+
$domain_xml = get_domain_xml($host, $https_ee_port);
if ($domain_xml eq "") {
$::symbol{errorString} = "missing security domain. CA, TKS and optionally DRM must be installed prior to TPS installation";
@@ -102,14 +115,14 @@ sub update
$https_admin_port = get_secure_admin_port_from_domain_xml($domain_xml, $host, $https_ee_port);
if(($https_admin_port eq "") || ($https_agent_port eq "")) {
- $::symbol{errorString} = "missing secure CA admin or agent port. CA, TKS and optionally DRM must be installed prior to TPS installation";
+ $::symbol{errorString} = "secure CA admin or agent port information not provided by security domain.";
return 0;
}
} else {
- $host = $::config->get("preop.securitydomain.ca$count.host");
- $https_ee_port = $::config->get("preop.securitydomain.ca$count.secureport");
- $https_agent_port = $::config->get("preop.securitydomain.ca$count.secureagentport");
- $https_admin_port = $::config->get("preop.securitydomain.ca$count.secureadminport");
+ $host = $::config->get("preop.securitydomain.ca$count.host") || "";
+ $https_ee_port = $::config->get("preop.securitydomain.ca$count.secureport") || "";
+ $https_agent_port = $::config->get("preop.securitydomain.ca$count.secureagentport") || "";
+ $https_admin_port = $::config->get("preop.securitydomain.ca$count.secureadminport") || "";
}
if (($host eq "") || ($https_ee_port eq "") || ($https_admin_port eq "") || ($https_agent_port eq "")) {
@@ -119,7 +132,7 @@ sub update
&PKI::TPS::Wizard::debug_log("CAInfoPanel: update - host= $host, https_ee_port= $https_ee_port");
- $::config->put("preop.cainfo.select", "https://$host:$https_ee_port");
+ $::config->put("preop.cainfo.select", "https://$host:$https_admin_port");
my $serverCertNickName = $::config->get("preop.cert.sslserver.nickname");
my $subsystemCertNickName = $::config->get("preop.cert.subsystem.nickname");
@@ -184,7 +197,8 @@ sub display
my $first = 1;
my $list = "";
while (1) {
- my $host = $::config->get("preop.securitydomain.ca$count.host");
+ my $host = "";
+ $host = $::config->get("preop.securitydomain.ca$count.host");
if ($host eq "") {
goto DONE;
}