|
From: <pe...@us...> - 2004-03-03 23:39:43
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/signers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19593/src/java/org/neuclear/id/signers Modified Files: SigningServlet.java Log Message: Updated various tests to use the AbstractObjectCreationTest Index: SigningServlet.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/signers/SigningServlet.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SigningServlet.java 2 Mar 2004 18:59:10 -0000 1.1 --- SigningServlet.java 3 Mar 2004 23:26:43 -0000 1.2 *************** *** 2,5 **** --- 2,8 ---- * $Id$ * $Log$ + * Revision 1.2 2004/03/03 23:26:43 pelle + * Updated various tests to use the AbstractObjectCreationTest + * * Revision 1.1 2004/03/02 18:59:10 pelle * Further cleanups in neuclear-id. Moved everything under id. *************** *** 202,206 **** * * Revision 1.10 2002/10/10 21:29:31 pelle ! * Oops. XML-Signature's SignedInfo element I had coded as SignatureInfo * As I thought Canonicalisation doesnt seem to be standard. * Updated the SignedServlet to default to using ~/.neuclear/signers.ks --- 205,209 ---- * * Revision 1.10 2002/10/10 21:29:31 pelle ! * Oops. XML-Signature's SignedInfo element I had coded as SignedInfo * As I thought Canonicalisation doesnt seem to be standard. * Updated the SignedServlet to default to using ~/.neuclear/signers.ks *************** *** 296,300 **** context.log("NEUCLEAR: Initialising SigningServlet"); try { ! title = ServletTools.getInitParam("title",config); signer = createSigner(config); } catch (GeneralSecurityException e) { --- 299,303 ---- context.log("NEUCLEAR: Initialising SigningServlet"); try { ! title = ServletTools.getInitParam("title", config); signer = createSigner(config); } catch (GeneralSecurityException e) { *************** *** 336,340 **** boolean isSigned = false; if (!signer.canSignFor(username)) { ! out.println("<h3>Can not Sign for:"); out.println(username); out.println("</h3>"); --- 339,343 ---- boolean isSigned = false; if (!signer.canSignFor(username)) { ! out.println("<h3>Can not Sign for:"); out.println(username); out.println("</h3>"); *************** *** 355,359 **** } out.println("</td></tr><tr><td style=\"background:lightgrey;color:black\"><tt>"); ! Matcher matcher=xmlescape.matcher(named.asXML()); out.println(matcher.replaceAll("<")); --- 358,362 ---- } out.println("</td></tr><tr><td style=\"background:lightgrey;color:black\"><tt>"); ! Matcher matcher = xmlescape.matcher(named.asXML()); out.println(matcher.replaceAll("<")); *************** *** 364,368 **** out.flush(); try { ! isSigned = sign(named,username, out); } catch (InvalidNamedObjectException e) { --- 367,371 ---- out.flush(); try { ! isSigned = sign(named, username, out); } catch (InvalidNamedObjectException e) { *************** *** 406,413 **** } ! private boolean sign(final Builder named, String username,final PrintWriter out) throws NeuClearException, XMLException { boolean isSigned; context.log("SIGN: Signing with " + username); ! final SignedNamedObject signed = named.convert(username,signer); isSigned = true; out.println("<li>Signed</li>"); --- 409,416 ---- } ! private boolean sign(final Builder named, String username, final PrintWriter out) throws NeuClearException, XMLException { boolean isSigned; context.log("SIGN: Signing with " + username); ! final SignedNamedObject signed = named.convert(username, signer); isSigned = true; out.println("<li>Signed</li>"); *************** *** 429,432 **** --- 432,436 ---- * Return True when ready to sign. * Multirequest signers, need to verify that the correct request parameters are available. + * * @param request * @return *************** *** 441,448 **** - protected javax.servlet.ServletContext context; private Signer signer; private String title; ! static private Pattern xmlescape=Pattern.compile("(\\<)"); } --- 445,451 ---- protected javax.servlet.ServletContext context; private Signer signer; private String title; ! static private Pattern xmlescape = Pattern.compile("(\\<)"); } |