001    package jsp;
002    
003    import javax.servlet.*;
004    import javax.servlet.http.*;
005    import javax.servlet.jsp.*;
006    
007    public final class confirmRequest_jsp extends org.apache.jasper.runtime.HttpJspBase
008        implements org.apache.jasper.runtime.JspSourceDependent {
009    
010      private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory();
011    
012      private static java.util.List _jspx_dependants;
013    
014      private javax.el.ExpressionFactory _el_expressionfactory;
015      private org.apache.InstanceManager _jsp_instancemanager;
016    
017      public Object getDependants() {
018        return _jspx_dependants;
019      }
020    
021      public void _jspInit() {
022        _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
023        _jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
024      }
025    
026      public void _jspDestroy() {
027      }
028    
029      public void _jspService(HttpServletRequest request, HttpServletResponse response)
030            throws java.io.IOException, ServletException {
031    
032        PageContext pageContext = null;
033        HttpSession session = null;
034        ServletContext application = null;
035        ServletConfig config = null;
036        JspWriter out = null;
037        Object page = this;
038        JspWriter _jspx_out = null;
039        PageContext _jspx_page_context = null;
040    
041    
042        try {
043          response.setContentType("text/html; charset=ISO-8859-1");
044          pageContext = _jspxFactory.getPageContext(this, request, response,
045                            null, true, 8192, true);
046          _jspx_page_context = pageContext;
047          application = pageContext.getServletContext();
048          config = pageContext.getServletConfig();
049          session = pageContext.getSession();
050          out = pageContext.getOut();
051          _jspx_out = out;
052    
053          out.write("<!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>Request Certificate - Confirm Request</title>\n</head>\n");
054    
055        String reqCN = request.getParameter("reqCN");
056        String reqOU = request.getParameter("reqOU");
057        String reqO = request.getParameter("reqO");
058        String reqL = request.getParameter("reqL");
059        String reqST = request.getParameter("reqST");
060        String reqC = request.getParameter("reqC");
061        String challenge = request.getParameter("challenge");
062    
063          out.write("<body>\n<h2>Request Certificate: Confirm and Submit Request</h2>\n<div id=\"Non-IE-Content\" style=\"display:none\">\n<p>This is step 2 of 2 in requesting your certificate.  Please review your name details and select the keysize for\nyour keypair.  Upon clicking the <i>Submit Certificate Request</i> button, your certificate request will be generated\nand sent to the CA for further processing.</p>\n\n<form action=\"CertificateRequestServlet\" method=\"post\">\n    <table border=\"0\">\n        <tr>\n            <th align=\"right\">Common Name (CN):</th>\n            <td>\n                <input type=\"hidden\" name=\"reqCN\" value=\"");
064          out.print(reqCN);
065          out.write("\"/> ");
066          out.print(reqCN);
067          out.write("</td>\n        </tr>\n        <tr>\n            <th align=\"right\">Division/Business Unit (OU):</th>\n            <td>\n                <input type=\"hidden\" name=\"reqOU\" value=\"");
068          out.print(reqOU);
069          out.write("\"/> ");
070          out.print(reqOU);
071          out.write("</td>\n        </tr>\n        <tr>\n            <th align=\"right\">Company/Organization (O):</th>\n            <td>\n                <input type=\"hidden\" name=\"reqO\" value=\"");
072          out.print(reqO);
073          out.write("\"/> ");
074          out.print(reqO);
075          out.write("</td>\n        </tr>\n        <tr>\n            <th align=\"right\">City/Locality (L):</th>\n            <td>\n                <input type=\"hidden\" name=\"reqL\" value=\"");
076          out.print(reqL);
077          out.write("\"/> ");
078          out.print(reqL);
079          out.write("</td>\n        </tr>\n        <tr>\n            <th align=\"right\">State/Province (ST):</th>\n            <td>\n                <input type=\"hidden\" name=\"reqST\" value=\"");
080          out.print(reqST);
081          out.write("\"/> ");
082          out.print(reqST);
083          out.write("</td>\n        </tr>\n        <tr>\n            <th align=\"right\">Country Code (2 char) (C):</th>\n            <td>\n                <input type=\"hidden\" name=\"reqC\" value=\"");
084          out.print(reqC);
085          out.write("\"/> ");
086          out.print(reqC);
087          out.write("</td>\n        </tr>\n        <tr>\n            <th align=\"right\">Challenge Phrase:</th>\n            <td>\n                ********\n            </td>\n        </tr>\n        <tr>\n            <th align=\"right\">Key Size:</th>\n            <td>\n                <keygen name=\"spkac\" challenge=\"");
088          out.print(challenge);
089          out.write("\"/>\n            </td>\n        </tr>\n    </table>\n    <input type=\"submit\" value=\"Submit Certificate Request\"/>\n    <input type=\"reset\" name=\"reset\" value=\"Reset\"/>\n</form>\n");
090          out.write("</div>\n\n<div id=\"IE-Content\" style=\"display:none\">\n<p> This is step 2 of 2 in requesting your certificate.  Please review your name details.\n    Upon clicking the <i>Submit Certificate Request</i> button, your certificate request will be generated\n    and sent to the CA for further processing.</p>\n\n");
091          out.write("<object classid=\"clsid:127698e4-e730-4e5c-a2b1-21490a70c8a1\"\n    codebase=\"xenroll.dll\"\n    id=\"newCertHelper\">\n</object>\n\n");
092          out.write("<SCRIPT language=\"VBScript\">\n<!--\nSub GenerateReq\n    ' Distinguished name variable.\n    Dim strDN\n\n    ' Request Variable.\n    Dim strReq\n\n    ' Request Disposition.\n    Dim nDisp\n\n    ' Enable error handling.\n    On Error Resume Next\n\n    ' Constants For CertRequest object.\n    const CR_IN_BASE64 = &H1\n    const CR_IN_PKCS10 = &H100\n\n    ' Build the DN.\n    strDN =  \"CN=\"&document.Confirmform.reqCN.value _\n         &\",OU=\"&document.Confirmform.reqOU.value _\n         &\",O=\"&document.Confirmform.reqO.value _\n         &\",L=\"&document.Confirmform.reqL.value _\n         &\",ST=\"&document.Confirmform.reqST.value _\n         &\",C=\"&document.Confirmform.reqC.value _\n         '&\",CC=ask\"  \n    ' Attempt to use the control, in this case, to create a PKCS #10.\n    strReq = newCertHelper.CreatePKCS10(strDN, \" \")\n    ' If above line failed, Err.Number will not be 0.\n    if ( Err.Number <> 0 ) then\n        MsgBox(\"Error in call to createPKCS10 \" & Err.Number)\n        err.clear\n        return\n    else\n        document.Confirmform.pkcs10req.value = strReq\n");
093          out.write("    end if\n    document.Confirmform.submit()\nEnd Sub\n-->\n</SCRIPT>\n\n<form name=\"Confirmform\" action=\"CertificateRequestServlet\" method=\"post\">\n    <table border=\"0\">\n        <tr>\n            <th align=\"right\">Common Name (CN):</th>\n            <td>\n                <input type=\"hidden\" name=\"reqCN\" value=\"");
094          out.print(reqCN);
095          out.write("\"/> ");
096          out.print(reqCN);
097          out.write("</td>\n        </tr>\n        <tr>\n            <th align=\"right\">Division/Business Unit (OU):</th>\n            <td>\n                <input type=\"hidden\" name=\"reqOU\" value=\"");
098          out.print(reqOU);
099          out.write("\"/> ");
100          out.print(reqOU);
101          out.write("</td>\n        </tr>\n        <tr>\n            <th align=\"right\">Company/Organization (O):</th>\n            <td>\n                <input type=\"hidden\" name=\"reqO\" value=\"");
102          out.print(reqO);
103          out.write("\"/> ");
104          out.print(reqO);
105          out.write("</td>\n        </tr>\n        <tr>\n            <th align=\"right\">City/Locality (L):</th>\n            <td>\n                <input type=\"hidden\" name=\"reqL\" value=\"");
106          out.print(reqL);
107          out.write("\"/> ");
108          out.print(reqL);
109          out.write("</td>\n        </tr>\n        <tr>\n            <th align=\"right\">State/Province (ST):</th>\n            <td>\n                <input type=\"hidden\" name=\"reqST\" value=\"");
110          out.print(reqST);
111          out.write("\"/> ");
112          out.print(reqST);
113          out.write("</td>\n        </tr>\n        <tr>\n            <th align=\"right\">Country Code (2 char) (C):</th>\n            <td>\n                <input type=\"hidden\" name=\"reqC\" value=\"");
114          out.print(reqC);
115          out.write("\"/> ");
116          out.print(reqC);
117          out.write("<input type=\"hidden\" name=\"pkcs10req\"> ");
118          out.write("</td>\n        </tr>\n        <tr>\n            <th align=\"right\">Challenge Phrase:</th>\n            <td>\n                Not Supported for IE\n            </td>\n        </tr>\n    </table>\n    <input type=\"button\" value=\"Submit Certificate Request\" onClick=\"GenerateReq()\"/>\n</form>\n");
119          out.write("</div>\n\n<!-- The following is used to detect if the browser supports KEYGEN tag and disply only the relevant form -->\n<div style=\"display:none\"><form name='keygentest' method=\"POST\"><keygen name=\"test\"/></form></div>\n<SCRIPT language=\"JavaScript\">\nif(document.keygentest.elements.length == 0)\n   document.getElementById('IE-Content').style.display = 'block'\nelse\n   document.getElementById('Non-IE-Content').style.display = 'block'\n</SCRIPT>\n\n<a href=\"");
120          out.print(request.getContextPath());
121          out.write("\">Cancel</a>\n</body>\n</html>\n");
122        } catch (Throwable t) {
123          if (!(t instanceof SkipPageException)){
124            out = _jspx_out;
125            if (out != null && out.getBufferSize() != 0)
126              try { out.clearBuffer(); } catch (java.io.IOException e) {}
127            if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
128          }
129        } finally {
130          _jspxFactory.releasePageContext(_jspx_page_context);
131        }
132      }
133    }