View Javadoc
1 package org.neuclear.xml.c14; 2 3 import org.neuclear.xml.transforms.TransformerFactory; 4 5 /*** 6 * (C) 2003 Antilles Software Ventures SA 7 * User: pelleb 8 * Date: Feb 8, 2003 9 * Time: 9:23:01 AM 10 * $Id: CanonicalizerWithoutSignature.java,v 1.4 2004/03/08 23:51:03 pelle Exp $ 11 * $Log: CanonicalizerWithoutSignature.java,v $ 12 * Revision 1.4 2004/03/08 23:51:03 pelle 13 * More improvements on the XMLSignature. Now uses the Transforms properly, References properly. 14 * All the major elements have been refactored to be cleaner and more correct. 15 * 16 * Revision 1.3 2003/11/21 04:44:30 pelle 17 * EncryptedFileStore now works. It uses the PBECipher with DES3 afair. 18 * Otherwise You will Finaliate. 19 * Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final. 20 * This should hopefully make everything more stable (and secure). 21 * <p/> 22 * Revision 1.2 2003/11/11 21:18:07 pelle 23 * Further vital reshuffling. 24 * org.neudist.crypto.* and org.neudist.utils.* have been moved to respective areas under org.neuclear.commons 25 * org.neuclear.signers.* as well as org.neuclear.passphraseagents have been moved under org.neuclear.commons.crypto as well. 26 * Did a bit of work on the Canonicalizer and changed a few other minor bits. 27 * <p/> 28 * Revision 1.1.1.1 2003/11/11 16:33:20 pelle 29 * Moved over from neudist.org 30 * Moved remaining common utilities into commons 31 * <p/> 32 * Revision 1.3 2003/02/21 22:48:14 pelle 33 * New Test Infrastructure 34 * Added test keys in src/testdata/keys 35 * Modified tools to handle these keys 36 * <p/> 37 * Revision 1.2 2003/02/11 14:47:03 pelle 38 * Added benchmarking code. 39 * DigestValue is now a required part. 40 * If you pass a keypair when you sign, you get the PublicKey included as a KeyInfo block within the signature. 41 * <p/> 42 * Revision 1.1 2003/02/08 18:48:07 pelle 43 * The Signature phase has been rewritten. 44 * There now is a new Class called QuickEmbeddedSignature which is more in line with my original idea for this library. 45 * It simply has a template of the xml and signs it in a standard way. 46 * The original XMLSignature class is still used for verification and will in the future handle more thoroughly 47 * all the various flavours of XMLSig. 48 * XMLSecTools has got different flavours of canonicalize now. Including one where you can pass it a Canonicaliser to use. 49 * Of the new Canonicalizer's are CanonicalizerWithComments, which I accidently left out of the last commit. 50 * And CanonicalizerWithoutSignature which leaves out the Signature in the Canonicalization phase and is thus 51 * a lot more efficient than the previous approach. 52 */ 53 public final class CanonicalizerWithoutSignature extends Canonicalizer { 54 55 public CanonicalizerWithoutSignature() { 56 super(ALGORITHM, XPATH_W_COMMENTS); 57 } 58 59 public static final String XPATH_W_COMMENTS = "(//. | //@* | //namespace::*| self::processing-instruction())[not(self::ds:Signature)]"; 60 61 public static final String ALGORITHM = "http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"; 62 63 { 64 TransformerFactory.registerTransformer(ALGORITHM, CanonicalizerWithoutSignature.class); 65 } 66 67 // public boolean matches(Node node) { 68 // 69 // return super.matches(node)&&!(node instanceof Element && ((Element)node).getQName().equals(SIGNATURE)); 70 // } 71 // private final static QName SIGNATURE=XMLSecTools.createQName("Signature"); 72 }

This page was automatically generated by Maven