summaryrefslogtreecommitdiffstats
path: root/dogtag/ca-ui/shared/webapps/ca/admin
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2012-11-09 03:36:17 -0500
committerEndi Sukma Dewata <edewata@redhat.com>2012-11-12 12:04:02 -0500
commit46fda5d944772ac62675570037785e39c517002b (patch)
tree667f28137e53f7a5a4f55a7b64f169c69be7513b /dogtag/ca-ui/shared/webapps/ca/admin
parentedf9c2273c00b52b0c240bc0c75dc1ba7bdc396e (diff)
downloadpki-46fda5d944772ac62675570037785e39c517002b.tar.gz
pki-46fda5d944772ac62675570037785e39c517002b.tar.xz
pki-46fda5d944772ac62675570037785e39c517002b.zip
Reorganized CA, KRA, OCSP, TKS templates.
All remaining theme files for Tomcat subsystems which include the templates and JS files have been moved from the theme folder at <subsystem>-ui/shared/webapps/<subsystem> into the subsystem webapp folder at base/<subsystem>/shared/webapps/<subsystem>. The deployment tools have been updated to use the new location. Ticket #407
Diffstat (limited to 'dogtag/ca-ui/shared/webapps/ca/admin')
-rw-r--r--dogtag/ca-ui/shared/webapps/ca/admin/GenUnexpectedError.template68
-rw-r--r--dogtag/ca-ui/shared/webapps/ca/admin/ca/EnrollSuccess.template245
-rw-r--r--dogtag/ca-ui/shared/webapps/ca/admin/ca/ImportAdminCert.template58
-rw-r--r--dogtag/ca-ui/shared/webapps/ca/admin/ca/ImportCert.template268
-rw-r--r--dogtag/ca-ui/shared/webapps/ca/admin/ca/adminEnroll.html779
-rw-r--r--dogtag/ca-ui/shared/webapps/ca/admin/ca/securitydomainlogin.template114
-rw-r--r--dogtag/ca-ui/shared/webapps/ca/admin/ca/sendCookie.template97
-rw-r--r--dogtag/ca-ui/shared/webapps/ca/admin/cms-funcs.js538
-rw-r--r--dogtag/ca-ui/shared/webapps/ca/admin/helpfun.js35
-rw-r--r--dogtag/ca-ui/shared/webapps/ca/admin/index.html23
10 files changed, 0 insertions, 2225 deletions
diff --git a/dogtag/ca-ui/shared/webapps/ca/admin/GenUnexpectedError.template b/dogtag/ca-ui/shared/webapps/ca/admin/GenUnexpectedError.template
deleted file mode 100644
index 57d118aa5..000000000
--- a/dogtag/ca-ui/shared/webapps/ca/admin/GenUnexpectedError.template
+++ /dev/null
@@ -1,68 +0,0 @@
-<!-- --- BEGIN COPYRIGHT BLOCK ---
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; 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 --- -->
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<HTML>
-<CMS_TEMPLATE>
-
-<TITLE>CA Admin Processing Error!</TITLE>
-
-<BODY BGCOLOR="white">
-
-<font size="+1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
-Problem Processing Your Request
-</font>
-
-<table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%" BACKGROUND="/pki/images/hr.gif" >
- <tr>
- <td>&nbsp;</td>
- </tr>
-</table>
-
-<font size="-1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
-
-<SCRIPT LANGUAGE="JavaScript">
-var authority = 'Certificate System';
-if (result.fixed.authorityName != null) {
- authority = result.fixed.authorityName;
-}
-
-document.writeln('<P>');
-document.write('The '+authority+' encountered an unexpected error ');
-document.writeln(' while processing your request.');
-document.writeln(
- 'The following is a detailed message of the error that occurred.');
-
-document.writeln('<P>');
-document.writeln('<BLOCKQUOTE><B><PRE>');
-if (result.fixed.unexpectedError != null) {
- document.write(result.fixed.unexpectedError);
-} else {
- document.write('No further details provided.');
-}
-document.writeln('</PRE></B></BLOCKQUOTE>');
-
-document.writeln('<P>');
-document.writeln(
- 'Please consult your local administrator for further assistance.');
-document.writeln('The Certificate System logs may provide further information.');
-</SCRIPT>
-
-</font>
-</BODY>
-</HTML>
-
diff --git a/dogtag/ca-ui/shared/webapps/ca/admin/ca/EnrollSuccess.template b/dogtag/ca-ui/shared/webapps/ca/admin/ca/EnrollSuccess.template
deleted file mode 100644
index d3709831e..000000000
--- a/dogtag/ca-ui/shared/webapps/ca/admin/ca/EnrollSuccess.template
+++ /dev/null
@@ -1,245 +0,0 @@
-<!-- --- BEGIN COPYRIGHT BLOCK ---
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; 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 --- -->
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<HTML>
-<CMS_TEMPLATE>
-
-<TITLE>
-CS Enroll Request Success
-</TITLE>
-
-<BODY bgcolor="white">
-
-
-<font size="+1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
-Enrollment Success
-</font>
-
-<font size="-1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
-<p>
-
-<SCRIPT LANGUAGE="JavaScript">
-function toHex(number)
-{
- var absValue = "", sign = "";
- var digits = "0123456789abcdef";
- if (number < 0) {
- sign = "-";
- number = -number;
- }
-
- for(; number >= 16 ; number = Math.floor(number/16)) {
- absValue = digits.charAt(number % 16) + absValue;
- }
- absValue = digits.charAt(number % 16) + absValue;
-
- return sign + '0x' + '0' + absValue;
-}
-
-document.writeln('Congratulations a certificate has been issued and ' +
-'the administrator now has Certificate Manager Agent privileges.' +
-' You can now go to the <b>Agent Services</b> page' +
-' to process any pending requests.');
-
-document.writeln('<P>');
-document.writeln('Issued Certificates: </font>');
-document.writeln('<P>');
-document.writeln('<table border="0" cellspacing="0" cellpadding="0" background="/pki/images/hr.gif" width="100%">');
-document.writeln(' <tr> ');
-document.writeln(' <td>&nbsp;</td>');
-document.writeln(' </tr>');
-document.writeln('</table>');
-
-if (result.recordSet == null) {
- document.writeln('<BLOCKQUOTE><B><PRE>');
- document.writeln('No further details provided.');
- document.writeln('Please consult your local administrator for assistance.');
- document.writeln('</BLOCKQUOTE></B></PRE>');
-}
-else if (result.recordSet.length == 0) {
- document.writeln('<BLOCKQUOTE><B><PRE>');
- document.writeln('0');
- document.writeln('No further details provided.');
- document.writeln('Please consult your local administrator for assistance.');
- document.writeln('</BLOCKQUOTE></B></PRE>');
-} else {
- // document.writeln('<UL>');
- for (var i = 0; i < result.recordSet.length; i++) {
- if (result.recordSet[i].serialNo != null) {
-/* document.write('Serial number ');
- document.write('<B><PRE>');
- document.writeln(toHex(result.recordSet[i].serialNo));
- document.write('</B></PRE>');
- document.writeln('<P>');
- document.write('Base 64 encoded Cert<BR>');
- document.write('<PRE>');
- document.writeln(result.recordSet[i].base64Cert);
- document.write('</PRE>');
- document.writeln('<P>');
- document.write('Cert Pretty Print<BR>');
- document.write('<PRE>');
- document.writeln(result.recordSet[i].certPrettyPrint);
- document.write('</PRE>');
-*/
-
- document.write('<font face="PrimaSans BT, Verdana, sans-serif" size="+1">Serial number ');
- document.writeln('&nbsp; 0x' + result.recordSet[i].serialNo);
- document.writeln('</font><br>');
-
- document.writeln('<table border="0" cellspacing="2" cellpadding="2" width="100%">');
- document.writeln('<tr align="left" bgcolor="#e5e5e5"><td align="left">');
- document.writeln('<font face="PrimaSans BT, Verdana, sans-serif" size="-1">');
- document.writeln('Certificate contents</font></td></tr></table>');
-
- document.writeln('<pre>');
-// document.write('<font face="PrimaSans BT, Verdana, sans-serif">');
- document.write(result.recordSet[i].certPrettyPrint);
-// document.writeln('</font>');
- document.writeln('</pre>');
-/*
- document.writeln('<p>');
- document.writeln('<table border="0" cellspacing="2" cellpadding="2" width="100%">');
- document.writeln('<tr align="left" bgcolor="#e5e5e5"><td align="left">');
- document.writeln('<font face="PrimaSans BT, Verdana, sans-serif" size="-1">');
- document.writeln('Certificate fingerprints</font></td></tr></table>');
-
- document.writeln('<pre>');
- document.write(result.recordSet[i].certFingerprint);
- document.writeln('</pre>');
-*/
- document.writeln('<p>');
- document.writeln('<table border="0" cellspacing="2" cellpadding="2" width="100%">');
- document.writeln('<tr align="left" bgcolor="#e5e5e5"><td align="left">');
- document.writeln('<font face="PrimaSans BT, Verdana, sans-serif" size="-1">');
- document.writeln('Base 64 encoded certificate</font></td></tr></table>');
- document.writeln('<p><pre>');
-// document.write('<font face="PrimaSans BT, Verdana, sans-serif" >');
- document.writeln(result.recordSet[i].base64Cert);
-// document.writeln('</font>');
- document.writeln('</pre>');
- }
- }
- // document.writeln('</UL>');
-
-}
-document.writeln('</PRE></B></BLOCKQUOTE>');
-document.writeln('<P>');
-
-// import certs if cartman.
-if (navigator.appName == 'Netscape' &&
- typeof(crypto.version) != "undefined" &&
- typeof(result.fixed.crmfReqId) != "undefined") {
-
-// window.location = result.fixed.scheme + "://" +
-// result.fixed.host + ":" + result.fixed.port +
-// "/ca/getAdminCertBySerial?serialNumber=" +
-// record.serialNo +
-// "&importCert=true";
-
- var errors = crypto.importUserCertificates(null,
- result.fixed.cmmfResponse, false);
-
- if (errors != '') {
- document.writeln('<font face="PrimaSans BT, Verdana, sans-serif" size="-1">');
- document.writeln(
- '<b>ERROR</b>Could not import the certificate into your browser '+
- 'using nickname '+result.fixed.certNickname+'.<p>');
- document.writeln(
- 'The following error message was returned by the browser '+
- 'when importing the certificate:');
- document.writeln('</font>');
- document.writeln('<BLOCKQUOTE><PRE>');
- document.writeln(errors);
- document.writeln('</PRE></BLOCKQUOTE>');
- }
- else {
- document.writeln('<font face="PrimaSans BT, Verdana, sans-serif" size="-1">');
- document.writeln(
- 'Your certificate was successfully imported to the browser '+
- 'with nickname '+result.fixed.certNickname);
- document.writeln('</font>');
- }
-
- // crypto.importUserCertificates(result.fixed.certNickname,
- // result.fixed.cmmfResponse, false);
-} else if (navigator.appName == 'Netscape' &&
- typeof(crypto.version) == "undefined") {
- // non Cartman
- window.location = result.fixed.scheme + "://" + result.fixed.host + ":"
-+ result.fixed.port + "/ca/getAdminCertBySerial?serialNumber=" + record.serialNo + "&importCert=true";
-}
-
-</SCRIPT>
-
-<OBJECT
- classid="clsid:127698e4-e730-4e5c-a2b1-21490a70c8a1"
- CODEBASE="/xenroll.dll"
- id=Enroll >
-</OBJECT>
-
-<SCRIPT LANGUAGE=VBS>
-<!--
-'========================================================
-'
-' In VBS, there are several ways in which the event handler for the
-' click event can be bound to the right control. We use one of the
-' methods here, which indicates the binding by appending the
-' event name to the control name with an intervening '_'.
-'
-'========================================================
- Sub ImportCertificate
-
- Dim pkcs7
-
- On Error Resume Next
-
- 'Convert the cert to PKCS7 format
- pkcs7 = result.header.pkcs7ChainBase64
- If (IsEmpty(pkcs7) OR theError <> 0) Then
- ret = MsgBox("Could not convert certificate to PKCS7 format", 0, "Import Cert")
- Exit Sub
- End If
-
- 'Import the PKCS7 object
- Enroll.DeleteRequestCert = FALSE
- Enroll.WriteCertToCSP = true
- Enroll.acceptPKCS7(pkcs7)
- if err.number <> 0 then
- Enroll.WriteCertToCSP = false
- end if
- err.clear
- Enroll.acceptPKCS7(pkcs7)
- if err.number = 0 then
- MsgBox "Certificate has been successfully imported."
- else
- sz = "Error in acceptPKCS7. Error Number " & Hex(err.number) & "occurred."
- MsgBox sz
- end if
-
- Exit Sub
-
- End Sub
-
- ImportCertificate()
-
-</SCRIPT>
-
-</font>
-</BODY>
-</HTML>
-
diff --git a/dogtag/ca-ui/shared/webapps/ca/admin/ca/ImportAdminCert.template b/dogtag/ca-ui/shared/webapps/ca/admin/ca/ImportAdminCert.template
deleted file mode 100644
index e52764ec6..000000000
--- a/dogtag/ca-ui/shared/webapps/ca/admin/ca/ImportAdminCert.template
+++ /dev/null
@@ -1,58 +0,0 @@
-<!-- --- BEGIN COPYRIGHT BLOCK ---
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; 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 --- -->
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<HTML>
-<HEAD>
-<TITLE>VBScript Administrator Certificate Enrollment
-</TITLE>
-<CMS_TEMPLATE>
-<OBJECT classid="clsid:127698E4-E730-4E5C-A2b1-21490A70C8A1"
- codebase="xenroll.dll"
- id=Enroll >
-</OBJECT>
-<SCRIPT language="VBScript">
-<!--
- Dim pkcs7
-
- On Error Resume Next
-
- 'Convert the cert to PKCS7 format
- pkcs7 = result.header.pkcs7
- If (IsEmpty(pkcs7) OR theError <> 0) Then
- ret = MsgBox("Could not convert certificate to PKCS7 format", 0, "Import Cert")
- End If
-
- 'Import the PKCS7 object
- Enroll.DeleteRequestCert = FALSE
- Enroll.WriteCertToCSP = true
- Enroll.acceptPKCS7(pkcs7)
- if err.number <> 0 then
- Enroll.WriteCertToCSP = false
- end if
- err.clear
- Enroll.acceptPKCS7(pkcs7)
- if err.number = 0 then
- MsgBox "Certificate has been successfully imported."
- else
- sz = "Error in acceptPKCS7. Error Number " & Hex(err.number) & "occurred."
- MsgBox sz
- end if
--->
-</SCRIPT>
-</head>
-</HTML>
diff --git a/dogtag/ca-ui/shared/webapps/ca/admin/ca/ImportCert.template b/dogtag/ca-ui/shared/webapps/ca/admin/ca/ImportCert.template
deleted file mode 100644
index 5530cf2d1..000000000
--- a/dogtag/ca-ui/shared/webapps/ca/admin/ca/ImportCert.template
+++ /dev/null
@@ -1,268 +0,0 @@
-<!-- --- BEGIN COPYRIGHT BLOCK ---
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; 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 --- -->
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<CMS_TEMPLATE>
-
-<TITLE>
-CS Enroll Request Success
-</TITLE>
-
-<BODY bgcolor="white">
-
-<font size="+1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
-Import Certificate
-</font>
-
-<font size="-1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
-
-
-<SCRIPT LANGUAGE="JavaScript">
-//<!--
-
-//document.writeln('<P>');
-//document.writeln('host '+result.fixed.host+'<BR>');
-//document.writeln('port '+result.fixed.port+'<BR>');
-//document.writeln('scheme '+result.fixed.scheme+'<BR>');
-//document.writeln('authority '+result.fixed.authorityName+'<BR>');
-
-function navMajorVersion()
-{
- return parseInt(
- navigator.appVersion.substring(0, navigator.appVersion.indexOf(".")));
-}
-
-document.writeln('<P>');
-document.writeln('Importing the following certificate to your browser:');
-
-document.writeln('<P>');
-
-if (result.recordSet == null || result.recordSet.length == 0) {
- document.writeln('<BLOCKQUOTE><B><PRE>');
- document.writeln('No more information on your certificate is provided.');
- document.writeln('Please consult your local administrator for assistance.');
- document.writeln('</BLOCKQUOTE></B></PRE>');
-} else {
- document.writeln('<UL>');
- for (var i = 0; i < result.recordSet.length; i++) {
- if (result.recordSet[i].serialNo != null) {
- //document.write('Serial number ');
- //document.write('<BLOCKQUOTE><B><PRE>');
- //document.writeln(result.recordSet[i].serialNo);
- //document.write('</BLOCKQUOTE></B></PRE>');
- //document.writeln('<P>');
- //document.write('Your certificate in Base 64 encoded form:<BR>');
- //document.write('<BLOCKQUOTE><PRE>');
- //document.writeln(result.recordSet[i].base64Cert);
- //document.write('</PRE></BLOCKQUOTE>');
- document.writeln('<P>');
- document.write('Certificate Content: <BR>');
- document.write('<BLOCKQUOTE><PRE>');
- document.writeln(result.recordSet[i].certPrettyPrint);
- document.write('</PRE></BLOCKQUOTE>');
- }
- }
- document.writeln('</UL>');
-
-}
-
-// NOTE: importUserCertificate should be done before this point but
-// it creates a javascript error that clobbers the result variable set in
-// the template.
-
-if (navigator.appName == 'Netscape' && (navMajorVersion() > 3) &&
- typeof(crypto.version) != "undefined" &&
- typeof(result.fixed.crmfReqId) != "undefined") {
- //alert('certNickname is '+result.fixed.certNickname);
- //alert(result.fixed.cmmfResponse);
- var errors = crypto.importUserCertificates(null,
- result.fixed.cmmfResponse, false);
- // var errors = crypto.importUserCertificates(result.fixed.certNickname,
- // result.fixed.cmmfResponse, false);
-
- // NOTE: Alpha version of cartman always returns a non-empty string
- // from importUserCertificates() so we can only always assume succcess.
- // Uncomment the following line and add appropriate javascripts/messages
- // for use with a later version of cartman.
- // This is fixed in Alpha-3. For use with alpha-3 uncomment the lines below
- // to check for errors returned from importUserCertificates.
- if (errors != '') {
- document.writeln(
- '<b>ERROR</b>Could not import the certificate into your browser '+
- 'using nickname '+result.fixed.certNickname+'.<p>');
- document.writeln(
- 'The following error message was returned by the browser '+
- 'when importing the certificate:');
- document.writeln('<BLOCKQUOTE><PRE>');
- document.writeln(errors);
- document.writeln('</PRE></BLOCKQUOTE>');
- }
- else {
- document.writeln(
- 'Your certificate was successfully imported to the browser '+
- 'with nickname '+result.fixed.certNickname);
- }
-
-// document.writeln(
-// 'NOTE: '+
-// 'The following was returned by the browser when importing '+
-// 'the certificate:');
-// document.writeln('<BLOCKQUOTE><PRE>');
-// document.writeln(errors);
-// document.writeln('</PRE></BLOCKQUOTE>');
-// document.writeln(
-// 'If there was an error message it could be that you do not have '+
-// 'the private key of the certificate you are trying to import. '+
-// 'Please consult your system administrator for assistance.');
-}
-
-//-->
-</SCRIPT>
-
-<!--
-<OBJECT
- classid="clsid:127698e4-e730-4e5c-a2b1-21490a70c8a1"
- CODEBASE="/xenroll.dll"
- id=Enroll >
-</OBJECT>
-
-<OBJECT id='g_objClassFactory' CLASSID='clsid:884e2049-217d-11da-b2a4-000e7bbb2b09'>
-</OBJECT>
--->
-
-<SCRIPT LANGUAGE="JavaScript">
-//<!--
-if (navigator.appName == "Microsoft Internet Explorer") {
- if ((navigator.appVersion).indexOf("NT 6.") > -1) {
- document.writeln("<OBJECT id='g_objClassFactory' CLASSID='clsid:884e2049-217d-11da-b2a4-000e7bbb2b09'></OBJECT>");
- } else {
- document.writeln("<OBJECT classid='clsid:127698e4-e730-4e5c-a2b1-21490a70c8a1' CODEBASE='/xenroll.dll' id='Enroll'></OBJECT>");
- }
-}
-//-->
-</SCRIPT>
-
-<SCRIPT LANGUAGE=VBS>
-<!--
-'========================================================
-'
-' In VBS, there are several ways in which the event handler for the
-' click event can be bound to the right control. We use one of the
-' methods here, which indicates the binding by appending the
-' event name to the control name with an intervening '_'.
-'
-'========================================================
-
- 'Get OS Version, works for Vista and below only
- Function GetOSVersion
- dim agent
- dim res
- dim pos
-
- agent = Navigator.appVersion
- pos = InStr(agent,"NT 6.")
-
- If pos > 0 Then
- GetOSVersion = 6
- Exit Function
- End If
-
- pos = InStr(agent,"NT 5.")
-
- If pos > 0 Then
- GetOSVersion = 5
- Exit Function
- End If
-
- GetOSVersion = 5
- End Function
-
- 'Sub ImportCertificate
- Sub ImportCertificate (pkcs7)
- 'Dim pkcs7
- Dim res
- Dim osVersion
-
- On Error Resume Next
- osVersion = GetOSVersion()
-
- 'Convert the cert to PKCS7 format
- 'pkcs7 = result.header.pkcs7ChainBase64
- 'ret = MsgBox(pkcs7, 0, "Import PKCS7 Cert")
- If (IsEmpty(pkcs7) OR theError <> 0) Then
- ret = MsgBox("Could not convert certificate to PKCS7 format", 0, "Import Cert")
- Exit Sub
- End If
-
- If osVersion <> 6 Then 'Not Vista
-
- 'Import the PKCS7 object
- Enroll.DeleteRequestCert = FALSE
- Enroll.WriteCertToCSP = true
- Enroll.acceptPKCS7(pkcs7)
- if err.number <> 0 then
- Enroll.WriteCertToCSP = false
- end if
- err.clear
- Enroll.acceptPKCS7(pkcs7)
- if err.number = 0 then
- MsgBox "Certificate has been successfully imported."
- else
- sz = "Error in acceptPKCS7. Error Number " & Hex(err.number) & "occurred."
- MsgBox sz
- end if
- Exit Sub
- Else 'Vista
- Dim enrollObj
-
- Set enrollObj = g_objClassFactory.CreateObject("X509Enrollment.CX509Enrollment")
- If IsObject(enrollObj) = False Then
- res = MsgBox("Can't create Enroll Object!")
- Exit Sub
- End If
-
- enrollObj.Initialize(1)
- enrollObj.InstallResponse 0,pkcs7,6,""
-
- If Err.number <> 0 Then
- sz = "Error in InstallResponse. Error Number " & Hex(err.number) & " occurred."
- res =MsgBox(sz & Err.description)
- else
- res = MsgBox("Certificate has been successfully imported.")
- End If
- End If
- End Sub
-
- 'ImportCertificate()
--->
-</SCRIPT>
-
-<SCRIPT LANGUAGE="JavaScript">
-//<!--
-if (navigator.appName == "Microsoft Internet Explorer") {
- var pkcs7 = result.header.pkcs7ChainBase64;
- //alert("pkcs7="+pkcs7);
- ImportCertificate(pkcs7);
-}
-//-->
-</SCRIPT>
-
-</font>
-</BODY>
-</HTML>
-
diff --git a/dogtag/ca-ui/shared/webapps/ca/admin/ca/adminEnroll.html b/dogtag/ca-ui/shared/webapps/ca/admin/ca/adminEnroll.html
deleted file mode 100644
index 8b6335ab5..000000000
--- a/dogtag/ca-ui/shared/webapps/ca/admin/ca/adminEnroll.html
+++ /dev/null
@@ -1,779 +0,0 @@
-<!-- --- BEGIN COPYRIGHT BLOCK ---
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; 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 --- -->
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
-<TITLE>Admin Enrollment form.</TITLE>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<SCRIPT LANGUAGE="JavaScript"></SCRIPT>
-<script LANGUAGE="JavaScript" SRC="/ca/admin/cms-funcs.js"></script>
-<SCRIPT LANGUAGE="JavaScript" SRC="/ca/admin/helpfun.js"></SCRIPT>
-<SCRIPT LANGUAGE="JavaScript" SRC="/ca/admin/dynamicVars.js"></SCRIPT>
-
-
-<SCRIPT>
-<!--
-function navMajorVersion()
-{
- return parseInt(navigator.appVersion.substring(0, navigator.appVersion.indexOf(".")));
-}
-
-function updateUid(f)
-{
- if (f.uid.value != '') {
- f.UID1.value = f.uid.value;
- }
- formulateDN(f, f.subject);
-}
-
-var crmfObject;
-function validate(form)
-{
- if (!checkValidity())
- return false;
-
- with (form) {
- if (uid.value == "") {
- alert("You must supply your uid");
- return false;
- }
- if (pwd.value == "") {
- alert("You must supply your password");
- return false;
- }
-
- if (isValidCSR(form) == false) {
- //alert(' is not valid csr');
- return false;
- }
-
- var keyGenAlg = "rsa-ex";
- // var kraTranCert = "MIICDjCCAXegAwIBAgICAfMwDQYJKoZIhvcNAQEEBQAwdzELMAkGA1UEBhMCVVMxLDAqBgNVBAoTI05ldHNjYXBlIENvbW11bmljYXRpb25zIENvcnBvcmF0aW9uMREwDwYDVQQLEwhIYXJkY29yZTEnMCUGA1UEAxMeSGFyZGNvcmUgQ2VydGlmaWNhdGUgU2VydmVyIElJMB4XDTk4MTExOTIzNDIxOVoXDTk5MDUxODIzNDIxOVowLjELMAkGA1UEBhMCVVMxETAPBgNVBAoTCG5ldHNjYXBlMQwwCgYDVQQDEwNLUmEwXDANBgkqhkiG9w0BAQEFAANLADBIAkEArrbDiYUI5SCdlCKKa0bEBn1m83kX6bdhytRYNkd/HB95Bp85SRadmdJV+0O/yMxjYAtGCFrmcqEZ4sh2YSov6wIDAQABozYwNDARBglghkgBhvhCAQEEBAMCAEAwHwYDVR0jBBgwFoAUl7FtsrYCFlQMl9fjMm3LnN/u3oAwDQYJKoZIhvcNAQEEBQADgYEApvzcUsVIOstaoYSiWb4+aMVH6s1jiJlr5iVHnOKzfsYxPVdUw6uz04AT8N+1KIarMTKxHPzGAFSLicKLEv4HG4vh6llc86uzRzWpUqqVHg/eKN5A8Jyg56D4DkNr/XEJ7QdKesAp13dk5H5qvHelkSPLYYdMXNwNWPVZKgnWrWg=";
- // var keyGenAlg = "rsa-ex";
-
- var keylen=512;
-
- // generate keys for cartman.
- if (navigator.appName == "Netscape" &&
- typeof(crypto.version) != "undefined") {
- certNickname.value = subject.value;
- crmfObject = crypto.generateCRMFRequest(
- subject.value,
- "regToken", "authenticator",
- null,
- "setCRMFRequest();",
- keylen, null, "rsa-dual-use");
- }
- return true;
- }
-}
-
-function setCRMFRequest()
-{
- with (document.forms[0]) {
- CRMFRequest.value = crmfObject.request;
- //alert(crmfObject.request);
- submit();
- }
-}
-
-//-->
-</SCRIPT>
-</head>
-
-<OBJECT
- classid="clsid:127698e4-e730-4e5c-a2b1-21490a70c8a1"
- CODEBASE="/xenroll.dll"
- id=Enroll >
-</OBJECT>
-
-
-<SCRIPT LANGUAGE=VBS>
-<!--
-Function escapeDNComponent(comp)
- escapeDNComponent = comp
-End Function
-
-Function doubleQuotes(comp)
- doubleQuotes = False
-End Function
-
-Function formulateDN(a,b)
- Dim dn
- Dim TheForm
- Set TheForm = Document.ReqForm
-
- dn = Empty
-
- If (TheForm.C.Value <> Empty) Then
- If doubleQuotes(TheForm.C.Value) = True Then
- MsgBox "Double quotes are not allowed in the Country field"
- Exit Function
- End If
- If (dn <> Empty) Then
- dn = dn & ","
- End If
- dn = dn & "C=" & escapeDNComponent(TheForm.C.Value)
- End If
-
- If (TheForm.O.Value <> Empty) Then
- If doubleQuotes(TheForm.O.Value) = True Then
- MsgBox "Double quotes are not allowed in the Organiztion field"
- Exit Function
- End If
- If (dn <> Empty) Then
- dn = dn & ","
- End If
- dn = dn & "O=" & escapeDNComponent(TheForm.O.Value)
- End If
-
- If (TheForm.OU.Value <> Empty) Then
- If doubleQuotes(TheForm.OU.Value) = True Then
- MsgBox "Double quotes are not allowed in the Org Unit field"
- Exit Function
- End If
- If (dn <> Empty) Then
- dn = dn & ","
- End If
- dn = dn & "OU=" & escapeDNComponent(TheForm.OU.Value)
- End If
-
- If (TheForm.UID1.Value <> Empty) Then
- If doubleQuotes(TheForm.UID1.Value) = True Then
- MsgBox "Double quotes are not allowed in the uid field"
- Exit Function
- End If
- If (dn <> Empty) Then
- dn = dn & ","
- End If
- dn = dn & "0.9.2342.19200300.100.1.1=" & escapeDNComponent(TheForm.UID1.Value)
- End If
-
- If (TheForm.CN.Value <> Empty) Then
- If doubleQuotes(TheForm.CN.Value) = True Then
- MsgBox "Double quotes are not allowed in the Common Name field"
- Exit Function
- End If
- If (dn <> Empty) Then
- dn = dn & ","
- End If
- dn = dn & "CN=" & escapeDNComponent(TheForm.CN.Value)
- End If
-
- If (TheForm.E.Value <> Empty) Then
- If doubleQuotes(TheForm.E.Value) = True Then
- MsgBox "Double quotes are not allowed in the eMail field"
- Exit Function
- End If
- If (dn <> Empty) Then
- dn = dn & ","
- End If
- dn = dn & "E=" & escapeDNComponent(TheForm.E.Value)
- End If
-
-
- formulateDN = dn
-End Function
-
-Sub Send_OnClick
- Dim TheForm
- Dim szName
- Set TheForm = Document.ReqForm
-
-
- ' Do a few sanity checks
- If (TheForm.uid.Value = Empty) Then
- ret = MsgBox("You must supply your Directory uid for certificate enrollment", 0, "MSIE Certificate Request")
- Exit Sub
- End If
-
- If (TheForm.pwd.Value = Empty) Then
- ret = MsgBox("You must supply your Directory password for certificate enrollment", 0, "MSIE Certificate Request")
- Exit Sub
- End If
-
-
- ' Contruct the X500 distinguished name
- szName = formulateDN("","")
-
- On Error Resume Next
- Enroll.HashAlgorithm = "MD5"
- Enroll.KeySpec = 1
- Enroll.GenKeyFlags = 1 ' key exportable
-
- ' Pick the provider that is selected
- set options = TheForm.all.cryptprovider.options
- index = options.selectedIndex
- Enroll.providerType = options(index).value
- Enroll.providerName = options(index).text
-
- szCertReq = Enroll.createPKCS10(szName, "1.3.6.1.5.5.7.3.2")
- theError = Err.Number
- On Error Goto 0
- '
- ' If the user has cancelled things the we simply ignore whatever
- ' they were doing ... need to think what should be done here
- '
- If (szCertReq = Empty AND theError = 0) Then
- Exit Sub
- End If
-
- If (szCertReq = Empty OR theError <> 0) Then
- '
- ' There was an error in the key pair generation. The error value
- ' is found in the variable 'theError' which we snarfed above before
- ' we did the 'On Error Goto 0' which cleared it again.
- '
- sz = "The error '" & Hex(theError) & "' occurred." & chr(13) & chr(10) & "Your credentials could not be generated."
- result = MsgBox(sz, 0, "Credentials Enrollment")
- Exit Sub
- End If
-
- TheForm.pkcs10Request.Value = szCertReq
- TheForm.Submit
- Exit Sub
-
-End Sub
--->
-</SCRIPT>
-
-<body bgcolor="#FFFFFF" onload=checkClientTime()>
-
-<script lang=javascript>
-//<!--
- if (navigator.appName == "Netscape" &&
- navMajorVersion() <= 3) {
- document.writeln(
- '<form name="ReqForm" method="post" action="adminEnroll">');
- } else
- if (navigator.appName == "Netscape" &&
- typeof(crypto.version) != "undefined") {
- document.writeln(
- '<form name="ReqForm" method="post" action="adminEnroll">');
- } else {
- document.writeln(
- '<form name="ReqForm" method="post" action="adminEnroll" '+
- 'onSubmit="return validate(document.forms[0])">');
- }
-//-->
-</script>
-
-<font size="+1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
-Administrator/Agent Certificate Enrollment<br>
-</font><br>
- <font size="-1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
- To access the Agent Services pages and approve requests for certificates,
- you must have a personal client SSL certificate so that Certificate
- System can authenticate your identity. You must also
- be designated as an agent, or privileged user.
- <p>
- Use this form to request this first personal certificate to be issued
- by the system. When you submit the form, the certificate is issued
- immediately and returned to you. The system also adds you
- automatically to the list of agents. You must import the new
- certificate into your browser before you can access the Agent Services
- pages.
- <p>
- <b>After you submit this form, it is automatically disabled.</b> To enroll
- again, or to enroll other users, please see the documentation.
- </font>
-
-<table border="0" cellspacing="0" cellpadding="2" background="/pki/images/hr.gif" width="100%">
- <tr>
- <td>&nbsp;</td>
- </tr>
-</table>
-
-<table border="0" cellspacing="2" cellpadding="2">
- <tr valign="TOP">
- <td><font size="-1" face="PrimaSans BT, Verdana, sans-serif">
- <b>Important:</b>
- </font></td>
- <td><font size="-1" face="PrimaSans BT, Verdana, sans-serif">
- Be sure to request your certificate on the same computer
- on which you plan to use the certificate.
- </font></td>
- </tr>
-</table>
-
-<table border="0" cellspacing="0" cellpadding="0" background="/pki/images/hr.gif" width="100%">
- <tr>
- <td>&nbsp;</td>
- </tr>
-</table>
-
-<table border="0" width="100%" cellspacing="2" cellpadding="2">
- <tr>
- <td colspan="2" valign="TOP">
- <font size="-1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
- <b>Authentication Information</b><br>
- Enter the user ID and password for the administrator/agent.
- </td>
- </tr>
- <tr>
- <td align="RIGHT">
- <font size="-1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
- User ID:</font>
- </td>
- <td valign="TOP">
- <input type="TEXT" name="uid" size="30" onchange="updateUid(this.form)">
- </td>
- </tr>
- <tr>
- <td align="RIGHT">
- <font size="-1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
- Password:</font>
- </td>
- <td valign="TOP">
- <input type="PASSWORD" name="pwd" AutoComplete=off size="30">
- </td>
- </tr>
-
- <tr>
- <td VALIGN=TOP COLSPAN="2">
- <font size="-1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
- <b>Subject Name</b><br>
- Enter values for the DN components you want to have in your certificate.
- </font>
- </td>
- </tr>
-
- <tr>
- <td align=right>
- <font size="-1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
- Full name:
- </font>
- </td>
- <td VALIGN=TOP>
- <input type="HIDDEN" name="csrRequestorName">
- <input type="TEXT" name="CN" value="CS Administrator" size="30" onchange="formulateDN(this.form, this.form.subject)">
- </td>
- </tr>
-
- <tr>
- <td ALIGN=RIGHT>
- <font size="-1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
- Login name:
- </font>
- </td>
- <td VALIGN=TOP>
- <input type="TEXT" name="UID1" size="30" onchange="formulateDN(this.form, this.form.subject)">
- </td>
- </tr>
-
- <tr>
- <td ALIGN=RIGHT>
- <font size="-1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
- Email address:
- </font>
- </td>
- <td>
- <input type="TEXT" name="E" size="30" onchange="formulateDN(this.form, this.form.subject)">
- </td>
- </tr>
-
- <tr>
- <td ALIGN=RIGHT>
- <font size="-1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
- Organization unit:
- </font>
- </td>
- <td>
- <input type="TEXT" name="OU" size="30" onchange="formulateDN(this.form, this.form.subject)">
- </td>
- </tr>
-
- <tr>
- <td ALIGN=RIGHT>
- <font size="-1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
- Organization:
- </font>
- </td>
- <td>
- <input type="TEXT" name="O" size="30" onchange="formulateDN(this.form, this.form.subject)">
- </td>
- </tr>
-
- <tr>
- <td ALIGN=RIGHT>
- <font size="-1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
- Country:
- </font>
- </td>
- <td>
- <input type="TEXT" name="C" value="US" size=2 maxlength=2 onchange="formulateDN(this.form, this.form.subject)">
- </td>
- </tr>
-
- <tr>
- <td></td>
-
- <td>
- <!-- for Netscape Certificate Type Extension -->
- <input type="HIDDEN" value="false" name="email">
- <input type="HIDDEN" value="true" name="ssl_client">
- <!-- for Key Usage Extension -->
- <input type="HIDDEN" name="digital_signature" value=true>
- </td>
- </tr>
-
-<script lang=javascript>
-<!--
-function renderSelectionWithNames(name, from, to, selected, names)
-{
- document.writeln('<SELECT NAME="'+name+'" onChange="checkValidity()">');
- for (var i = from; i < to; i++) {
- if (i == selected) {
- document.writeln('<OPTION VALUE='+i+' SELECTED>'+names[i]);
- } else {
- document.writeln('<OPTION VALUE='+i+'>'+names[i]);
- }
- }
- document.writeln('</SELECT>');
-}
-
-function renderSelection(name, from, to, selected)
-{
- document.writeln('<SELECT NAME="'+name+'" onChange="checkValidity()">');
- for (var i = from; i < to; i++) {
- if (i == selected) {
- document.writeln('<OPTION VALUE='+i+' SELECTED>'+i);
- } else {
- document.writeln('<OPTION VALUE='+i+'>'+i);
- }
- }
- document.writeln('</SELECT>');
-}
-
-function renderValidityInfo()
-{
- document.writeln('<tr><td valign="top" colspan="2">');
- document.writeln('<font size="-1" face="PrimaSans BT, Verdana, sans-serif">');
- document.writeln('<b>Validity</b><br>');
- document.writeln('Set certificate validity period by selecting dates,');
- document.writeln('for which certificate is not valid before and not valid after.');
- document.writeln('</font></td></tr>');
-
- var months = new Array("January", "February", "March", "April",
- "May", "June", "July", "August",
- "September", "October", "November", "December");
-
- var startDay = new Date(serverdate);
- var year = startDay.getFullYear();
- var time1 = startDay.getTime();
- var time2 = time1 + 31536000000; // 1 Year (365 days)
- var endDay = new Date(time2);
-
-
- document.writeln('<tr><td align="right">'+
- '<font size="-1" face="PrimaSans BT, Verdana, sans-serif">'+
- 'Not valid before:</font></td>');
- document.writeln('<td valign="top">');
-
- renderSelection("fromDay", 1, 32, startDay.getDate());
- renderSelectionWithNames("fromMonth", 0, months.length, startDay.getMonth(), months);
- renderSelection("fromYear", year-2, year+10, year);
- document.writeln('&nbsp;&nbsp;');
- renderSelection("fromHour", 0, 24, startDay.getHours());
- renderSelection("fromMinute", 0, 60, startDay.getMinutes());
- renderSelection("fromSecond", 0, 60, startDay.getSeconds());
- document.writeln('</td></tr>');
-
-
- document.writeln('<tr><td align="right">'+
- '<font size="-1" face="PrimaSans BT, Verdana, sans-serif">'+
- 'Not valid after:</font></td>');
- document.writeln('<td valign="top">');
-
- renderSelection("toDay", 1, 32, endDay.getDate());
- renderSelectionWithNames("toMonth", 0, months.length, endDay.getMonth(), months);
- renderSelection("toYear", year-2, year+10, endDay.getFullYear());
- document.writeln('&nbsp;&nbsp;');
- renderSelection("toHour", 0, 24, endDay.getHours());
- renderSelection("toMinute", 0, 60, endDay.getMinutes());
- renderSelection("toSecond", 0, 60, endDay.getSeconds());
- document.writeln('</td></tr>');
-
- document.writeln('<tr><td valign="top" colspan="2">');
- document.writeln('<input type="HIDDEN" name="notValidBefore" value="">');
- document.writeln('<input type="HIDDEN" name="notValidAfter" value="">');
- document.writeln('</td></tr>');
-
- document.forms[0].notValidBefore.value = time1;
- document.forms[0].notValidAfter.value = time2;
-}
-
-function checkValidity()
-{
- var i;
- var fromDate;
- i = document.forms[0].fromDay.selectedIndex;
- var day = document.forms[0].fromDay.options[i].value;
- i = document.forms[0].fromMonth.selectedIndex;
- var month = document.forms[0].fromMonth.options[i].value;
- i = document.forms[0].fromYear.selectedIndex;
- var year = document.forms[0].fromYear.options[i].value;
- i = document.forms[0].fromHour.selectedIndex;
- var hour = document.forms[0].fromHour.options[i].value;
- i = document.forms[0].fromMinute.selectedIndex;
- var minute = document.forms[0].fromMinute.options[i].value;
- i = document.forms[0].fromSecond.selectedIndex;
- var second = document.forms[0].fromSecond.options[i].value;
-
- fromDate = new Date(year,month,day,hour,minute,second);
- if (fromDate.getMonth() != month || fromDate.getDate() != day || year == 0) {
- alert((++month)+"/"+day+"/"+year+" is invalid");
- return false;
- }
- var fromTime = fromDate.getTime();
-
- var toDate;
- i = document.forms[0].toDay.selectedIndex;
- day = document.forms[0].toDay.options[i].value;
- i = document.forms[0].toMonth.selectedIndex;
- month = document.forms[0].toMonth.options[i].value;
- i = document.forms[0].toYear.selectedIndex;
- year = document.forms[0].toYear.options[i].value;
- i = document.forms[0].toHour.selectedIndex;
- hour = document.forms[0].toHour.options[i].value;
- i = document.forms[0].toMinute.selectedIndex;
- minute = document.forms[0].toMinute.options[i].value;
- i = document.forms[0].toSecond.selectedIndex;
- second = document.forms[0].toSecond.options[i].value;
-
- toDate = new Date(year,month,day,hour,minute,second);
- if (toDate.getMonth() != month || toDate.getDate() != day || year == 0) {
- alert((++month)+"/"+day+"/"+year+" is invalid");
- return false;
- }
- var toTime = toDate.getTime();
-
-
- if (fromTime > toTime) {
- alert("NOT VALID AFTER date should not be earlier than NOT VALID BEFORE date.");
- return false;
- }
-
- document.forms[0].notValidBefore.value = fromTime;
- document.forms[0].notValidAfter.value = toTime;
-
- return true;
-}
-
-renderValidityInfo();
-//-->
-</script>
-
- <tr>
- <td valign="TOP" colspan="2">
- <font size="-1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
- <b>User's Key Information</b><br>
- When your submit this form, the browser generates a private and
- public key. The browser retains the private key and submits the
- public key along with your request for a certificate.
- The public key becomes part of your certificate. <P>
-<script lang=javascript>
-<!--
- if (navigator.appName == 'Netscape' && navMajorVersion() <= 3) {
- document.writeln('Select the length of the key to generate. '+
- 'The longer the key length, the greater the strength. ');
- } else
- if (navigator.appName == 'Netscape' && typeof(crypto.version) == "undefined") {
- document.writeln('Select the length of the key to generate. '+
- 'The longer the key length, the greater the strength. ');
- }
- if (navigator.appName == "Microsoft Internet Explorer") {
- document.writeln(
- '<font size=-1 face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">');
- document.writeln('Cryptographic Provider:');
- document.writeln('</font>');
- document.writeln('<SELECT NAME=\"cryptprovider\"></SELECT>');
- }
-//-->
-</script>
- </font>
- </td>
- </tr>
- <tr>
-<script lang=javascript>
-<!--
- if (navigator.appName == "Netscape") {
- if (navMajorVersion() <= 3) {
- document.write('<td align="right">');
- document.write('<font size="-1" '+
- 'face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">');
- document.write('Key Length:');
- document.write('</font>');
- document.write('</td>');
- document.write('<td>');
- document.write('<KEYGEN name="subjectKeyGenInfo">');
- document.write('</td>');
- } else
- if (typeof(crypto.version) == "undefined") {
- //alert('not cartman');
- document.write('<td align="right">');
- document.write('<font size="-1" '+
- 'face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">');
- document.write('Key Length:');
- document.write('</font>');
- document.write('</td>');
- document.write('<td>');
- document.write('<KEYGEN name="subjectKeyGenInfo">');
- document.write('</td>');
- }
- else {
- //alert('cartman');
- //document.write('<td>');
- //document.writeln('<SELECT NAME=\"keyLength\">');
- //document.writeln('<OPTION VALUE=512>512 bits');
- //document.writeln('<OPTION VALUE=768>768 bits');
- //document.writeln('<OPTION VALUE=1024>1024 bits');
- //document.writeln('</SELECT>');
- //document.write('</td>');
- }
- }
-//-->
-</script>
-
- </td>
- </tr>
-
- <tr>
- <td valign="TOP" colspan="2">
- <table border="0" width="100%" cellspacing="0" cellpadding="6" bgcolor="#cccccc" background="/pki/images/gray90.gif">
- <tr>
- <td>
- <div align="RIGHT">
-<script lang=javascript>
-<!--
- if (navigator.appName == "Netscape" &&
- navMajorVersion() <= 3) {
- document.writeln(
- '<input type="submit" value="Submit" '+
- 'name="submit" width="72">');
- } else
- if (navigator.appName == "Netscape" &&
- typeof(crypto.version) == "undefined") {
- document.writeln(
- '<input type="submit" value="Submit" '+
- 'name="submit" width="72">');
- }
- else if (navigator.appName == "Microsoft Internet Explorer") {
- document.writeln(
- '<input type="submit" value="Submit" '+
- 'name="Send" width="72">');
- }
- else {
- // alert('cartman');
- document.writeln(
- '<input type="button" value="Submit" '+
- 'name="submitbutton" '+
- 'onclick="validate(form)" width="72">');
- }
-//-->
-</script>
-
- <input type="hidden" name="subject" value="" >
- <img src="/pki/images/spacer.gif" width="6" height="6">
- <input type="reset" value="Reset" name="reset" width="72">
- <img src="/pki/images/spacer.gif" width="9" height="6">
- <!-- <input type="button" value="Help" onclick=
- "help('http://www.redhat.com/docs/manuals/cert-system#Administrator/Agent Certificate Enrollment')"
- name="button" width="72"> -->
- <input type="hidden" name="certType" value="client">
-
-<script lang=javascript>
-<!--
- if (navigator.appName == 'Netscape') {
- if (navMajorVersion() < 4 ||
- typeof(crypto.version) == "undefined") {
- document.write(
- '<input type="hidden" name="importCert" value="off">');
- }
- else {
- document.write(
- '<input type="hidden" name="CRMFRequest" value="">');
- document.write(
- '<input type="hidden" name="cmmfResponse" value="on">');
- document.write(
- '<input type="hidden" name="certNickname" value="">');
- }
- }
- else {
- // IE
- document.write(
- '<input type="hidden" name="pkcs10Request" value="">');
- }
-//-->
-</script>
- </div>
- </td>
- </tr>
- </table>
- </td>
- </tr>
-</table>
-</form>
-<SCRIPT LANGUAGE=VBS>
-<!--
-
-FindProviders
-
-Function FindProviders
- Dim i, j
- Dim providers()
- i = 0
- j = 1
- Dim el
- Dim temp
- Dim first
- Dim TheForm
- Set TheForm = document.ReqForm
- On Error Resume Next
- first = 0
-
- Do While True
- temp = ""
- Enroll.providerType = j
- temp = Enroll.enumProviders(i,0)
- If Len(temp) = 0 Then
- If j < 1 Then
- j = j + 1
- i = 0
- Else
- Exit Do
- End If
- Else
- set el = document.createElement("OPTION")
- el.text = temp
- el.value = j
- TheForm.cryptprovider.add(el)
- If first = 0 Then
- first = 1
- TheForm.cryptprovider.selectedIndex = 0
- End If
- i = i + 1
- End If
- Loop
-
-End Function
-
--->
-</SCRIPT>
-</body>
-</html>
diff --git a/dogtag/ca-ui/shared/webapps/ca/admin/ca/securitydomainlogin.template b/dogtag/ca-ui/shared/webapps/ca/admin/ca/securitydomainlogin.template
deleted file mode 100644
index eac3ac476..000000000
--- a/dogtag/ca-ui/shared/webapps/ca/admin/ca/securitydomainlogin.template
+++ /dev/null
@@ -1,114 +0,0 @@
-<!-- --- BEGIN COPYRIGHT BLOCK ---
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; 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 --- -->
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<CMS_TEMPLATE>
- <head>
-
- <title>CA Admin Security Domain Login</title>
-
- <link rel="shortcut icon" href="/pki/images/favicon.ico" />
- <link rel="stylesheet" href="/pki/css/pki-base.css" type="text/css" />
-<META http-equiv=Content-Type content="text/html; charset=UTF-8">
- </head>
-
-
-<div id="wrap">
-<div id="header">
- <a href="http://pki.fedoraproject.org/" title="Visit pki.fedoraproject.org for more information about Dogtag products and services"><img src="/pki/images/logo_header.gif" alt="Dogtag" id="myLogo" /></a>
- <div id="headertitle">
- <a href="/" title="Dogtag Network homepage">Dogtag<sup><font size="-2">&reg;</font></sup> Certificate System</a>
- </div>
- <div id="account">
- <dl><dt><span></span></dt><dd></dd></dl>
- </div>
-</div>
-
-<div id="mainNavOuter">
-<div id="mainNav">
-
-<div id="mainNavInner">
-
-</div><!-- end mainNavInner -->
-</div><!-- end mainNav -->
-</div><!-- end mainNavOuter -->
-
-<!-- close bar -->
-
- <div id="content">
- <table width="100%" cellspacing="0">
- <tr>
- <td width="100%">
- <h1><img src="/pki/images/icon-software.gif" />
-<script language=javascript>
-document.write('Security Domain ('+result.header.sdname+') Login </h1>');
-</script>
- <form name=sdForm action="getCookie" method="post">
-
-<script language=javascript>
-document.write('<p>The Enterprise '+result.header.subsystem+' Administrator will register this '+result.header.subsystem+' Subsystem located at '+ result.header.host+' under this Security Domain located at '+result.header.sdhost+'. The credential information will be provided to the Security Domain for authentication.<p>');
-if (result.header.errorString != null)
-document.write('<img src="/pki/images/icon_crit_update.gif">&nbsp;<font color="red">'+result.header.errorString+'</font>');
-document.write('<table class="details">');
-document.write('<tr>');
-document.write('<th>Uid:</th>');
-if (result.header.sd_uid != null)
-document.write('<td><input type="text" length="128" size="40" name="uid" value="'+result.header.sd_uid+'" /></td>');
-else
-document.write('<td><input type="text" length="128" size="40" name="uid" value="" /></td>');
-document.write('</tr>');
-document.write('</tr>');
-document.write('<th>Password:</th>');
-
-if (result.header.sd_pwd != null)
-document.write('<td><input type="password" length="64" size="40" name="pwd" value="'+result.header.sd_pwd+'" autocomplete="off" /></td>');
-else
-document.write('<td><input type="password" length="64" size="40" name="pwd" value="" autocomplete="off" /></td>');
-document.write('</tr>');
-document.write('<input type=hidden name=url value="'+result.header.url+'">');
-document.write('</table>');
-</script>
-
- <div align="right">
- <hr />
- &nbsp;
- </div>
-
-
-<p>
-<table width=100%>
-<tr bgcolor="#eeeeee">
- <td>
-<div align="right">
-<input onclick="sdForm.submit()" type="button" name="sd_next" value="Login">
-</div>
- </td>
-</tr>
-</table>
-
- </form>
-
- </td>
- </tr>
- </table>
-
- </div> <!-- close content -->
- </div> <!-- close wrap -->
-
- </body>
-</html>
diff --git a/dogtag/ca-ui/shared/webapps/ca/admin/ca/sendCookie.template b/dogtag/ca-ui/shared/webapps/ca/admin/ca/sendCookie.template
deleted file mode 100644
index b35881ed6..000000000
--- a/dogtag/ca-ui/shared/webapps/ca/admin/ca/sendCookie.template
+++ /dev/null
@@ -1,97 +0,0 @@
-<!-- --- BEGIN COPYRIGHT BLOCK ---
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; 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 --- -->
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<CMS_TEMPLATE>
-<title>CA Admin Send Cookie</title>
- <link rel="shortcut icon" href="/pki/images/favicon.ico" />
- <link rel="stylesheet" href="/ca/css/rhn-base.css" type="text/css" />
- <META http-equiv=Content-Type content="text/html; charset=UTF-8">
-
-</head>
-<body bgcolor="#FFFFFF" link="#666699" vlink="#666699" alink="#333366" onLoad="document.cookieForm.submit()">
-
-<div id="header">
- <a href="http://pki.fedoraproject.org/" title="Visit pki.fedoraproject.org for more information about Dogtag products and services"><img src="/pki/images/logo_header.gif" alt="Dogtag" id="myLogo" /></a>
- <div id="headertitle">
- <a href="/" title="Dogtag Network homepage">Dogtag<sup><font size="-2">&reg;</font></sup> Certificate System</a>
- </div>
- <div id="account">
- <dl><dt><span></span></dt><dd></dd></dl>
- </div>
-</div>
-
-<div id="mainNavOuter">
-<div id="mainNav">
-
-<div id="mainNavInner">
-
-</div><!-- end mainNavInner -->
-</div><!-- end mainNav -->
-</div><!-- end mainNavOuter -->
-
-
-<div id="bar">
-
-<div id="systembar">
-<div id="systembarinner">
-
-<div>
- -
-</div>
-
-
-</div>
-</div>
-
-</div>
-
-
-<font size="+1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
-Sending Session ID ...
-</font><br>
-<p>
-</font>
-<p>
-<center>
-<script language=javascript>
-document.write('<form name="cookieForm" method="post" action="'+result.header.url+'">');
-</script>
-<table border="0" cellspacing="0" cellpadding="0">
-<tr valign="TOP">
-<td>&nbsp;</td>
-<td>&nbsp;</td>
-</tr>
-<script language=javascript>
- document.write('<tr valign="TOP">');
- document.write('<td>');
- document.write('<input type="hidden" name="session_id" value="'+result.header.session_id+'">');
- document.write('</td></tr>');
-</script>
-<tr valign="TOP">
-<td>&nbsp;</td>
-<td>&nbsp;</td>
-</tr>
-</table>
-</form>
-</center>
- <div id="footer">
- </div>
-
-</body>
-</html>
diff --git a/dogtag/ca-ui/shared/webapps/ca/admin/cms-funcs.js b/dogtag/ca-ui/shared/webapps/ca/admin/cms-funcs.js
deleted file mode 100644
index c8ffd51c7..000000000
--- a/dogtag/ca-ui/shared/webapps/ca/admin/cms-funcs.js
+++ /dev/null
@@ -1,538 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; 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 ---
-
-//<!--
-
-
-function checkClientTime()
-{
- var speed;
- var server_date = new Date(serverdate);
- var client_date = new Date();
- var zone = client_date.getTimezoneOffset();
- var timediff = 0;
-
- var serverutc = server_date.getTime();
- var clientutc = client_date.getTime();
-
- var offset = clientutc - serverutc;
- if (offset >0) {
- speed = 'fast';
- } else {
- speed = 'slow';
- }
- timediff = Math.round(Math.abs(offset/1000/60));
-
- if (timediff > 10) {
- msg = 'Your computer\'s clock is '+ timediff+ ' minutes '+ speed +
- '\n\nYou may encounter problems using your certificate\n' +
- 'as your clock is set incorrectly.\n\n' +
- 'According to the server, the time is:\n ' + server_date +
- '\n\nPlease correct your clock before proceeding with enrollment'+
- '\n\nYour timezone is set to ' + (-zone/60) +' hours relative to GMT.\n' +
- 'If you change your timezone, you may need to restart your browser\n'+
- 'before continuing.';
- alert(msg);
- return false;
- }
- return true;
-}
-
-
-
-
-function doubleQuotes(componentName)
-{
- for (i=0; i < componentName.length; i++) {
- if (componentName.charAt(i) == '"') {
- return true;
- }
- }
- return false;
-}
-
-function escapeDNComponent(str)
-{
- var outStr = "";
- var escapeValue = false;
-
- // Do we need to escape any characters
- for (i=0; i < str.length; i++) {
- c = str.charAt(i);
- if (c == ',' || c == '=' || c == '+' || c == '<' ||
- c == '>' || c == '#' || c == ';' || c == '\r' ||
- c == '\n') {
- escapeValue = true;
- break;
- }
- }
-
- if (escapeValue == true) {
- outStr += '"';
- outStr += str;
- outStr += '"';
- } else {
- outStr += str;
- }
- return outStr;
-}
-
-function formulateDN(form, distinguishedName)
-{
- // Note: The alerts about double quotes are here to avoid
- // problems with the code dealing with quoting and escaping in the
- // Netscape Directory Server 1.0 implementation.
- with (form) {
- distinguishedName.value = '';
- if (form.E != null) {
- if (E.value != '') {
- if (doubleQuotes(E.value) == true) {
- alert('Double quotes are not allowed in the E-mail field');
- E.value = '';
- E.focus();
- return;
- }
- if (distinguishedName.value != '') distinguishedName.value += ', ';
- distinguishedName.value += 'E=' + escapeDNComponent(E.value);
- }
- }
- if (form.CN!= null) {
- if (CN.value != '') {
- if (doubleQuotes(CN.value) == true) {
- alert('Double quotes are not allowed in Common Name field');
- CN.value = '';
- CN.focus();
- return;
- }
- if (distinguishedName.value != '') distinguishedName.value += ', ';
- distinguishedName.value += 'CN=' + escapeDNComponent(CN.value);
- }
- }
- if (form.UID1 != null) {
- if (UID1.value != '') {
- if (doubleQuotes(UID1.value) == true) {
- alert('Double quotes are not allowed in the user id field');
- UID1.value = '';
- UID1.focus();
- return;
- }
- if (distinguishedName.value != '') distinguishedName.value += ', ';
- distinguishedName.value += 'UID=' + escapeDNComponent(UID1.value);
- }
- }
- if (form.OU != null) {
- if (OU.value != '') {
- if (doubleQuotes(OU.value) == true) {
- alert('Double quotes are not allowed in Org Unit field');
- OU.value = '';
- OU.focus();
- return;
- }
- if (distinguishedName.value != '') distinguishedName.value += ', ';
- distinguishedName.value += 'OU=' + escapeDNComponent(OU.value);
- }
- }
- if (form.O != null) {
- if (O.value != '') {
- if (doubleQuotes(O.value) == true) {
- alert('Double quotes are not allowed in Organization field.');
- O.value = '';
- O.focus();
- return;
- }
- if (distinguishedName.value != '') distinguishedName.value += ', ';
- distinguishedName.value += 'O=' + escapeDNComponent(O.value);
- }
- }
- if (form.L != null) {
- if (L.value != '') {
- if (doubleQuotes(L.value) == true) {
- alert('Double quotes are not allowed in Locality field.');
- L.value = '';
- L.focus();
- return;
- }
- if (distinguishedName.value != '') distinguishedName.value += ', ';
- distinguishedName.value += 'L=' + escapeDNComponent(L.value);
- }
- }
- if (form.ST != null) {
- if (ST.value != '') {
- if (doubleQuotes(ST.value) == true) {
- alert('Double quotes are not allowed in State field.');
- ST.value = '';
- ST.focus();
- return;
- }
- if (distinguishedName.value != '') distinguishedName.value += ', ';
- distinguishedName.value += 'ST=' + escapeDNComponent(ST.value);
- }
- }
- if (form.C != null) {
- if (C.value != '') {
- if (doubleQuotes(C.value) == true) {
- alert('Double quotes are not allowed in Country field.');
- C.value = '';
- C.focus();
- return;
- }
- if (distinguishedName.value != '') distinguishedName.value += ', ';
- distinguishedName.value += 'C=' + escapeDNComponent(C.value);
- }
- }
- }
-}
-
-function isValidIssuerDN(form)
-{
- // Note: The check here is to avoid a bug in Netscape Navigator 3.0 and 3.01
- // that are triggered on formation of the nickname on import of a CA cert if
- // that cert does not contain an OU or O component.
- if ((form.OU.value == '') && (form.O.value == '')) {
- alert("You must enter an Organization Unit or an Organization.");
- return false;
- } else {
- return true;
- }
-}
-
-function isValidAdminDN(form)
-{
- // Note: The check here is to avoid a bug in Netscape Navigator 3.0 and 3.01
- // that are triggered on formation of the nickname on import of a personal cert if
- // that cert does not contain a common name.
-
- if (form.CN.value == '') {
- alert("You must enter a Common Name.");
- return false;
- } else {
- return true;
- }
-}
-
-function isValidCSR(form)
-{
- // Note: the checks here are of mixed origin. Some are required for Navigator
- // and Communicator. The CSR field checks are to avoid server side rejection of the
- // submission. These checks can be split up to be different for different types of
- // certificates.
-
- formulateDN(form, form.subject);
- // DEBUG
- //alert(form.subject);
-
- with (form) {
- if (email != null) {
- if (E.value == "" && email.checked) {
- alert("E-mail certificates must include an E-mail address.");
- return false;
- }
- }
- if (CN.value == "") {
- alert("You must supply your name for the certificate.");
- return false;
- }
- return true;
- }
-}
-
-function isNumber(string, radix) {
- var i = 0;
- var legalDigits;
- if (radix == null || radix == 10) {
- legalDigits = "0123456789";
- } else if (radix == 16) {
- legalDigits = "0123456789abcdefABCDEF:";
- } else {
- return false;
- }
- for(; i < string.length; ++i) {
- if (string.charAt(i) != ' ')
- break;
- }
- if (string.charAt(i) == '+' || string.charAt(i) == '-' ) {
- ++i;
- }
- if (radix == 16 && i < string.length - 2 &&
- string.charAt(i) == '0' &&
- (string.charAt(i+1) == 'x' || string.charAt(i+1) == 'X') &&
- legalDigits.indexOf(string.charAt(i+2)) != -1) {
- i += 3;
- }
- for(; i < string.length; ++i) {
- if (legalDigits.indexOf(string.charAt(i)) == -1)
- break;
- }
- for(; i < string.length; ++i) {
- if (string.charAt(i) != ' ')
- return false;
- }
- return true;
-}
-
-function dateForm(name)
-{
- var i;
- document.write('<FORM NAME=\"'+ name +'\">');
- document.write('<SELECT NAME=\"day\"><OPTION VALUE=0> ');
- for (i=1; i <=31; ++i)
- document.write('<OPTION VALUE='+i+'>'+i);
- document.write('</SELECT>');
- document.write('<SELECT NAME=\"month\">'+
- '<OPTION VALUE=13> '+
- '<OPTION VALUE=0>January'+
- '<OPTION VALUE=1>February'+
- '<OPTION VALUE=2>March'+
- '<OPTION VALUE=3>April'+
- '<OPTION VALUE=4>May'+
- '<OPTION VALUE=5>June'+
- '<OPTION VALUE=6>July'+
- '<OPTION VALUE=7>August'+
- '<OPTION VALUE=8>September'+
- '<OPTION VALUE=9>October'+
- '<OPTION VALUE=10>November'+
- '<OPTION VALUE=11>December'+
- '</SELECT>'
- );
-
- document.write('<SELECT NAME=\"year\"><OPTION VALUE=0> ');
- for (i=1996; i <=2006; ++i)
- document.write('<OPTION VALUE='+i+'>'+i);
- document.write('</SELECT>');
- document.write('</FORM>');
-}
-
-function dateIsEmpty(form)
-{
- return form.day.selectedIndex == 0 &&
- form.month.selectedIndex == 0 &&
- form.year.selectedIndex == 0;
-}
-
-
-function convertDate(form, fieldName)
-{
- var date;
- var day = form.day.options[form.day.selectedIndex].value;
- var month = form.month.options[form.month.selectedIndex].value;
- var year = form.year.options[form.year.selectedIndex].value;
- date = new Date(year,month,day);
-
- // see if normalization was required
- if (date.getMonth() != month || date.getDate() != day ) {
- alert(fieldName + " is invalid");
- return null;
- }
- else
- return Math.round(date.getTime() / 1000);
-}
-
-function daysToSeconds(days){
- return 3600 * 24 * days;
-}
-
-// encloses value in double quotes preceding all embedded double quotes with \
-function escapeValue(value)
-{
- var result;
- var fromIndex = 0, toIndex = 0;
-
- // kludgy work-around for indexOf JavaScript bug on empty string
- if (value == "")
- return '\"\"';
-
- result = '\"';
- while ((toIndex = value.indexOf('\"',fromIndex)) != -1) {
- result += value.substring(fromIndex,toIndex);
- result += '\\"';
- fromIndex = toIndex + 1;
- }
- result += value.substring(fromIndex,value.length);
- result += '\"';
- return result;
-}
-
-// encloses value in double quotes preceding all embedded double quotes and
-// backslashes with backslash
-function escapeValueJSString(value)
-{
- var result = "";
-
- // Do we need to escape any characters
- for (i=0; i < value.length; i++) {
- c = value.charAt(i);
- if (c == '\\' | c == '"') {
- result += '\\';
- }
- result += c;
- }
- return '\"' + result + '\"';
-}
-
-function escapeValueRfc1779(value)
-{
- var result = "";
-
- // Do we need to escape any characters
- for (i=0; i < value.length; i++) {
- c = value.charAt(i);
- if (c == ',' || c == '=' || c == '+' || c == '<' ||
- c == '>' || c == '#' || c == ';' || c == '\r' ||
- c == '\n' || c == '\\' | c == '"') {
- result += '\\';
- }
- result += c;
- }
- return result;
-}
-
-// helper function to construct name component(pattern)
-function makeComponent(list,tag,value,asPattern)
-{
- var last = list.length;
- if (asPattern) {
- list[last] = (value == "") ? "*" : (tag+"="+escapeValueRfc1779(value));
- }
- else if (value != "")
- list[last] = tag+"="+escapeValueRfc1779(value);
-}
-
-// If asPattern is false formulates the RFC 1779 format subject name
-// from the component parts skipping all components with blank values,
-// otherwise builds RFC 1779-like matching pattern from components
-function computeNameCriterion(form)
-{
- var asPattern = form.match[1].checked;
- var result = new Array;
-
- with (form) {
- // The order of clauses here determines how components are ordered
- // in the name sent in the client's request. A site may wish to
- // re-order the clauses here if their conventions produce names
- // with components in a different order.
- makeComponent(result,"E",E.value,asPattern);
- makeComponent(result,"CN",CN.value,asPattern);
- makeComponent(result,"UID",UID.value,asPattern);
- makeComponent(result,"OU",OU.value,asPattern);
- makeComponent(result,"O",O.value,asPattern);
- makeComponent(result,"L",L.value,asPattern);
- makeComponent(result,"ST",ST.value,asPattern);
- makeComponent(result,"C",C.value,asPattern);
- }
- if (result.length == 0)
- return asPattern ? "0 == 0" : "0 == 1";
- else
- return "subject" + ( asPattern ? " ~= " : " == ") +
- escapeValue(result.join(', '));
-}
-
-function booleanCrit(crit,radioArg)
-{
- for (var i = 0; i < radioArg.length; ++i ){
- if( radioArg[i].checked ) {
- if (radioArg[i].value.length != 0) {
- crit[crit.length] = radioArg[i].name + " == " + radioArg[i].value;
- }
- return;
- }
- }
-}
-
-function isHTTPEscapeChar(c)
-{
- if (c == '%' || c == '#' || c == '+' || c == '=' || c == '\n' ||
- c == '\r' || c == '\t' || c == ';' || c == '&' ||
- c == '>') {
- return true;
- }
-
- return false;
-}
-
-function produceHTTPEscapedString(inString)
-{
- table = new Object();
- table["%"] = "25";
- table["#"] = "23";
- table["+"] = "2B";
- table["="] = "3D";
- table["\n"] = "0A";
- table["\r"] = "0D";
- table["\t"] = "09";
- table[";"] = "3B";
- table["&"] = "26";
- table[">"] = "3E";
-
- outString = "";
-
- for (i=0; i < inString.length; i++) {
- if (inString.charAt(i) == ' ') {
- outString += '+';
- } else {
- if (isHTTPEscapeChar(inString.charAt(i))) {
- outString += "%" + table[inString.substring(i, i+1)];
- } else {
- outString += inString.charAt(i);
- }
- }
- }
-
- return outString;
-}
-
-// strips (optional) spaces and 0[xX] prefix at the beginning of s
-function stripPrefix(s)
-{
- var i;
- for(i = 0; i < s.length - 1; ++i) {
- if (s.charAt(i) != ' ' )
- break;
- }
- if (s.charAt(i) == '0' && (s.charAt(i+1) == 'x' || s.charAt(i+1) == 'X')) {
- return s.substring(i+2,s.length);
- } else {
- return s.substring(i,s.length);;
- }
-}
-
-// removes colons from value and returns the result
-// used as helper to convert colon-separated hexadecimal numbers
-// to regular numbers
-function removeColons(value)
-{
- var result = "";
-
- for (i=0; i < value.length; i++) {
- c = value.charAt(i);
- if (c != ':' ){
- result += c;
- }
- }
- return result;
-}
-
-function navMajorVersion()
-{
- return parseInt(navigator.appVersion.substring(0, navigator.appVersion.indexOf(".")));
-}
-//-->
-
-
-
-
-
diff --git a/dogtag/ca-ui/shared/webapps/ca/admin/helpfun.js b/dogtag/ca-ui/shared/webapps/ca/admin/helpfun.js
deleted file mode 100644
index 14a80bb95..000000000
--- a/dogtag/ca-ui/shared/webapps/ca/admin/helpfun.js
+++ /dev/null
@@ -1,35 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; 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 ---
-
-function help(helptopic) {
-
- var HelpWin=window.open("","MyWin", "toolbar=no,directories=no,menubar=no,status=no,scrollbars=yes,resizable=yes,width=500,height=500");
-
- HelpWin.location = helptopic;
- HelpWin.focus();
-
-}
-
-function helpstatus(helpline) {
-
- window.status = helpline;
-
- return true;
-
-}
-
diff --git a/dogtag/ca-ui/shared/webapps/ca/admin/index.html b/dogtag/ca-ui/shared/webapps/ca/admin/index.html
deleted file mode 100644
index 30662d47a..000000000
--- a/dogtag/ca-ui/shared/webapps/ca/admin/index.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!-- --- BEGIN COPYRIGHT BLOCK ---
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; 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 --- -->
-<html>
-<script lang="javascript">
- // redirect to 'ROOT'
- window.location = "/";
-</script>
-</html>