Class Canonicalizer20010315

    • Constructor Detail

      • Canonicalizer20010315

        public Canonicalizer20010315​(boolean includeComments)
        Constructor Canonicalizer20010315
        Parameters:
        includeComments -
      • Canonicalizer20010315

        public Canonicalizer20010315​(boolean includeComments,
                                     boolean c14n11)
        Constructor Canonicalizer20010315
        Parameters:
        includeComments -
        c14n11 - Whether this is a Canonical XML 1.1 implementation or not
    • Method Detail

      • engineCanonicalizeSubTree

        public byte[] engineCanonicalizeSubTree​(org.w3c.dom.Node rootNode,
                                                java.lang.String inclusiveNamespaces,
                                                boolean propagateDefaultNamespace)
                                         throws CanonicalizationException
        Always throws a CanonicalizationException because this is inclusive c14n.
        Specified by:
        engineCanonicalizeSubTree in class CanonicalizerSpi
        Parameters:
        rootNode -
        inclusiveNamespaces -
        propagateDefaultNamespace - If true the default namespace will be propagated to the c14n-ized root element
        Returns:
        none it always fails
        Throws:
        CanonicalizationException
      • outputAttributesSubtree

        protected void outputAttributesSubtree​(org.w3c.dom.Element element,
                                               NameSpaceSymbTable ns,
                                               java.util.Map<java.lang.String,​byte[]> cache)
                                        throws CanonicalizationException,
                                               org.w3c.dom.DOMException,
                                               java.io.IOException
        Output the Attr[]s for the given element.
        The code of this method is a copy of outputAttributes(Element, NameSpaceSymbTable, Map), whereas it takes into account that subtree-c14n is -- well -- subtree-based. So if the element in question isRoot of c14n, it's parent is not in the node set, as well as all other ancestors.
        Parameters:
        element -
        ns -
        cache -
        Throws:
        CanonicalizationException
        org.w3c.dom.DOMException
        java.io.IOException
      • circumventBugIfNeeded

        protected void circumventBugIfNeeded​(XMLSignatureInput input)
                                      throws CanonicalizationException,
                                             javax.xml.parsers.ParserConfigurationException,
                                             java.io.IOException,
                                             org.xml.sax.SAXException
        Throws:
        CanonicalizationException
        javax.xml.parsers.ParserConfigurationException
        java.io.IOException
        org.xml.sax.SAXException