summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pki/base/ra/lib/perl/PKI/Conn/CA.pm2
-rwxr-xr-xpki/base/ra/lib/perl/PKI/RA/CAInfoPanel.pm57
-rwxr-xr-xpki/base/tps/lib/perl/PKI/TPS/CAInfoPanel.pm57
-rw-r--r--pki/dogtag/ra/pki-ra.spec4
-rw-r--r--pki/dogtag/tps/pki-tps.spec8
5 files changed, 111 insertions, 17 deletions
diff --git a/pki/base/ra/lib/perl/PKI/Conn/CA.pm b/pki/base/ra/lib/perl/PKI/Conn/CA.pm
index 799df8c00..b8cd7813b 100644
--- a/pki/base/ra/lib/perl/PKI/Conn/CA.pm
+++ b/pki/base/ra/lib/perl/PKI/Conn/CA.pm
@@ -163,7 +163,7 @@ sub revoke {
$db_password =~ s/\n$//g;
my $nickname = $cfg->get("conn." . $con_id . ".clientNickname");
- my $cahostport = $cfg->get("conn." . $con_id . ".hostport");
+ my $cahostport = $cfg->get("conn." . $con_id . ".hostagentport");
my $tmpfile = "/tmp/tmp-revoke-$serialno-$$";
my ($host, $port) = split(/:/, $cahostport);
diff --git a/pki/base/ra/lib/perl/PKI/RA/CAInfoPanel.pm b/pki/base/ra/lib/perl/PKI/RA/CAInfoPanel.pm
index b2d235eaa..d06e3daca 100755
--- a/pki/base/ra/lib/perl/PKI/RA/CAInfoPanel.pm
+++ b/pki/base/ra/lib/perl/PKI/RA/CAInfoPanel.pm
@@ -85,25 +85,35 @@ sub update
my $instanceID = $::config->get("service.instanceID");
my $host = "";
my $https_ee_port = "";
+ my $https_agent_port = "";
my $https_admin_port = "";
+ my $domain_xml = "";
if ($count =~ /http/) {
my $info = new URI::URL($count);
$host = $info->host;
$https_ee_port = $info->port;
- $https_admin_port = get_secure_admin_port_from_domain_xml($host,
- $https_ee_port);
- if( $https_admin_port eq "" ) {
- $::symbol{errorString} = "missing secure CA admin port. CA must be installed prior to RA installation";
+ $domain_xml = get_domain_xml($host, $https_ee_port);
+ if ($domain_xml eq "") {
+ $::symbol{errorString} = "missing security domain. CA must be installed prior to RA installation";
+ return 0;
+ }
+
+ $https_agent_port = get_secure_agent_port_from_domain_xml($domain_xml, $host, $https_ee_port);
+ $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 must be installed prior to RA installation";
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");
}
- if (($host eq "") || ($https_ee_port eq "") || ($https_admin_port eq "")) {
+ if (($host eq "") || ($https_ee_port eq "") || ($https_admin_port eq "") || ($https_agent_port eq "")) {
$::symbol{errorString} = "no CA found. CA must be installed prior to RA installation";
return 0;
}
@@ -116,6 +126,7 @@ sub update
my $subsystemCertNickName = $::config->get("preop.cert.subsystem.nickname");
$::config->put("conn.ca1.clientNickname", $subsystemCertNickName);
$::config->put("conn.ca1.hostport", $host . ":" . $https_ee_port);
+ $::config->put("conn.ca1.hostagentport", $host . ":" . $https_agent_port);
$::config->put("conn.ca1.hostadminport", $host . ":" . $https_admin_port);
$::config->commit();
@@ -200,7 +211,7 @@ DONE:
return 1;
}
-sub get_secure_admin_port_from_domain_xml
+sub get_domain_xml
{
my $host = $1;
my $https_ee_port = $2;
@@ -220,6 +231,14 @@ sub get_secure_admin_port_from_domain_xml
$content =~ /(\<XMLResponse\>.*\<\/XMLResponse\>)/;
$content = $1;
+ return $content;
+}
+
+sub get_secure_admin_port_from_domain_xml
+{
+ my $content = $1;
+ my $host = $2;
+ my $https_ee_port = $3;
# Retrieve the secure admin port corresponding
# to the selected host and secure ee port.
@@ -241,4 +260,30 @@ sub get_secure_admin_port_from_domain_xml
return $https_admin_port;
}
+sub get_secure_agent_port_from_domain_xml
+{
+ my $content = $1;
+ my $host = $2;
+ my $https_ee_port = $3;
+
+ # Retrieve the secure agent port corresponding
+ # to the selected host and secure ee port.
+ my $parser = XML::Simple->new();
+ my $response = $parser->XMLin($content);
+ my $xml = $parser->XMLin( $response->{'DomainInfo'},
+ ForceArray => 1 );
+ my $https_agent_port = "";
+ my $count = 0;
+ foreach my $c (@{$xml->{'CAList'}[0]->{'CA'}}) {
+ if( ( $host eq $c->{'Host'}[0] ) &&
+ ( $https_ee_port eq $c->{'SecurePort'}[0] ) ) {
+ $https_agent_port = https_$c->{'SecureAgentPort'}[0];
+ }
+
+ $count++;
+ }
+
+ return $https_agent_port;
+}
+
1;
diff --git a/pki/base/tps/lib/perl/PKI/TPS/CAInfoPanel.pm b/pki/base/tps/lib/perl/PKI/TPS/CAInfoPanel.pm
index 8830a1ea7..f91aaecc8 100755
--- a/pki/base/tps/lib/perl/PKI/TPS/CAInfoPanel.pm
+++ b/pki/base/tps/lib/perl/PKI/TPS/CAInfoPanel.pm
@@ -84,25 +84,35 @@ sub update
my $instanceID = $::config->get("service.instanceID");
my $host = "";
my $https_ee_port = "";
+ my $https_agent_port = "";
my $https_admin_port = "";
+ my $domain_xml = "";
if ($count =~ /http/) {
my $info = new URI::URL($count);
$host = $info->host;
$https_ee_port = $info->port;
- $https_admin_port = get_secure_admin_port_from_domain_xml($host,
- $https_ee_port);
- if( $https_admin_port eq "" ) {
- $::symbol{errorString} = "missing secure CA admin port. CA, TKS and optionally DRM must be installed prior to TPS installation";
+ $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";
+ return 0;
+ }
+
+ $https_agent_port = get_secure_agent_port_from_domain_xml($domain_xml, $host, $https_ee_port);
+ $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";
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");
}
- if (($host eq "") || ($https_ee_port eq "") || ($https_admin_port eq "")) {
+ if (($host eq "") || ($https_ee_port eq "") || ($https_admin_port eq "") || ($https_agent_port eq "")) {
$::symbol{errorString} = "no CA found. CA, TKS and optionally DRM must be installed prior to TPS installation";
return 0;
}
@@ -115,6 +125,7 @@ sub update
my $subsystemCertNickName = $::config->get("preop.cert.subsystem.nickname");
$::config->put("conn.ca1.clientNickname", $subsystemCertNickName);
$::config->put("conn.ca1.hostport", $host . ":" . $https_ee_port);
+ $::config->put("conn.ca1.hostagentport", $host . ":" . $https_agent_port);
$::config->put("conn.ca1.hostadminport", $host . ":" . $https_admin_port);
$::config->commit();
@@ -202,7 +213,7 @@ DONE:
return 1;
}
-sub get_secure_admin_port_from_domain_xml
+sub get_domain_xml
{
my $host = $1;
my $https_ee_port = $2;
@@ -222,6 +233,14 @@ sub get_secure_admin_port_from_domain_xml
$content =~ /(\<XMLResponse\>.*\<\/XMLResponse\>)/;
$content = $1;
+ return $content;
+}
+
+sub get_secure_admin_port_from_domain_xml
+{
+ my $content = $1;
+ my $host = $2;
+ my $https_ee_port = $3;
# Retrieve the secure admin port corresponding
# to the selected host and secure ee port.
@@ -243,6 +262,32 @@ sub get_secure_admin_port_from_domain_xml
return $https_admin_port;
}
+sub get_secure_agent_port_from_domain_xml
+{
+ my $content = $1;
+ my $host = $2;
+ my $https_ee_port = $3;
+
+ # Retrieve the secure agent port corresponding
+ # to the selected host and secure ee port.
+ my $parser = XML::Simple->new();
+ my $response = $parser->XMLin($content);
+ my $xml = $parser->XMLin( $response->{'DomainInfo'},
+ ForceArray => 1 );
+ my $https_agent_port = "";
+ my $count = 0;
+ foreach my $c (@{$xml->{'CAList'}[0]->{'CA'}}) {
+ if( ( $host eq $c->{'Host'}[0] ) &&
+ ( $https_ee_port eq $c->{'SecurePort'}[0] ) ) {
+ $https_agent_port = https_$c->{'SecureAgentPort'}[0];
+ }
+
+ $count++;
+ }
+
+ return $https_agent_port;
+}
+
sub is_panel_done
{
return $::config->get("preop.cainfo.done");
diff --git a/pki/dogtag/ra/pki-ra.spec b/pki/dogtag/ra/pki-ra.spec
index 16f8a95bc..18d5cff08 100644
--- a/pki/dogtag/ra/pki-ra.spec
+++ b/pki/dogtag/ra/pki-ra.spec
@@ -34,7 +34,7 @@
## Package Header Definitions
%define base_name %{base_prefix}-%{base_component}
%define base_version 1.1.0
-%define base_release 16
+%define base_release 17
%define base_group System Environment/Daemons
%define base_vendor Red Hat, Inc.
%define base_license GPLv2 with exceptions
@@ -266,6 +266,8 @@ fi
###############################################################################
%changelog
+* Wed Jun 10 2009 Ade Lee <alee@redhat.com> 1.1.0-17
+- Bugzilla Bug #504898 - RA: agent unable to revoke a cert
* Mon Jun 8 2009 Matthew Harmsen <mharmsen@redhat.com> 1.1.0-16
- Bugzilla Bug #501081 - remove mod_revocator rpm as a dependency
* Mon Jun 8 2009 Ade Lee <alee@redhat.com> 1.1.0-15
diff --git a/pki/dogtag/tps/pki-tps.spec b/pki/dogtag/tps/pki-tps.spec
index 085f680bf..832cad45a 100644
--- a/pki/dogtag/tps/pki-tps.spec
+++ b/pki/dogtag/tps/pki-tps.spec
@@ -34,7 +34,7 @@
## Package Header Definitions
%define base_name %{base_prefix}-%{base_component}
%define base_version 1.1.0
-%define base_release 27
+%define base_release 28
%define base_group System Environment/Daemons
%define base_vendor Red Hat, Inc.
%define base_license LGPLv2 with exceptions
@@ -313,12 +313,14 @@ fi
###############################################################################
%changelog
+* Wed Jun 10 2009 Ade Lee <alee@redhat.com> 1.1.0-28
+- Bugzilla Bug #504898 - RA: agent unable to revoke a cert
* Tue Jun 9 2009 Ade Lee <alee@redhat.com> 1.1.0-27
-* Bugzilla Bug #504042 - unable to list users that where created with a space in the name
+- Bugzilla Bug #504042 - unable to list users that where created with a space in the name
* Mon Jun 8 2009 Matthew Harmsen <mharmsen@redhat.com> 1.1.0-26
- Bugzilla Bug #501081 - remove mod_revocator rpm as a dependency
* Wed Jun 3 2009 Jack Magne <jmagne@redhat.com> 1.1.0-25
-* Bugzilla Bug #504058 - Fix Format crash when revoking a cert.
+- Bugzilla Bug #504058 - Fix Format crash when revoking a cert.
* Mon Jun 1 2009 Matthew Harmsen <mharmsen@redhat.com> 1.1.0-24
- Bugzilla Bug #503255 - Fix confusing "Security Domain" message when using
"status"