summaryrefslogtreecommitdiffstats
path: root/base/ca/shared/webapps/ca/ee/ca/displayCRL.template
blob: e829387c1ec5f99eb4df246da131dde320c99534 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<!-- --- 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>CRL Info</title>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<CMS_TEMPLATE>

<body bgcolor="#FFFFFF" link="#6666CC" vlink="#6666CC" alink="#333399">
<font face="PrimaSans BT, Verdana, sans-serif" size="+1">
Certificate Revocation List
</font><br>
<table border="0" cellspacing="0" cellpadding="0" background="/pki/images/hr.gif" width="100%">
  <tr> 
    <td>&nbsp;</td>
  </tr>
</table>
<br>


<SCRIPT LANGUAGE="JavaScript">
<!--
function doNext()
{
    var ip = (result.header.crlIssuingPoint != null && result.header.crlIssuingPoint.length > 0)?
             result.header.crlIssuingPoint: "MasterCRL";
    var dt = (result.header.crlDisplayType != null && result.header.crlDisplayType.length > 0)?
             result.header.crlDisplayType: "entireCRL";
    var loc = location.protocol + '//' + location.hostname + ':' +
              location.port + '/ca/ee/ca/getCRL?op=displayCRL&crlIssuingPoint='+ip+
              '&crlDisplayType='+dt+'&pageStart='+
              (parseInt(result.header.pageStart)+parseInt(document.displayCRLForm.pageSize.value))+
              '&pageSize='+parseInt(document.displayCRLForm.pageSize.value);
    location.href = loc;
}

function doPrevious()
{
    var ip = (result.header.crlIssuingPoint != null && result.header.crlIssuingPoint.length > 0)?
             result.header.crlIssuingPoint: "MasterCRL";
    var dt = (result.header.crlDisplayType != null && result.header.crlDisplayType.length > 0)?
             result.header.crlDisplayType: "entireCRL";
    var loc = location.protocol + '//' + location.hostname + ':' +
              location.port + '/ca/ee/ca/getCRL?op=displayCRL&crlIssuingPoint='+ip+
              '&crlDisplayType='+dt+'&pageStart='+
              (parseInt(result.header.pageStart)-parseInt(document.displayCRLForm.pageSize.value))+
              '&pageSize='+parseInt(document.displayCRLForm.pageSize.value);
    location.href = loc;
}


if (result.header.toDo != null && result.header.toDo == "displayCRL") {
    if (result.header.crlNumber != null &&
        (result.header.crlSize != null || result.header.deltaCRLSize != null) &&
        result.header.crlIssuingPoint != null) {

        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 revocation list summary</font></td></tr></table>');

        document.writeln('<table border="0" cellspacing="2" cellpadding="2" width="100%">');
        document.writeln('<tr><td align="right" width="40%">');
        document.writeln('<font size=-1 face="PrimaSans BT, Verdana, sans-serif">');
        document.writeln('CRL issuing point:</font></td>');
        document.writeln('<td align="left">');
        document.writeln('<font size=-1 face="PrimaSans BT, Verdana, sans-serif">');
        document.writeln(result.header.crlIssuingPoint+'</font></td></tr>');
        document.writeln('<tr><td align="right" width="40%">');
        document.writeln('<font size=-1 face="PrimaSans BT, Verdana, sans-serif">');
        document.writeln('CRL number:</font></td>');
        document.writeln('<td align="left">');
        document.writeln('<font size=-1 face="PrimaSans BT, Verdana, sans-serif">');
        document.writeln(result.header.crlNumber+'</font></td></tr>');
        document.writeln('<tr><td align="right" width="40%">');
        document.writeln('<font size=-1 face="PrimaSans BT, Verdana, sans-serif">');
        document.writeln('Number of CRL entries:</font></td>');
        document.writeln('<td align="left">');
        document.writeln('<font size=-1 face="PrimaSans BT, Verdana, sans-serif">');
        if (result.header.deltaCRLSize != null)
            document.writeln(result.header.deltaCRLSize+'</font></td></tr>');
        else
            document.writeln(result.header.crlSize+'</font></td></tr>');
        if (result.header.crlDescription != null) {
            document.writeln('<tr><td align="right" width="40%">');
            document.writeln('<font size=-1 face="PrimaSans BT, Verdana, sans-serif">');
            document.writeln('CRL issuing point description:</font></td>');
            document.writeln('<td align="left">');
            document.writeln('<font size=-1 face="PrimaSans BT, Verdana, sans-serif">');
            document.writeln(result.header.crlDescription+'</font></td></tr>');
        }
        document.writeln('</table><br>');
    }
    if (result.header.crlPrettyPrint != null) {
        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 revocation list contents</font></td></tr></table>');
        document.writeln('<pre>');
        document.writeln(result.header.crlPrettyPrint);
        document.writeln('</pre>');
    }
    if (result.recordSet.length > 0) {
        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 revocation list base64 encoded</font></td></tr></table>');

        document.writeln('<pre>');
        document.writeln('-----BEGIN CERTIFICATE REVOCATION LIST-----');
        for (var i = 0; i < result.recordSet.length; i++) {
            document.writeln(result.recordSet[i].crlBase64Encoded);
        }
        document.writeln('-----END CERTIFICATE REVOCATION LIST-----');
        document.writeln('</pre>');
    } else if (result.header.crlBase64 != null) {
        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 revocation list base64 encoded</font></td></tr></table>');

        document.writeln('<pre>');
        document.writeln('-----BEGIN CERTIFICATE REVOCATION LIST-----');
        document.writeln(result.header.crlBase64);
        document.writeln('-----END CERTIFICATE REVOCATION LIST-----');
        document.writeln('</pre>');
    }
    if (result.header.crlPrettyPrint == null &&
        result.header.crlBase64 == null &&
        result.recordSet.length == 0) {
        document.writeln('<font face="PrimaSans BT, Verdana, sans-serif" size="-1">');
        document.writeln('Certificate revocation list is not found.');
        if (result.header.error != null) {
            document.writeln('<br>&nbsp;&nbsp;&nbsp;&nbsp;Additional information:');
            document.writeln('<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
            document.writeln(result.header.error);
        }
        document.writeln('</font>');
    }
    if (result.header.crlSize != null &&
        result.header.pageSize != null &&
        result.header.pageStart != null &&
        (parseInt(result.header.crlSize) > parseInt(result.header.pageSize))) {

        document.writeln('<FORM NAME="displayCRLForm" ACTION="getCRL" METHOD=POST>');
        document.writeln('<table BORDER=0 CELLSPACING=0 CELLPADDING=6 WIDTH="100%">');
        document.writeln('<tr><td ALIGN=LEFT BGCOLOR="#E5E5E5">');
        document.writeln('<font face="PrimaSans BT, Verdana, sans-serif" size="-1">');
        var upperLimit = 0;
        if (parseInt(result.header.pageStart)+parseInt(result.header.pageSize)-1 >
            parseInt(result.header.crlSize)) {
            upperLimit = parseInt(result.header.crlSize);
        } else {
            upperLimit = parseInt(result.header.pageStart)+parseInt(result.header.pageSize)-1;
        }
        document.writeln(result.header.pageStart+'-'+upperLimit+
                         ' of '+result.header.crlSize+' CRL entries');
        document.writeln('</font></td>');
        document.writeln('<td ALIGN=RIGHT BGCOLOR="#E5E5E5">');
        var n = 0;
        if (parseInt(result.header.pageStart) > 1) {
            document.writeln('<INPUT TYPE="button" VALUE="Previous" width="72"'+
                             ' onClick="doPrevious();">&nbsp;');
            n++;
        }
        if (parseInt(result.header.pageStart) + parseInt(result.header.pageSize) - 1 <
            parseInt(result.header.crlSize)) {
            document.writeln('<INPUT TYPE="button" VALUE="Next" width="72"'+
                             ' onClick="doNext();">&nbsp;');
            n++;
        }
        if (n > 0) {
            document.writeln('<INPUT TYPE=text SIZE=4 MAXLENGTH=8 NAME=pageSize VALUE='+
                             result.header.pageSize+'>&nbsp;');
        }

        document.writeln('</td></tr></table>');
        document.writeln('</FORM>');
    }

} else if (result.header.toDo != null &&
           (result.header.toDo == "checkCRL" || result.header.toDo == "checkCRLcache")) {
    document.writeln('<font face="PrimaSans BT, Verdana, sans-serif" size="-1">');
    if (result.header.isOnCRL != null && result.header.isOnCRL == true &&
        result.header.certSerialNumber != null) {
        document.writeln('Certificate serial number '+
                          result.header.certSerialNumber +
                         ' is on the certificate revocation list.');
    } else if (result.header.isOnCRL != null && result.header.isOnCRL == true) {
        document.writeln('The requested certificate serial number'+
                         ' is on the certificate revocation list.');
    } else if (result.header.isOnCRL != null && result.header.isOnCRL == false &&
        result.header.certSerialNumber != null) {
        document.writeln('Certificate serial number '+
                          result.header.certSerialNumber +
                         ' is not on the certificate revocation list.');
    } else if (result.header.isOnCRL != null && result.header.isOnCRL == false) {
        document.writeln('The requested certificate serial number'+
                         ' is not on the certificate revocation list.');
    }
    document.writeln('</font>');
} else {
    document.writeln('Unknown operation.');
}
//-->
</SCRIPT>

</BODY>
</HTML>