|
From: <pe...@us...> - 2003-10-29 21:16:30
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders
In directory sc8-pr-cvs1:/tmp/cvs-serv29589/src/java/org/neuclear/id/builders
Modified Files:
IdentityBuilder.java
Log Message:
Refactored the whole signing process. Now we have an interface called Signer which is the old SignerStore.
To use it you pass a byte array and an alias. The sign method then returns the signature.
If a Signer needs a passphrase it uses a PassPhraseAgent to present a dialogue box, read it from a command line etc.
This new Signer pattern allows us to use secure signing hardware such as N-Cipher in the future for server applications as well
as SmartCards for end user applications.
Index: IdentityBuilder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders/IdentityBuilder.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** IdentityBuilder.java 21 Oct 2003 22:31:12 -0000 1.4
--- IdentityBuilder.java 29 Oct 2003 21:16:27 -0000 1.5
***************
*** 2,5 ****
--- 2,12 ----
* $Id$
* $Log$
+ * Revision 1.5 2003/10/29 21:16:27 pelle
+ * Refactored the whole signing process. Now we have an interface called Signer which is the old SignerStore.
+ * To use it you pass a byte array and an alias. The sign method then returns the signature.
+ * If a Signer needs a passphrase it uses a PassPhraseAgent to present a dialogue box, read it from a command line etc.
+ * This new Signer pattern allows us to use secure signing hardware such as N-Cipher in the future for server applications as well
+ * as SmartCards for end user applications.
+ *
* Revision 1.4 2003/10/21 22:31:12 pelle
* Renamed NeudistException to NeuClearException and moved it to org.neuclear.commons where it makes more sense.
***************
*** 28,32 ****
*
* Revision 1.10 2003/02/18 00:06:15 pelle
! * Moved the SignerStore's into xml-sig
*
* Revision 1.9 2003/02/16 00:22:59 pelle
--- 35,39 ----
*
* Revision 1.10 2003/02/18 00:06:15 pelle
! * Moved the Signer's into xml-sig
*
* Revision 1.9 2003/02/16 00:22:59 pelle
***************
*** 151,161 ****
import org.neuclear.id.Identity;
import org.neuclear.id.NSTools;
- import org.neuclear.commons.NeuClearException;
import org.neudist.utils.Utility;
import org.neudist.xml.xmlsec.XMLSecTools;
import org.neudist.xml.xmlsec.XMLSecurityException;
- import org.neudist.xml.XMLException;
- import java.security.PrivateKey;
import java.security.PublicKey;
--- 158,166 ----
import org.neuclear.id.Identity;
import org.neuclear.id.NSTools;
import org.neudist.utils.Utility;
+ import org.neudist.xml.XMLException;
import org.neudist.xml.xmlsec.XMLSecTools;
import org.neudist.xml.xmlsec.XMLSecurityException;
import java.security.PublicKey;
***************
*** 166,176 ****
* This constructor should be used by subclasses of NameSpace. It creates a Standard NameSpace document, but doesn't sign it.
* The signing should be done as the last step of the constructor of the subclass.
! * @param name The Name of NameSpace
! * @param allow PublicKey allowed to sign in here
* @param repository URL of Default Store for NameSpace. (Note. A NameSpace object is stored in the default repository of it's parent namespace)
! * @param signer URL of default interactive signing service for namespace. If null it doesnt allow interactive signing
! * @param receiver URL of default receiver for namespace
*/
! public IdentityBuilder(String name, PublicKey allow, String repository, String signer, String logger, String receiver) {
super(name, "Identity");
--- 171,182 ----
* This constructor should be used by subclasses of NameSpace. It creates a Standard NameSpace document, but doesn't sign it.
* The signing should be done as the last step of the constructor of the subclass.
! *
! * @param name The Name of NameSpace
! * @param allow PublicKey allowed to sign in here
* @param repository URL of Default Store for NameSpace. (Note. A NameSpace object is stored in the default repository of it's parent namespace)
! * @param signer URL of default interactive signing service for namespace. If null it doesnt allow interactive signing
! * @param receiver URL of default receiver for namespace
*/
! public IdentityBuilder(String name, PublicKey allow, String repository, String signer, String logger, String receiver) {
super(name, "Identity");
***************
*** 200,207 ****
}
- public IdentityBuilder(String name, PrivateKey signer, PublicKey allow) throws XMLSecurityException {
- this(name, allow);
- sign(signer);
- }
public String getTagName() {
--- 206,209 ----
|