|
From: <pe...@us...> - 2004-03-03 23:39:42
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/tools/commandline In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19593/src/java/org/neuclear/id/tools/commandline Modified Files: CommandLineSigner.java IdentityCreator.java Log Message: Updated various tests to use the AbstractObjectCreationTest Index: CommandLineSigner.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/tools/commandline/CommandLineSigner.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** CommandLineSigner.java 19 Feb 2004 19:38:13 -0000 1.11 --- CommandLineSigner.java 3 Mar 2004 23:26:43 -0000 1.12 *************** *** 1,4 **** --- 1,7 ---- /* $Id$ * $Log$ + * Revision 1.12 2004/03/03 23:26:43 pelle + * Updated various tests to use the AbstractObjectCreationTest + * * Revision 1.11 2004/02/19 19:38:13 pelle * At times IntelliJ IDEA can cause some real hassle. On my last checkin it optimized away all of the dom4j and command line imports. *************** *** 182,186 **** * * Revision 1.4 2002/10/10 21:29:25 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 --- 185,189 ---- * * Revision 1.4 2002/10/10 21:29:25 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 *************** *** 222,225 **** --- 225,229 ---- package org.neuclear.id.tools.commandline; + import org.apache.commons.cli.*; import org.dom4j.Document; import org.neuclear.commons.LowLevelException; *************** *** 241,245 **** import org.neuclear.xml.XMLException; import org.neuclear.xml.XMLTools; - import org.apache.commons.cli.*; import java.io.*; --- 245,248 ---- *************** *** 363,368 **** dest = new FileOutputStream(of); System.out.println("Outputting to: " + of); } - XMLTools.writeFile(dest, subject.getElement()); System.out.println(); System.out.println("You now need to copy the file: " + of + " to your webserver so it is visible at a given location"); --- 366,371 ---- dest = new FileOutputStream(of); System.out.println("Outputting to: " + of); + XMLTools.writeFile(outFile, subject.getElement().getDocument()); } System.out.println(); System.out.println("You now need to copy the file: " + of + " to your webserver so it is visible at a given location"); Index: IdentityCreator.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/tools/commandline/IdentityCreator.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** IdentityCreator.java 2 Mar 2004 18:59:11 -0000 1.9 --- IdentityCreator.java 3 Mar 2004 23:26:43 -0000 1.10 *************** *** 1,4 **** --- 1,7 ---- /* $Id$ * $Log$ + * Revision 1.10 2004/03/03 23:26:43 pelle + * Updated various tests to use the AbstractObjectCreationTest + * * Revision 1.9 2004/03/02 18:59:11 pelle * Further cleanups in neuclear-id. Moved everything under id. *************** *** 178,182 **** * * Revision 1.4 2002/10/10 21:29:25 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 --- 181,185 ---- * * Revision 1.4 2002/10/10 21:29:25 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 *************** *** 261,265 **** final String defaultlogger = Utility.denullString(cmd.getOptionValue("l"), LogSender.LOGGER); final String defaultreceiver = cmd.getOptionValue("b"); ! if (!sig.canSignFor(alias)){ System.out.println("You do not currently have a key matching this name. Do you with to create one?"); if (!Utility.getAffirmative(true)) { --- 264,268 ---- final String defaultlogger = Utility.denullString(cmd.getOptionValue("l"), LogSender.LOGGER); final String defaultreceiver = cmd.getOptionValue("b"); ! if (!sig.canSignFor(alias)) { System.out.println("You do not currently have a key matching this name. Do you with to create one?"); if (!Utility.getAffirmative(true)) { *************** *** 267,272 **** System.exit(0); } ! System.out.println("Generating Keys for "+alias+"... "); ! PublicKey pub=sig.generateKey(alias); System.out.println("DONE"); System.out.println("STORING Keys"); --- 270,275 ---- System.exit(0); } ! System.out.println("Generating Keys for " + alias + "... "); ! PublicKey pub = sig.generateKey(alias); System.out.println("DONE"); System.out.println("STORING Keys"); *************** *** 276,282 **** final PublicKey newkid = pksource.getPublicKey(alias); ! return new IdentityBuilder(newkid, defaultsigner, defaultlogger, defaultreceiver); } catch (InvalidNamedObjectException e) { ! System.err.println("The name: "+e.getName()+" is not valid. "); System.exit(1); } catch (NonExistingSignerException e) { --- 279,285 ---- final PublicKey newkid = pksource.getPublicKey(alias); ! return new IdentityBuilder(newkid, defaultsigner, defaultlogger, defaultreceiver); } catch (InvalidNamedObjectException e) { ! System.err.println("The name: " + e.getName() + " is not valid. "); System.exit(1); } catch (NonExistingSignerException e) { *************** *** 290,294 **** final IdentityCreator signer = new IdentityCreator(args); signer.execute(); ! } catch (UserCancellationException e){ System.out.println("Bye"); } catch (Exception e) { --- 293,297 ---- final IdentityCreator signer = new IdentityCreator(args); signer.execute(); ! } catch (UserCancellationException e) { System.out.println("Bye"); } catch (Exception e) { |