ListCertificates.jsp
Warning: This file has been marked up for HTML
<!--
$name: ListCertificates.jsp
$version: 1.0
$date_modified: 210104
$description:
$owner: Beans for Novell Services Team
Copyright (c) 2001 Novell, Inc. All Rights Reserved.
THIS WORK IS SUBJECT TO U.S. AND INTERNATIONAL COPYRIGHT LAWS AND TREATIES.
USE AND REDISTRIBUTION OF THIS WORK IS SUBJECT TO THE LICENSE AGREEMENT
ACCOMPANYING THE SOFTWARE DEVELOPMENT KIT (SDK) THAT CONTAINS THIS WORK.
PURSUANT TO THE SDK LICENSE AGREEMENT, NOVELL HEREBY GRANTS TO DEVELOPER A
ROYALTY-FREE, NON-EXCLUSIVE LICENSE TO INCLUDE NOVELL'S SAMPLE CODE IN ITS
PRODUCT. NOVELL GRANTS DEVELOPER WORLDWIDE DISTRIBUTION RIGHTS TO MARKET,
DISTRIBUTE, OR SELL NOVELL'S SAMPLE CODE AS A COMPONENT OF DEVELOPER'S
PRODUCTS. NOVELL SHALL HAVE NO OBLIGATIONS TO DEVELOPER OR DEVELOPER'S
CUSTOMERS WITH RESPECT TO THIS CODE.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%@ page import="java.util.Enumeration" %>
<%@ page import="java.security.cert.X509Certificate" %>
<%@ page import="com.novell.ecb.security.CertAliasPair" %>
<%@ page errorPage="..error.jsp" %>
<HTML>
<HEAD>
<META http-equiv="content-type" content="text/html;charset=ISO-8859-1">
<META name="GENERATOR" content="IBM WebSphere Page Designer V3.5.1 for Windows">
<META http-equiv="Content-Style-Type" content="text/css">
<TITLE></TITLE>
<!-- main stylesheet -->
<LINK rel="stylesheet" type="text/css" href="../hf_style1.css">
</HEAD>
<BODY>
<!-- Instantiate the command bean -->
<jsp:useBean id="bean" class="com.novell.ecb.security.ListCertificates" scope="request" />
<%
// Call the execute method of the command bean
bean.execute();
int i=0;
// Query the output properties of the command bean
// Loop through certificates
for (Enumeration e = bean.getCertificates(); e.hasMoreElements(); )
{
String color = (i++%2 == 0)? "#FFFFFF" : "#EFEEE9";
CertAliasPair pair = (CertAliasPair)e.nextElement();
String alias = pair.getAlias();
X509Certificate cert = (X509Certificate)pair.getCertificate();
%>
<TABLE border="0" cellpadding="0" cellspacing="0" bgcolor="white">
<TBODY>
<TR>
<TD colspan="2" bgcolor="#CCCC99" width="400">
<DIV class="tablehead1"><%=alias%></DIV>
</TD>
</TR>
<TR bgcolor="#FFFFFF">
<TD>
<DIV class="indent1"><B>Subject DN</B></DIV>
</TD>
<TD>
<DIV class="indent1"><%=cert.getSubjectDN()%></DIV>
</TD>
</TR>
<TR bgcolor="#EFEEE9">
<TD>
<DIV class="indent1"><B>Issuer DN</B></DIV>
</TD>
<TD>
<DIV class="indent1"><%=cert.getIssuerDN()%></DIV>
</TD>
</TR>
<TR bgcolor="#FFFFFF">
<TD>
<DIV class="indent1"><B>Valid From</B></DIV>
</TD>
<TD>
<DIV class="indent1"><%=cert.getNotBefore()%></DIV>
</TD>
</TR>
<TR bgcolor="#EFEEE9">
<TD>
<DIV class="indent1"><B>Valid To</B></DIV>
</TD>
<TD>
<DIV class="indent1"><%=cert.getNotAfter()%></DIV>
</TD>
</TR>
<TR bgcolor="#FFFFFF">
<TD>
<DIV class="indent1"><B>Version</B></DIV>
</TD>
<TD>
<DIV class="indent1"><%=cert.getVersion()%></DIV>
</TD>
</TR>
<TR bgcolor="#EFEEE9">
<TD>
<DIV class="indent1"><B>Serial Number</B></DIV>
</TD>
<TD>
<DIV class="indent1"><%=cert.getSerialNumber()%></DIV>
</TD>
</TR>
<TR bgcolor="#FFFFFF">
<TD>
<DIV class="indent1"><B>Signature Algorithm</B></DIV>
</TD>
<TD>
<DIV class="indent1"><%=cert.getSigAlgName()%></DIV>
</TD>
</TR>
<TR bgcolor="#EFEEE9">
<TD>
<DIV class="indent1"><B>Public Key</B></DIV>
</TD>
<TD>
<DIV class="indent1"><%=cert.getPublicKey().getAlgorithm()%></DIV>
</TD>
</TR>
</TBODY>
</TABLE>
<BR>
<BR>
<%
}
%>
</BODY>
</HTML>