summaryrefslogtreecommitdiffstats
path: root/pki/base/tps/forms/esc
diff options
context:
space:
mode:
authorjmagne <jmagne@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2010-08-20 23:52:11 +0000
committerjmagne <jmagne@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2010-08-20 23:52:11 +0000
commit16399240221d7e379854d070326805be037d665a (patch)
tree893c84d5de40aa2028221eec055121c6aa8ea485 /pki/base/tps/forms/esc
parent321177b696b67c58d2df156ff874dcf1beeb26dd (diff)
downloadpki-16399240221d7e379854d070326805be037d665a.tar.gz
pki-16399240221d7e379854d070326805be037d665a.tar.xz
pki-16399240221d7e379854d070326805be037d665a.zip
Fix Bug 497931 - CS 8.0 -- Have to download and stall the trust chain through ESC even if it was already installed in the browser.
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@1236 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/base/tps/forms/esc')
-rwxr-xr-xpki/base/tps/forms/esc/cgi-bin/home/cachain.cgi52
-rwxr-xr-xpki/base/tps/forms/esc/cgi-bin/home/index.cgi3
2 files changed, 55 insertions, 0 deletions
diff --git a/pki/base/tps/forms/esc/cgi-bin/home/cachain.cgi b/pki/base/tps/forms/esc/cgi-bin/home/cachain.cgi
new file mode 100755
index 000000000..ddbf5e6ae
--- /dev/null
+++ b/pki/base/tps/forms/esc/cgi-bin/home/cachain.cgi
@@ -0,0 +1,52 @@
+#!/usr/bin/perl
+#
+# --- BEGIN COPYRIGHT BLOCK ---
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation;
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301 USA
+#
+# Copyright (C) 2007 Red Hat, Inc.
+# All rights reserved.
+# --- END COPYRIGHT BLOCK ---
+#
+#
+#
+
+use LWP::UserAgent;
+
+my $cfg = "../../conf/CS.cfg";
+my $cahostport = `grep conn.ca1.hostport $cfg | cut -c19-`;
+
+chomp($cahostport);
+
+my $url = "https://$cahostport/ca/ee/ca/getCAChain?op=download&mimeType=application/x-x509-ca-cert";
+
+my $agent = LWP::UserAgent->new;
+$agent->timeout(30);
+
+my $request = HTTP::Request->new('GET', $url);
+my $response = $agent->request($request);
+
+if ($response->is_success) {
+ print "Content-type: application/x-x509-ca-cert\n\n";
+ print $response->content;
+
+} else {
+ print "Content-type: text/html\n\n";
+ print "<html>";
+ print "<link rel=stylesheet href='/esc/home/style.css' type='text/css'>";
+ print "<center><h2>Error Importing CA Chain Information!</h2></center>";
+ print "<center><h2>Please try again later.</h2></center>";
+ print "</html>"
+}
diff --git a/pki/base/tps/forms/esc/cgi-bin/home/index.cgi b/pki/base/tps/forms/esc/cgi-bin/home/index.cgi
index 0386470d4..1e54a8354 100755
--- a/pki/base/tps/forms/esc/cgi-bin/home/index.cgi
+++ b/pki/base/tps/forms/esc/cgi-bin/home/index.cgi
@@ -44,5 +44,8 @@ print "</EnrolledTokenURL>";
print "<TokenType>";
print "userKey";
print "</TokenType>";
+#print "<CAChainUI>";
+#print "http://[SERVER_NAME]:[PORT]/cgi-bin/home/cachain.cgi";
+#print "</CAChainUI>";
print "</Services>";
print "</ServiceInfo>";