|
From: <pe...@us...> - 2003-11-19 23:34:00
|
Update of /cvsroot/neuclear/neuclear-xmlsig/src/java/org/neuclear/xml In directory sc8-pr-cvs1:/tmp/cvs-serv12757/src/java/org/neuclear/xml Modified Files: AbstractElementProxy.java XMLTools.java Log Message: Signers now can generatekeys via the generateKey() method. Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit. SignedNamedObject now contains the full xml which is returned with getEncoded() This means that it is now possible to further send on or process a SignedNamedObject, leaving NamedObjectBuilder for its original purposes of purely generating new Contracts. NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it. Updated all major interfaces that used the old model to use the new model. Index: AbstractElementProxy.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-xmlsig/src/java/org/neuclear/xml/AbstractElementProxy.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** AbstractElementProxy.java 11 Nov 2003 16:33:20 -0000 1.1.1.1 --- AbstractElementProxy.java 19 Nov 2003 23:33:17 -0000 1.2 *************** *** 2,5 **** --- 2,14 ---- * $Id$ * $Log$ + * Revision 1.2 2003/11/19 23:33:17 pelle + * Signers now can generatekeys via the generateKey() method. + * Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit. + * SignedNamedObject now contains the full xml which is returned with getEncoded() + * This means that it is now possible to further send on or process a SignedNamedObject, leaving + * NamedObjectBuilder for its original purposes of purely generating new Contracts. + * NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it. + * Updated all major interfaces that used the old model to use the new model. + * * Revision 1.1.1.1 2003/11/11 16:33:20 pelle * Moved over from neudist.org *************** *** 25,29 **** * The AbstractElementProxy has a new final method .asXML() * which is similar to DOM4J's but it outputs the xml in the compact format and not the pretty format, thus not causing problems with Canonicalization. ! * You can now also easily get the digest of a SignedElement with the new .getDigest() value. * * Revision 1.2 2003/02/11 14:47:02 pelle --- 34,38 ---- * The AbstractElementProxy has a new final method .asXML() * which is similar to DOM4J's but it outputs the xml in the compact format and not the pretty format, thus not causing problems with Canonicalization. ! * You can now also easily get the digest of a SignedElement with the new .getEncoded() value. * * Revision 1.2 2003/02/11 14:47:02 pelle Index: XMLTools.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-xmlsig/src/java/org/neuclear/xml/XMLTools.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** XMLTools.java 11 Nov 2003 16:33:20 -0000 1.1.1.1 --- XMLTools.java 19 Nov 2003 23:33:17 -0000 1.2 *************** *** 2,5 **** --- 2,14 ---- * $Id$ * $Log$ + * Revision 1.2 2003/11/19 23:33:17 pelle + * Signers now can generatekeys via the generateKey() method. + * Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit. + * SignedNamedObject now contains the full xml which is returned with getEncoded() + * This means that it is now possible to further send on or process a SignedNamedObject, leaving + * NamedObjectBuilder for its original purposes of purely generating new Contracts. + * NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it. + * Updated all major interfaces that used the old model to use the new model. + * * Revision 1.1.1.1 2003/11/11 16:33:20 pelle * Moved over from neudist.org *************** *** 21,25 **** * The AbstractElementProxy has a new final method .asXML() * which is similar to DOM4J's but it outputs the xml in the compact format and not the pretty format, thus not causing problems with Canonicalization. ! * You can now also easily get the digest of a SignedElement with the new .getDigest() value. * * Revision 1.3 2003/02/11 14:47:03 pelle --- 30,34 ---- * The AbstractElementProxy has a new final method .asXML() * which is similar to DOM4J's but it outputs the xml in the compact format and not the pretty format, thus not causing problems with Canonicalization. ! * You can now also easily get the digest of a SignedElement with the new .getEncoded() value. * * Revision 1.3 2003/02/11 14:47:03 pelle *************** *** 128,150 **** public class XMLTools { ! /** public static void writeDom(Document doc,OutputStream out) throws IOException{ ! try { ! ! TransformerFactory fact=TransformerFactory.newInstance(); ! Transformer tran=fact.newTransformer(); ! tran.setOutputProperty(OutputKeys.INDENT,"2"); ! tran.transform(new DOMSource(doc),new StreamResult(out)); ! } catch (TransformerFactoryConfigurationError error) { ! Utility.handleException(error); ! } catch (TransformerException e) { ! Utility.handleException(e); ! } ! // SerializerToXML serializer = new SerializerToXML(); ! // // Insert your PipedOutputStream here instead of System.out! ! // serializer.indent(2); ! // ! // serializer.setOutputStream(out); ! // serializer.serialize(doc); ! } */ public static boolean isAttributeTrue(Element elem, String name) { --- 137,160 ---- public class XMLTools { ! /** ! * public static void writeDom(Document doc,OutputStream out) throws IOException{ ! * try { ! * <p/> ! * TransformerFactory fact=TransformerFactory.newInstance(); ! * Transformer tran=fact.newTransformer(); ! * tran.setOutputProperty(OutputKeys.INDENT,"2"); ! * tran.transform(new DOMSource(doc),new StreamResult(out)); ! * } catch (TransformerFactoryConfigurationError error) { ! * Utility.handleException(error); ! * } catch (TransformerException e) { ! * Utility.handleException(e); ! * } ! * // SerializerToXML serializer = new SerializerToXML(); ! * // // Insert your PipedOutputStream here instead of System.out! ! * // serializer.indent(2); ! * // ! * // serializer.setOutputStream(out); ! * // serializer.serialize(doc); ! * } */ public static boolean isAttributeTrue(Element elem, String name) { |