|
From: <pe...@us...> - 2004-02-19 15:40:39
|
Update of /cvsroot/neuclear/neuclear-xmlsig/src/java/org/neuclear/xml/xmlsec In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16698/src/java/org/neuclear/xml/xmlsec Modified Files: XMLSecTools.java Removed Files: QuickEmbeddedSignature.java Log Message: Various cleanups and corrections Index: XMLSecTools.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-xmlsig/src/java/org/neuclear/xml/xmlsec/XMLSecTools.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** XMLSecTools.java 19 Feb 2004 00:27:59 -0000 1.9 --- XMLSecTools.java 19 Feb 2004 15:30:09 -0000 1.10 *************** *** 1,4 **** --- 1,7 ---- /* $Id$ * $Log$ + * Revision 1.10 2004/02/19 15:30:09 pelle + * Various cleanups and corrections + * * Revision 1.9 2004/02/19 00:27:59 pelle * Discovered several incompatabilities with the xmlsig implementation. Have been working on getting it working. *************** *** 160,164 **** */ - import org.dom4j.*; import org.dom4j.io.XMLWriter; import org.neuclear.commons.crypto.Base64; --- 163,166 ---- *************** *** 190,193 **** --- 192,198 ---- */ public final class XMLSecTools { + private XMLSecTools() { + } + public static final String XMLDSIG_NAMESPACE = "http://www.w3.org/2000/09/xmldsig#"; public static final Namespace NS_DS = DocumentHelper.createNamespace("ds", XMLDSIG_NAMESPACE); *************** *** 209,225 **** /** * Signs an element with a given Private Key and "Envelopes" the signature within. ! * ! * @param root Element to be signed ! * @param name Alias of key to be used for signing ! * @param signer NeuClear Signer ! * @throws XMLSecurityException */ ! public static XMLSignature signElement( final Element root, final String name, final org.neuclear.commons.crypto.signers.Signer signer) throws XMLSecurityException, NonExistingSignerException, UserCancellationException {//, KeyStoreException { ! return new XMLSignature(name, signer, root,Reference.XMLSIGTYPE_ENVELOPED); } /** * Signs an element with a given keypair and embeds the element within the Signature. ! * * @param root Element to be signed * @param keypair RSA/DSA KeyPair --- 214,230 ---- /** * Signs an element with a given Private Key and "Envelopes" the signature within. ! * ! * @param root Element to be signed ! * @param name Alias of key to be used for signing ! * @param signer NeuClear Signer ! * @throws XMLSecurityException */ ! public static XMLSignature signElement(final Element root, final String name, final org.neuclear.commons.crypto.signers.Signer signer) throws XMLSecurityException, NonExistingSignerException, UserCancellationException {//, KeyStoreException { ! return new XMLSignature(name, signer, root, Reference.XMLSIGTYPE_ENVELOPED); } /** * Signs an element with a given keypair and embeds the element within the Signature. ! * * @param root Element to be signed * @param keypair RSA/DSA KeyPair *************** *** 393,397 **** */ public static byte[] canonicalize(final Canonicalizer canon, final Object node) throws XMLSecurityException { ! return canon.canonicalize(node); } --- 398,402 ---- */ public static byte[] canonicalize(final Canonicalizer canon, final Object node) throws XMLSecurityException { ! return canon.canonicalize(node); } *************** *** 487,492 **** * @return Text */ ! public static Text createTextWithBigInteger( ! final BigInteger biginteger) { String encodedInt = Base64.encode(biginteger); --- 492,496 ---- * @return Text */ ! public static Text createTextWithBigInteger(final BigInteger biginteger) { String encodedInt = Base64.encode(biginteger); --- QuickEmbeddedSignature.java DELETED --- |