use of com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315ExclOmitComments in project jdk8u_jdk by JetBrains.
the class TransformC14NExclusive method enginePerformTransform.
protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input, OutputStream os, Transform transformObject) throws CanonicalizationException {
try {
String inclusiveNamespaces = null;
if (transformObject.length(InclusiveNamespaces.ExclusiveCanonicalizationNamespace, InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES) == 1) {
Element inclusiveElement = XMLUtils.selectNode(transformObject.getElement().getFirstChild(), InclusiveNamespaces.ExclusiveCanonicalizationNamespace, InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES, 0);
inclusiveNamespaces = new InclusiveNamespaces(inclusiveElement, transformObject.getBaseURI()).getInclusiveNamespaces();
}
Canonicalizer20010315ExclOmitComments c14n = new Canonicalizer20010315ExclOmitComments();
if (os != null) {
c14n.setWriter(os);
}
byte[] result = c14n.engineCanonicalize(input, inclusiveNamespaces);
XMLSignatureInput output = new XMLSignatureInput(result);
if (os != null) {
output.setOutputStream(os);
}
return output;
} catch (XMLSecurityException ex) {
throw new CanonicalizationException("empty", ex);
}
}
Aggregations