.getAttribute("t.X509Certificate"); /* ibm http server us followings */ // X509Certificate[] certs = (X509Certificate[]) request // .getAttribute("_certificates");
if (certs != null) { if ( > 0) { X509Certificate t = certs[0]; pk = licKey(); }} else { if ("https".equals(eme())) { n("This was an HTTPS request, " + "but no client certificate is available"); } else { n("This was not an HTTPS request, " + "so no client certificate is available"); }}}return pk;} catch (Exception e) { throw new ServletException(e);} }
交易密码:
SecurityReceiveServlet代码
public class SecurityReceive extends HttpServlet { private static final long serialVersionUID = 1L;
/** * @see HttpServlet#HttpServlet() */
public SecurityReceive() { super(); // TODO Auto-generated constructor stub }
// tentType("text/plain"); // FileInputStream fis = new FileInputStream("d:// "); PrintWriter out = ter(); if (cipherSuite != null) { X509Certificate[] certs = (X509Certificate[]) request .getAttribute("t.X509Certificate"); /* ibm http server us followings */ // X509Certificate[] certs = (X509Certificate[]) request // .getAttribute("_certificates");
if (certs != null) { if ( > 0) { X509Certificate t = certs[0]; pk = licKey(); } } else { if ("https".equals(eme())) { n("This was an HTTPS request, " + "but no client certificate is
available"); } else { n("This was not an HTTPS request, " + "so no client certificate is
/** Initializes the applet AuthClient */ @Override public void init() { /* Set the Nimbus look and feel */ // /* * If Nimbus (introduced in Java SE 6) is not available, stay with the
* default look and feel. For details see * /tutorial/uiswing/lookandfeel/ */ try { for (dFeelInfo info : ger .getInstalledLookAndFeels()) { if ("Nimbus".equals(e())) { ger. setLookAndFeel(ssName()); break; } } } catch (ClassNotFoundException ex) { ger(e()).log( , null, ex); } catch (InstantiationException ex) { ger(e()).log( , null, ex); } catch (IllegalAccessException ex) { ger(e()).log( , null, ex); } catch (ortedLookAndFeelException ex) { ger(e()).log( , null, ex); } //
/* Create and display the applet */ try { AndWait(new Runnable() {
public void run() { initComponents();
} }); } catch (Exception ex) { tackTrace(); } }
/** * This method is called from within the init() method to initialize the * form. WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // private void initComponents() {
inputPassword = new ordField();
getContentPane().setLayout( new out(getContentPane(), _AXIS));
发布评论