|
From: <pe...@us...> - 2003-09-24 23:56:57
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/signers/servlet
In directory sc8-pr-cvs1:/tmp/cvs-serv524/src/java/org/neuclear/signers/servlet
Modified Files:
DemoSigningServlet.java SigningServlet.java
Log Message:
Refactoring nearly done. New model for creating signed objects.
With view for supporting the xmlpull api shortly for performance reasons.
Currently still uses dom4j but that has been refactored out that it
should now be very quick to implement a xmlpull implementation.
A side benefit of this is that the API has been further simplified. I still have some work
todo with regards to cleaning up some of the outlying parts of the code.
Index: DemoSigningServlet.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/signers/servlet/DemoSigningServlet.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** DemoSigningServlet.java 23 Sep 2003 19:16:29 -0000 1.3
--- DemoSigningServlet.java 24 Sep 2003 23:56:48 -0000 1.4
***************
*** 2,5 ****
--- 2,14 ----
* $Id$
* $Log$
+ * Revision 1.4 2003/09/24 23:56:48 pelle
+ * Refactoring nearly done. New model for creating signed objects.
+ * With view for supporting the xmlpull api shortly for performance reasons.
+ * Currently still uses dom4j but that has been refactored out that it
+ * should now be very quick to implement a xmlpull implementation.
+ *
+ * A side benefit of this is that the API has been further simplified. I still have some work
+ * todo with regards to cleaning up some of the outlying parts of the code.
+ *
* Revision 1.3 2003/09/23 19:16:29 pelle
* Changed NameSpace to Identity.
***************
*** 32,36 ****
* Revision 1.5 2003/02/14 21:10:36 pelle
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
! * The NamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
--- 41,45 ----
* Revision 1.5 2003/02/14 21:10:36 pelle
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
! * The SignedNamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
***************
*** 83,87 ****
* Added various new schemas and updated most of the existing ones.
* Added explanation interface for explaining the purpose of a
! * NamedObject to a user. We may want to use XSL instead.
* Also made the signing webapp look a bit nicer.
*
--- 92,96 ----
* Added various new schemas and updated most of the existing ones.
* Added explanation interface for explaining the purpose of a
! * SignedNamedObject to a user. We may want to use XSL instead.
* Also made the signing webapp look a bit nicer.
*
Index: SigningServlet.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/signers/servlet/SigningServlet.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** SigningServlet.java 23 Sep 2003 19:16:29 -0000 1.3
--- SigningServlet.java 24 Sep 2003 23:56:49 -0000 1.4
***************
*** 2,5 ****
--- 2,14 ----
* $Id$
* $Log$
+ * Revision 1.4 2003/09/24 23:56:49 pelle
+ * Refactoring nearly done. New model for creating signed objects.
+ * With view for supporting the xmlpull api shortly for performance reasons.
+ * Currently still uses dom4j but that has been refactored out that it
+ * should now be very quick to implement a xmlpull implementation.
+ *
+ * A side benefit of this is that the API has been further simplified. I still have some work
+ * todo with regards to cleaning up some of the outlying parts of the code.
+ *
* Revision 1.3 2003/09/23 19:16:29 pelle
* Changed NameSpace to Identity.
***************
*** 29,33 ****
* Revision 1.15 2003/02/14 21:10:36 pelle
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
! * The NamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
--- 38,42 ----
* Revision 1.15 2003/02/14 21:10:36 pelle
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
! * The SignedNamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
***************
*** 40,44 ****
*
* Revision 1.12 2002/12/17 21:40:59 pelle
! * First part of refactoring of NamedObject and SignedObject Interface/Class parings.
*
* Revision 1.11 2002/12/17 20:34:42 pelle
--- 49,53 ----
*
* Revision 1.12 2002/12/17 21:40:59 pelle
! * First part of refactoring of SignedNamedObject and SignedObject Interface/Class parings.
*
* Revision 1.11 2002/12/17 20:34:42 pelle
***************
*** 47,53 ****
* on it before I'm happy.
* There is now a NSResolver class, which handles all the namespace resolution. I took most of the functionality
! * for this out of NamedObject.
! * Then there is the veriifer, which verifies a given NamedObject using the NSResolver.
! * This has simplified the NamedObject classes drastically, leaving them as mainly data objects, which is what they
* should be.
* I have also gone around and tightened up security on many different classes, making clases and/or methods final where appropriate.
--- 56,62 ----
* on it before I'm happy.
* There is now a NSResolver class, which handles all the namespace resolution. I took most of the functionality
! * for this out of SignedNamedObject.
! * Then there is the veriifer, which verifies a given SignedNamedObject using the NSResolver.
! * This has simplified the SignedNamedObject classes drastically, leaving them as mainly data objects, which is what they
* should be.
* I have also gone around and tightened up security on many different classes, making clases and/or methods final where appropriate.
***************
*** 99,103 ****
* Added various new schemas and updated most of the existing ones.
* Added explanation interface for explaining the purpose of a
! * NamedObject to a user. We may want to use XSL instead.
* Also made the signing webapp look a bit nicer.
*
--- 108,112 ----
* Added various new schemas and updated most of the existing ones.
* Added explanation interface for explaining the purpose of a
! * SignedNamedObject to a user. We may want to use XSL instead.
* Also made the signing webapp look a bit nicer.
*
***************
*** 126,130 ****
import org.neuclear.id.InvalidIdentityException;
import org.neuclear.id.NSTools;
! import org.neuclear.id.NamedObject;
import org.neuclear.id.signrequest.SignatureRequest;
import org.neuclear.receiver.ReceiverServlet;
--- 135,139 ----
import org.neuclear.id.InvalidIdentityException;
import org.neuclear.id.NSTools;
! import org.neuclear.id.SignedNamedObject;
import org.neuclear.id.signrequest.SignatureRequest;
import org.neuclear.receiver.ReceiverServlet;
***************
*** 216,220 ****
String passphrase = request.getParameter("passphrase");
SignatureRequest sigreq;
! NamedObject named;
boolean isSigned = false;
Element elem = null;
--- 225,229 ----
String passphrase = request.getParameter("passphrase");
SignatureRequest sigreq;
! SignedNamedObject named;
boolean isSigned = false;
Element elem = null;
***************
*** 302,306 ****
}
! public Element receiveNamedObject(NamedObject obj, String soapAction) throws SOAPException {
try {
signObject(obj, "hello".toCharArray());// TODO How do we get the passphrase here? Popup request?
--- 311,315 ----
}
! public Element receiveNamedObject(SignedNamedObject obj, String soapAction) throws SOAPException {
try {
signObject(obj, "hello".toCharArray());// TODO How do we get the passphrase here? Popup request?
***************
*** 317,321 ****
}
! protected static void signObject(NamedObject obj, char passphrase[]) throws NeudistException, InvalidIdentityException, InvalidPassphraseException, NonExistingSignerException {
if (!obj.isSigned()) {
try {
--- 326,330 ----
}
! protected static void signObject(SignedNamedObject obj, char passphrase[]) throws NeudistException, InvalidIdentityException, InvalidPassphraseException, NonExistingSignerException {
if (!obj.isSigned()) {
try {
|