|
From: <pe...@us...> - 2003-10-31 23:58:56
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/signers/commandline
In directory sc8-pr-cvs1:/tmp/cvs-serv502/src/java/org/neuclear/signers/commandline
Modified Files:
CommandLineSigner.java IdentityCreator.java
Log Message:
The IdentityCreator now fully works with the new Signer architecture.
Index: CommandLineSigner.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/signers/commandline/CommandLineSigner.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** CommandLineSigner.java 29 Oct 2003 21:16:27 -0000 1.10
--- CommandLineSigner.java 31 Oct 2003 23:58:53 -0000 1.11
***************
*** 1,4 ****
--- 1,7 ----
/* $Id$
* $Log$
+ * Revision 1.11 2003/10/31 23:58:53 pelle
+ * The IdentityCreator now fully works with the new Signer architecture.
+ *
* Revision 1.10 2003/10/29 21:16:27 pelle
* Refactored the whole signing process. Now we have an interface called Signer which is the old SignerStore.
***************
*** 213,219 ****
if (!Utility.isEmpty(alias)) {
! String password = Utility.denullString(cmd.getOptionValue("p"), cmd.getOptionValue("j")); // If we dont specify a password it defaults to ks password
!
! if (sig.canSignFor(alias)) {
System.err.println("Key with alias: " + alias + " doesnt exist");
System.exit(1);
--- 216,220 ----
if (!Utility.isEmpty(alias)) {
! if (!sig.canSignFor(alias)) {
System.err.println("Key with alias: " + alias + " doesnt exist");
System.exit(1);
Index: IdentityCreator.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/signers/commandline/IdentityCreator.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** IdentityCreator.java 29 Oct 2003 21:16:27 -0000 1.2
--- IdentityCreator.java 31 Oct 2003 23:58:53 -0000 1.3
***************
*** 1,4 ****
--- 1,7 ----
/* $Id$
* $Log$
+ * Revision 1.3 2003/10/31 23:58:53 pelle
+ * The IdentityCreator now fully works with the new Signer architecture.
+ *
* Revision 1.2 2003/10/29 21:16:27 pelle
* Refactored the whole signing process. Now we have an interface called Signer which is the old SignerStore.
***************
*** 143,147 ****
import org.apache.commons.cli.Options;
! import org.neuclear.commons.configuration.Configuration;
import org.neuclear.id.NSTools;
import org.neuclear.id.builders.IdentityBuilder;
--- 146,150 ----
import org.apache.commons.cli.Options;
! import org.neuclear.commons.NeuClearException;
import org.neuclear.id.NSTools;
import org.neuclear.id.builders.IdentityBuilder;
***************
*** 162,169 ****
public IdentityCreator(String args[]) throws Exception {
super(args);
identity = cmd.getOptionValue("n");
of = Utility.denullString(of, "." + NSTools.url2path(identity) + "/root.id");
alias = Utility.denullString(alias, NSTools.getParentNSURI(identity));
! pksource = (PublicKeySource) Configuration.getComponent(PublicKeySource.class, "neuclear-id");
}
--- 165,175 ----
public IdentityCreator(String args[]) throws Exception {
super(args);
+ if (!(sig instanceof PublicKeySource))
+ throw new NeuClearException("The default signer has to include public keys");
+ pksource = (PublicKeySource) sig;
identity = cmd.getOptionValue("n");
of = Utility.denullString(of, "." + NSTools.url2path(identity) + "/root.id");
alias = Utility.denullString(alias, NSTools.getParentNSURI(identity));
!
}
***************
*** 189,192 ****
--- 195,199 ----
e.printStackTrace();
}
+ System.exit(0);
}
|