Update of /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14664/src/java/org/neuclear/commons/crypto/passphraseagents Modified Files: ConsoleAgent.java GuiDialogAgent.java InteractiveAgent.java ServletPassPhraseAgent.java Log Message: Added support for the new improved interactive signing model. A new Agent is also available with SwingAgent. The XMLSig classes have also been updated to support this. Index: GuiDialogAgent.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents/GuiDialogAgent.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** GuiDialogAgent.java 29 Mar 2004 23:48:32 -0000 1.8 --- GuiDialogAgent.java 7 Apr 2004 17:22:10 -0000 1.9 *************** *** 1,5 **** package org.neuclear.commons.crypto.passphraseagents; ! import org.neuclear.commons.crypto.signers.Signer; import java.awt.*; --- 1,6 ---- package org.neuclear.commons.crypto.passphraseagents; ! import org.neuclear.commons.crypto.signers.BrowsableSigner; ! import org.neuclear.commons.crypto.signers.SetPublicKeyCallBack; import java.awt.*; *************** *** 31,34 **** --- 32,39 ---- $Id$ $Log$ + Revision 1.9 2004/04/07 17:22:10 pelle + Added support for the new improved interactive signing model. A new Agent is also available with SwingAgent. + The XMLSig classes have also been updated to support this. + Revision 1.8 2004/03/29 23:48:32 pelle InteractiveAgent now has a new method which allows signers to ask for a passphrase without specifying alias. *************** *** 256,263 **** * a list of included aliases or even create a new keypair. * ! * @return * @throws UserCancellationException */ ! public char[] getPassPhrase(Signer signer) throws UserCancellationException { nameLabel.setVisible(false); createNew.setVisible(true); --- 261,268 ---- * a list of included aliases or even create a new keypair. * ! * @return * @throws UserCancellationException */ ! public char[] getPassPhrase(BrowsableSigner signer) throws UserCancellationException { nameLabel.setVisible(false); createNew.setVisible(true); *************** *** 266,269 **** --- 271,285 ---- } + /** + * The User is asked to pick a name by the PassPhraseAgent. The PassPhraseAgent can query the given signer for + * a list of included aliases or even create a new keypair. + * + * @return + * @throws UserCancellationException + */ + public byte[] sign(BrowsableSigner signer, byte data[], SetPublicKeyCallBack callback) throws UserCancellationException { + return new byte[0]; + } + private final TextField passphrase; private final Button ok; Index: ConsoleAgent.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents/ConsoleAgent.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ConsoleAgent.java 31 Mar 2004 23:14:03 -0000 1.4 --- ConsoleAgent.java 7 Apr 2004 17:22:09 -0000 1.5 *************** *** 2,6 **** import org.neuclear.commons.Utility; ! import org.neuclear.commons.crypto.signers.Signer; import java.io.BufferedReader; --- 2,7 ---- import org.neuclear.commons.Utility; ! import org.neuclear.commons.crypto.signers.BrowsableSigner; ! import org.neuclear.commons.crypto.signers.SetPublicKeyCallBack; import java.io.BufferedReader; *************** *** 30,33 **** --- 31,38 ---- $Id$ $Log$ + Revision 1.5 2004/04/07 17:22:09 pelle + Added support for the new improved interactive signing model. A new Agent is also available with SwingAgent. + The XMLSig classes have also been updated to support this. + Revision 1.4 2004/03/31 23:14:03 pelle misc changes *************** *** 138,141 **** --- 143,147 ---- } + /** * The User is asked to pick a name by the PassPhraseAgent. The PassPhraseAgent can query the given signer for *************** *** 145,151 **** * @throws UserCancellationException */ ! public char[] getPassPhrase(Signer signer) throws UserCancellationException { return new char[0]; } } --- 151,168 ---- * @throws UserCancellationException */ ! public char[] getPassPhrase(BrowsableSigner signer) throws UserCancellationException { return new char[0]; } + /** + * The User is asked to pick a name by the PassPhraseAgent. The PassPhraseAgent can query the given signer for + * a list of included aliases or even create a new keypair. + * + * @return + * @throws UserCancellationException + */ + public byte[] sign(BrowsableSigner signer, byte data[], SetPublicKeyCallBack callback) throws UserCancellationException { + return new byte[0]; + } + } Index: InteractiveAgent.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents/InteractiveAgent.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** InteractiveAgent.java 29 Mar 2004 23:48:32 -0000 1.4 --- InteractiveAgent.java 7 Apr 2004 17:22:10 -0000 1.5 *************** *** 1,5 **** package org.neuclear.commons.crypto.passphraseagents; ! import org.neuclear.commons.crypto.signers.Signer; /* --- 1,6 ---- package org.neuclear.commons.crypto.passphraseagents; ! import org.neuclear.commons.crypto.signers.BrowsableSigner; ! import org.neuclear.commons.crypto.signers.SetPublicKeyCallBack; /* *************** *** 23,26 **** --- 24,31 ---- $Id$ $Log$ + Revision 1.5 2004/04/07 17:22:10 pelle + Added support for the new improved interactive signing model. A new Agent is also available with SwingAgent. + The XMLSig classes have also been updated to support this. + Revision 1.4 2004/03/29 23:48:32 pelle InteractiveAgent now has a new method which allows signers to ask for a passphrase without specifying alias. *************** *** 65,69 **** * @throws UserCancellationException */ ! char[] getPassPhrase(final Signer signer) throws UserCancellationException; --- 70,74 ---- * @throws UserCancellationException */ ! byte[] sign(final BrowsableSigner signer, byte data[], SetPublicKeyCallBack callback) throws UserCancellationException; Index: ServletPassPhraseAgent.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents/ServletPassPhraseAgent.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ServletPassPhraseAgent.java 31 Mar 2004 23:14:03 -0000 1.5 --- ServletPassPhraseAgent.java 7 Apr 2004 17:22:10 -0000 1.6 *************** *** 1,5 **** package org.neuclear.commons.crypto.passphraseagents; ! import org.neuclear.commons.crypto.signers.Signer; import javax.servlet.http.HttpServletRequest; --- 1,6 ---- package org.neuclear.commons.crypto.passphraseagents; ! import org.neuclear.commons.crypto.signers.BrowsableSigner; ! import org.neuclear.commons.crypto.signers.SetPublicKeyCallBack; import javax.servlet.http.HttpServletRequest; *************** *** 60,65 **** * @throws UserCancellationException */ ! public char[] getPassPhrase(Signer signer) throws UserCancellationException { return new char[0]; } } --- 61,77 ---- * @throws UserCancellationException */ ! public char[] getPassPhrase(BrowsableSigner signer) throws UserCancellationException { return new char[0]; } + + /** + * The User is asked to pick a name by the PassPhraseAgent. The PassPhraseAgent can query the given signer for + * a list of included aliases or even create a new keypair. + * + * @return + * @throws UserCancellationException + */ + public byte[] sign(BrowsableSigner signer, byte data[], SetPublicKeyCallBack callback) throws UserCancellationException { + return new byte[0]; + } } |