001    package jsp;
002    
003    import javax.servlet.*;
004    import javax.servlet.http.*;
005    import javax.servlet.jsp.*;
006    import java.security.cert.Certificate;
007    import java.security.cert.X509Certificate;
008    import org.apache.geronimo.ca.helper.util.CAHelperUtils;
009    
010    public final class verifyCertificate_jsp extends org.apache.jasper.runtime.HttpJspBase
011        implements org.apache.jasper.runtime.JspSourceDependent {
012    
013      private static java.util.List _jspx_dependants;
014    
015      public Object getDependants() {
016        return _jspx_dependants;
017      }
018    
019      public void _jspService(HttpServletRequest request, HttpServletResponse response)
020            throws java.io.IOException, ServletException {
021    
022        JspFactory _jspxFactory = null;
023        PageContext pageContext = null;
024        HttpSession session = null;
025        ServletContext application = null;
026        ServletConfig config = null;
027        JspWriter out = null;
028        Object page = this;
029        JspWriter _jspx_out = null;
030        PageContext _jspx_page_context = null;
031    
032    
033        try {
034          _jspxFactory = JspFactory.getDefaultFactory();
035          response.setContentType("text/html; charset=ISO-8859-1");
036          pageContext = _jspxFactory.getPageContext(this, request, response,
037                            null, true, 8192, true);
038          _jspx_page_context = pageContext;
039          application = pageContext.getServletContext();
040          config = pageContext.getServletConfig();
041          session = pageContext.getSession();
042          out = pageContext.getOut();
043          _jspx_out = out;
044    
045          out.write("\n\n\n\n\n\n");
046    
047        X509Certificate cert = (X509Certificate)((Certificate[]) request.getAttribute("javax.servlet.request.X509Certificate"))[0];
048        request.setAttribute("cert", cert);
049        CAHelperUtils.removeRequest(request.getParameter("csrId"), cert.getSerialNumber());
050    
051          out.write("\n\n<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">\n<title>Verify Certificate Download</title>\n</head>\n<body>\n<h2>Verify Certificate Download</h2>\n<p>If you are seeing this page, it means you have successfully downloaded and installed your certificate into your\nweb browser. The details of the certificate you used to authenticate with the web server are given below.</p>\n\n    <table border=\"0\">\n        <tr>\n            <th colspan=\"2\" align=\"left\">Certificate Details</th>\n        </tr>\n        <tr>\n            <th align=\"right\">Version:</th>\n            <td>");
052          out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${cert.version}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
053          out.write("</td>\n        </tr>\n        <tr>\n            <th align=\"right\">Subject:</th>\n            <td>");
054          out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${cert.subjectDN.name}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
055          out.write("</td>\n        </tr>\n        <tr>\n            <th align=\"right\">Issuer:</th>\n            <td>");
056          out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${cert.issuerDN.name}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
057          out.write("</td>\n        </tr>\n        <tr>\n            <th align=\"right\">Serial Number:</th>\n            <td>");
058          out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${cert.serialNumber}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
059          out.write("</td>\n        </tr>\n        <tr>\n            <th align=\"right\">Valid From:</th>\n            <td>");
060          out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${cert.notBefore}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
061          out.write("</td>\n        </tr>\n        <tr>\n            <th align=\"right\">Valid To:</th>\n            <td>");
062          out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${cert.notAfter}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
063          out.write("</td>\n        </tr>\n        <tr>\n            <th align=\"right\">Signature Alg:</th>\n            <td>");
064          out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${cert.sigAlgName}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
065          out.write("</td>\n        </tr>\n        <tr>\n            <th align=\"right\">Public Key Alg:</th>\n            <td>");
066          out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${cert.publicKey.algorithm}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
067          out.write("</td>\n        </tr>\n        <tr>\n            <th align=\"right\" valign=\"top\">cert.toString()</th>\n            <td><pre>");
068          out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${cert}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
069          out.write("</pre></td>\n        </tr>\n    </table>\n<a href=\"");
070          out.print(request.getContextPath());
071          out.write("\">Back to CA Helper home</a>\n</body>\n</html>\n");
072        } catch (Throwable t) {
073          if (!(t instanceof SkipPageException)){
074            out = _jspx_out;
075            if (out != null && out.getBufferSize() != 0)
076              out.clearBuffer();
077            if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
078          }
079        } finally {
080          if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
081        }
082      }
083    }