You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by co...@apache.org on 2015/12/15 18:13:22 UTC
svn commit: r1720201 [9/24] - in /santuario/xml-security-java/trunk:
samples/javax/xml/crypto/dsig/samples/
samples/org/apache/xml/security/samples/
samples/org/apache/xml/security/samples/algorithms/
samples/org/apache/xml/security/samples/canonicaliz...
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/Transform.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/Transform.java?rev=1720201&r1=1720200&r2=1720201&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/Transform.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/Transform.java Tue Dec 15 17:13:17 2015
@@ -70,45 +70,45 @@ public final class Transform extends Sig
org.slf4j.LoggerFactory.getLogger(Transform.class);
/** All available Transform classes are registered here */
- private static Map<String, Class<? extends TransformSpi>> transformSpiHash =
+ private static Map<String, Class<? extends TransformSpi>> transformSpiHash =
new ConcurrentHashMap<String, Class<? extends TransformSpi>>();
-
+
private final TransformSpi transformSpi;
private boolean secureValidation;
-
+
/**
- * Generates a Transform object that implements the specified
+ * Generates a Transform object that implements the specified
* <code>Transform algorithm</code> URI.
*
* @param doc the proxy {@link Document}
- * @param algorithmURI <code>Transform algorithm</code> URI representation,
- * such as specified in
+ * @param algorithmURI <code>Transform algorithm</code> URI representation,
+ * such as specified in
* <a href=http://www.w3.org/TR/xmldsig-core/#sec-TransformAlg>Transform algorithm </a>
* @throws InvalidTransformException
*/
public Transform(Document doc, String algorithmURI) throws InvalidTransformException {
this(doc, algorithmURI, (NodeList)null);
}
-
+
/**
- * Generates a Transform object that implements the specified
+ * Generates a Transform object that implements the specified
* <code>Transform algorithm</code> URI.
*
- * @param algorithmURI <code>Transform algorithm</code> URI representation,
- * such as specified in
+ * @param algorithmURI <code>Transform algorithm</code> URI representation,
+ * such as specified in
* <a href=http://www.w3.org/TR/xmldsig-core/#sec-TransformAlg>Transform algorithm </a>
* @param contextChild the child element of <code>Transform</code> element
* @param doc the proxy {@link Document}
* @throws InvalidTransformException
*/
- public Transform(Document doc, String algorithmURI, Element contextChild)
+ public Transform(Document doc, String algorithmURI, Element contextChild)
throws InvalidTransformException {
super(doc);
HelperNodeList contextNodes = null;
-
+
if (contextChild != null) {
contextNodes = new HelperNodeList();
-
+
XMLUtils.addReturnToElement(doc, contextNodes);
contextNodes.appendChild(contextChild);
XMLUtils.addReturnToElement(doc, contextNodes);
@@ -120,7 +120,7 @@ public final class Transform extends Sig
/**
* Constructs {@link Transform}
*
- * @param doc the {@link Document} in which <code>Transform</code> will be
+ * @param doc the {@link Document} in which <code>Transform</code> will be
* placed
* @param algorithmURI URI representation of <code>Transform algorithm</code>
* @param contextNodes the child node list of <code>Transform</code> element
@@ -150,7 +150,7 @@ public final class Transform extends Sig
Object exArgs[] = { Constants._ATT_ALGORITHM, Constants._TAG_TRANSFORM };
throw new TransformationException("xml.WrongContent", exArgs);
}
-
+
Class<? extends TransformSpi> transformSpiClass = transformSpiHash.get(algorithmURI);
if (transformSpiClass == null) {
Object exArgs[] = { algorithmURI };
@@ -170,21 +170,21 @@ public final class Transform extends Sig
);
}
}
-
+
/**
* Registers implementing class of the Transform algorithm with algorithmURI
*
* @param algorithmURI algorithmURI URI representation of <code>Transform algorithm</code>
- * @param implementingClass <code>implementingClass</code> the implementing
+ * @param implementingClass <code>implementingClass</code> the implementing
* class of {@link TransformSpi}
- * @throws AlgorithmAlreadyRegisteredException if specified algorithmURI
+ * @throws AlgorithmAlreadyRegisteredException if specified algorithmURI
* is already registered
* @throws SecurityException if a security manager is installed and the
* caller does not have permission to register the transform
*/
@SuppressWarnings("unchecked")
public static void register(String algorithmURI, String implementingClass)
- throws AlgorithmAlreadyRegisteredException, ClassNotFoundException,
+ throws AlgorithmAlreadyRegisteredException, ClassNotFoundException,
InvalidTransformException {
JavaUtils.checkRegisterPermission();
// are we already registered?
@@ -193,19 +193,19 @@ public final class Transform extends Sig
Object exArgs[] = { algorithmURI, transformSpi };
throw new AlgorithmAlreadyRegisteredException("algorithm.alreadyRegistered", exArgs);
}
- Class<? extends TransformSpi> transformSpiClass =
+ Class<? extends TransformSpi> transformSpiClass =
(Class<? extends TransformSpi>)
ClassLoaderUtils.loadClass(implementingClass, Transform.class);
transformSpiHash.put(algorithmURI, transformSpiClass);
}
-
+
/**
* Registers implementing class of the Transform algorithm with algorithmURI
*
* @param algorithmURI algorithmURI URI representation of <code>Transform algorithm</code>
- * @param implementingClass <code>implementingClass</code> the implementing
+ * @param implementingClass <code>implementingClass</code> the implementing
* class of {@link TransformSpi}
- * @throws AlgorithmAlreadyRegisteredException if specified algorithmURI
+ * @throws AlgorithmAlreadyRegisteredException if specified algorithmURI
* is already registered
* @throws SecurityException if a security manager is installed and the
* caller does not have permission to register the transform
@@ -260,7 +260,7 @@ public final class Transform extends Sig
Transforms.TRANSFORM_XPATH2FILTER, TransformXPath2Filter.class
);
}
-
+
/**
* Returns the URI representation of Transformation algorithm
*
@@ -273,9 +273,9 @@ public final class Transform extends Sig
/**
* Transforms the input, and generates {@link XMLSignatureInput} as output.
*
- * @param input input {@link XMLSignatureInput} which can supplied Octet
+ * @param input input {@link XMLSignatureInput} which can supplied Octet
* Stream and NodeSet as Input of Transformation
- * @return the {@link XMLSignatureInput} class as the result of
+ * @return the {@link XMLSignatureInput} class as the result of
* transformation
* @throws CanonicalizationException
* @throws IOException
@@ -287,14 +287,14 @@ public final class Transform extends Sig
InvalidCanonicalizerException, TransformationException {
return performTransform(input, null);
}
-
+
/**
* Transforms the input, and generates {@link XMLSignatureInput} as output.
*
- * @param input input {@link XMLSignatureInput} which can supplied Octect
+ * @param input input {@link XMLSignatureInput} which can supplied Octect
* Stream and NodeSet as Input of Transformation
* @param os where to output the result of the last transformation
- * @return the {@link XMLSignatureInput} class as the result of
+ * @return the {@link XMLSignatureInput} class as the result of
* transformation
* @throws CanonicalizationException
* @throws IOException
@@ -327,7 +327,7 @@ public final class Transform extends Sig
public String getBaseLocalName() {
return Constants._TAG_TRANSFORM;
}
-
+
/**
* Initialize the transform object.
*/
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/TransformSpi.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/TransformSpi.java?rev=1720201&r1=1720200&r2=1720201&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/TransformSpi.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/TransformSpi.java Tue Dec 15 17:13:17 2015
@@ -29,15 +29,15 @@ import org.xml.sax.SAXException;
/**
* Base class which all Transform algorithms extend. The common methods that
- * have to be overridden are the
+ * have to be overridden are the
* {@link #enginePerformTransform(XMLSignatureInput, Transform)} method.
*
* @author Christian Geuer-Pollmann
*/
public abstract class TransformSpi {
-
+
protected boolean secureValidation;
-
+
/**
* The mega method which MUST be implemented by the Transformation Algorithm.
*
@@ -58,14 +58,14 @@ public abstract class TransformSpi {
TransformationException, ParserConfigurationException, SAXException {
throw new UnsupportedOperationException();
}
-
+
/**
* The mega method which MUST be implemented by the Transformation Algorithm.
- * In order to be compatible with preexisting Transform implementations,
+ * In order to be compatible with preexisting Transform implementations,
* by default this implementation invokes the deprecated, thread-unsafe
- * methods. Subclasses should override this with a thread-safe
+ * methods. Subclasses should override this with a thread-safe
* implementation.
- *
+ *
* @param input {@link XMLSignatureInput} as the input of transformation
* @param transformObject the Transform object
* @return {@link XMLSignatureInput} as the result of transformation
@@ -100,7 +100,7 @@ public abstract class TransformSpi {
TransformationException, ParserConfigurationException, SAXException {
return enginePerformTransform(input, null);
}
-
+
/**
* Returns the URI representation of <code>Transformation algorithm</code>
*
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/TransformationException.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/TransformationException.java?rev=1720201&r1=1720200&r2=1720201&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/TransformationException.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/TransformationException.java Tue Dec 15 17:13:17 2015
@@ -26,7 +26,7 @@ import org.apache.xml.security.exception
*/
public class TransformationException extends XMLSecurityException {
/**
- *
+ *
*/
private static final long serialVersionUID = 1L;
@@ -37,7 +37,7 @@ public class TransformationException ext
public TransformationException() {
super();
}
-
+
public TransformationException(Exception ex) {
super(ex);
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/Transforms.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/Transforms.java?rev=1720201&r1=1720200&r2=1720201&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/Transforms.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/Transforms.java Tue Dec 15 17:13:17 2015
@@ -36,11 +36,11 @@ import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
/**
- * Holder of the {@link org.apache.xml.security.transforms.Transform} steps to
+ * Holder of the {@link org.apache.xml.security.transforms.Transform} steps to
* be performed on the data.
- * The input to the first Transform is the result of dereferencing the
+ * The input to the first Transform is the result of dereferencing the
* <code>URI</code> attribute of the <code>Reference</code> element.
- * The output from the last Transform is the input for the
+ * The output from the last Transform is the input for the
* <code>DigestMethod algorithm</code>
*
* @author Christian Geuer-Pollmann
@@ -50,66 +50,66 @@ import org.w3c.dom.NodeList;
public class Transforms extends SignatureElementProxy {
/** Canonicalization - Required Canonical XML (omits comments) */
- public static final String TRANSFORM_C14N_OMIT_COMMENTS
+ public static final String TRANSFORM_C14N_OMIT_COMMENTS
= Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS;
-
+
/** Canonicalization - Recommended Canonical XML with Comments */
- public static final String TRANSFORM_C14N_WITH_COMMENTS
+ public static final String TRANSFORM_C14N_WITH_COMMENTS
= Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS;
-
+
/** Canonicalization - Required Canonical XML 1.1 (omits comments) */
- public static final String TRANSFORM_C14N11_OMIT_COMMENTS
+ public static final String TRANSFORM_C14N11_OMIT_COMMENTS
= Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS;
-
+
/** Canonicalization - Recommended Canonical XML 1.1 with Comments */
- public static final String TRANSFORM_C14N11_WITH_COMMENTS
+ public static final String TRANSFORM_C14N11_WITH_COMMENTS
= Canonicalizer.ALGO_ID_C14N11_WITH_COMMENTS;
-
+
/** Canonicalization - Required Exclusive Canonicalization (omits comments) */
- public static final String TRANSFORM_C14N_EXCL_OMIT_COMMENTS
+ public static final String TRANSFORM_C14N_EXCL_OMIT_COMMENTS
= Canonicalizer.ALGO_ID_C14N_EXCL_OMIT_COMMENTS;
-
+
/** Canonicalization - Recommended Exclusive Canonicalization with Comments */
- public static final String TRANSFORM_C14N_EXCL_WITH_COMMENTS
+ public static final String TRANSFORM_C14N_EXCL_WITH_COMMENTS
= Canonicalizer.ALGO_ID_C14N_EXCL_WITH_COMMENTS;
-
+
/** Transform - Optional XSLT */
- public static final String TRANSFORM_XSLT
+ public static final String TRANSFORM_XSLT
= "http://www.w3.org/TR/1999/REC-xslt-19991116";
-
+
/** Transform - Required base64 decoding */
- public static final String TRANSFORM_BASE64_DECODE
+ public static final String TRANSFORM_BASE64_DECODE
= Constants.SignatureSpecNS + "base64";
-
+
/** Transform - Recommended XPath */
- public static final String TRANSFORM_XPATH
+ public static final String TRANSFORM_XPATH
= "http://www.w3.org/TR/1999/REC-xpath-19991116";
-
+
/** Transform - Required Enveloped Signature */
- public static final String TRANSFORM_ENVELOPED_SIGNATURE
+ public static final String TRANSFORM_ENVELOPED_SIGNATURE
= Constants.SignatureSpecNS + "enveloped-signature";
-
+
/** Transform - XPointer */
- public static final String TRANSFORM_XPOINTER
+ public static final String TRANSFORM_XPOINTER
= "http://www.w3.org/TR/2001/WD-xptr-20010108";
-
+
/** Transform - XPath Filter */
- public static final String TRANSFORM_XPATH2FILTER
+ public static final String TRANSFORM_XPATH2FILTER
= "http://www.w3.org/2002/06/xmldsig-filter2";
-
+
private static org.slf4j.Logger log =
org.slf4j.LoggerFactory.getLogger(Transforms.class);
private Element[] transforms;
protected Transforms() { }
-
+
private boolean secureValidation;
/**
* Constructs {@link Transforms}.
*
- * @param doc the {@link Document} in which <code>XMLSignature</code> will
+ * @param doc the {@link Document} in which <code>XMLSignature</code> will
* be placed
*/
public Transforms(Document doc) {
@@ -118,7 +118,7 @@ public class Transforms extends Signatur
}
/**
- * Constructs {@link Transforms} from {@link Element} which is
+ * Constructs {@link Transforms} from {@link Element} which is
* <code>Transforms</code> Element
*
* @param element is <code>Transforms</code> element
@@ -130,7 +130,7 @@ public class Transforms extends Signatur
* @throws XMLSignatureException
*/
public Transforms(Element element, String baseURI)
- throws DOMException, XMLSignatureException, InvalidTransformException,
+ throws DOMException, XMLSignatureException, InvalidTransformException,
TransformationException, XMLSecurityException {
super(element, baseURI);
@@ -143,7 +143,7 @@ public class Transforms extends Signatur
throw new TransformationException("xml.WrongContent", exArgs);
}
}
-
+
/**
* Set whether secure validation is enabled or not. The default is false.
*/
@@ -152,10 +152,10 @@ public class Transforms extends Signatur
}
/**
- * Adds the <code>Transform</code> with the specified <code>Transform
+ * Adds the <code>Transform</code> with the specified <code>Transform
* algorithm URI</code>
*
- * @param transformURI the URI form of transform that indicates which
+ * @param transformURI the URI form of transform that indicates which
* transformation is applied to data
* @throws TransformationException
*/
@@ -174,10 +174,10 @@ public class Transforms extends Signatur
}
/**
- * Adds the <code>Transform</code> with the specified <code>Transform
+ * Adds the <code>Transform</code> with the specified <code>Transform
* algorithm URI</code>
*
- * @param transformURI the URI form of transform that indicates which
+ * @param transformURI the URI form of transform that indicates which
* transformation is applied to data
* @param contextElement
* @throws TransformationException
@@ -198,10 +198,10 @@ public class Transforms extends Signatur
}
/**
- * Adds the <code>Transform</code> with the specified <code>Transform
+ * Adds the <code>Transform</code> with the specified <code>Transform
* algorithm URI</code>.
*
- * @param transformURI the URI form of transform that indicates which
+ * @param transformURI the URI form of transform that indicates which
* transformation is applied to data
* @param contextNodes
* @throws TransformationException
@@ -234,7 +234,7 @@ public class Transforms extends Signatur
}
/**
- * Applies all included <code>Transform</code>s to xmlSignatureInput and
+ * Applies all included <code>Transform</code>s to xmlSignatureInput and
* returns the result of these transformations.
*
* @param xmlSignatureInput the input for the <code>Transform</code>s
@@ -246,9 +246,9 @@ public class Transforms extends Signatur
) throws TransformationException {
return performTransforms(xmlSignatureInput, null);
}
-
+
/**
- * Applies all included <code>Transform</code>s to xmlSignatureInput and
+ * Applies all included <code>Transform</code>s to xmlSignatureInput and
* returns the result of these transformations.
*
* @param xmlSignatureInput the input for the <code>Transform</code>s
@@ -289,7 +289,7 @@ public class Transforms extends Signatur
throw new TransformationException(ex);
}
}
-
+
private void checkSecureValidation(Transform transform) throws TransformationException {
String uri = transform.getURI();
if (secureValidation && Transforms.TRANSFORM_XSLT.equals(uri)) {
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/FuncHere.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/FuncHere.java?rev=1720201&r1=1720200&r2=1720201&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/FuncHere.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/FuncHere.java Tue Dec 15 17:13:17 2015
@@ -52,7 +52,7 @@ import org.w3c.dom.Node;
public class FuncHere extends Function {
/**
- *
+ *
*/
private static final long serialVersionUID = 1L;
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformBase64Decode.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformBase64Decode.java?rev=1720201&r1=1720200&r2=1720201&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformBase64Decode.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformBase64Decode.java Tue Dec 15 17:13:17 2015
@@ -108,26 +108,26 @@ public class TransformBase64Decode exten
StringBuilder sb = new StringBuilder();
traverseElement((Element)el, sb);
if (os == null) {
- byte[] decodedBytes = Base64.decode(sb.toString());
+ byte[] decodedBytes = Base64.decode(sb.toString());
XMLSignatureInput output = new XMLSignatureInput(decodedBytes);
output.setSecureValidation(secureValidation);
return output;
- }
+ }
Base64.decode(sb.toString(), os);
XMLSignatureInput output = new XMLSignatureInput((byte[])null);
output.setSecureValidation(secureValidation);
output.setOutputStream(os);
return output;
}
-
+
if (input.isOctetStream() || input.isNodeSet()) {
if (os == null) {
byte[] base64Bytes = input.getBytes();
- byte[] decodedBytes = Base64.decode(base64Bytes);
+ byte[] decodedBytes = Base64.decode(base64Bytes);
XMLSignatureInput output = new XMLSignatureInput(decodedBytes);
output.setSecureValidation(secureValidation);
return output;
- }
+ }
if (input.isByteArray() || input.isNodeSet()) {
Base64.decode(input.getBytes(), os);
} else {
@@ -137,12 +137,12 @@ public class TransformBase64Decode exten
output.setSecureValidation(secureValidation);
output.setOutputStream(os);
return output;
- }
+ }
try {
//Exceptional case there is current not text case testing this(Before it was a
//a common case).
- Document doc =
+ Document doc =
XMLUtils.createDocumentBuilder(false, secureValidation).parse(input.getOctetStream());
Element rootNode = doc.getDocumentElement();
@@ -156,7 +156,7 @@ public class TransformBase64Decode exten
throw new TransformationException(e, "c14n.Canonicalizer.Exception");
} catch (SAXException e) {
throw new TransformationException(e, "SAX exception");
- }
+ }
} catch (Base64DecodingException e) {
throw new TransformationException(e, "Base64Decoding");
}
@@ -174,5 +174,5 @@ public class TransformBase64Decode exten
}
sibling = sibling.getNextSibling();
}
- }
+ }
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformC14N.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformC14N.java?rev=1720201&r1=1720200&r2=1720201&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformC14N.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformC14N.java Tue Dec 15 17:13:17 2015
@@ -40,7 +40,7 @@ public class TransformC14N extends Trans
Transforms.TRANSFORM_C14N_OMIT_COMMENTS;
/**
- * @inheritDoc
+ * @inheritDoc
*/
protected String engineGetURI() {
return TransformC14N.implementedTransformURI;
@@ -48,19 +48,19 @@ public class TransformC14N extends Trans
protected XMLSignatureInput enginePerformTransform(
XMLSignatureInput input, OutputStream os, Transform transformObject
- ) throws CanonicalizationException {
+ ) throws CanonicalizationException {
Canonicalizer20010315OmitComments c14n = new Canonicalizer20010315OmitComments();
c14n.setSecureValidation(secureValidation);
if (os != null) {
c14n.setWriter(os);
}
- byte[] result = null;
- result = c14n.engineCanonicalize(input);
+ byte[] result = null;
+ result = c14n.engineCanonicalize(input);
XMLSignatureInput output = new XMLSignatureInput(result);
output.setSecureValidation(secureValidation);
if (os != null) {
output.setOutputStream(os);
}
- return output;
+ return output;
}
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformC14N11.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformC14N11.java?rev=1720201&r1=1720200&r2=1720201&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformC14N11.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformC14N11.java Tue Dec 15 17:13:17 2015
@@ -41,19 +41,19 @@ public class TransformC14N11 extends Tra
protected XMLSignatureInput enginePerformTransform(
XMLSignatureInput input, OutputStream os, Transform transform
- ) throws CanonicalizationException {
+ ) throws CanonicalizationException {
Canonicalizer11_OmitComments c14n = new Canonicalizer11_OmitComments();
c14n.setSecureValidation(secureValidation);
if (os != null) {
c14n.setWriter(os);
}
- byte[] result = null;
- result = c14n.engineCanonicalize(input);
+ byte[] result = null;
+ result = c14n.engineCanonicalize(input);
XMLSignatureInput output = new XMLSignatureInput(result);
output.setSecureValidation(secureValidation);
if (os != null) {
output.setOutputStream(os);
}
- return output;
+ return output;
}
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformC14N11_WithComments.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformC14N11_WithComments.java?rev=1720201&r1=1720200&r2=1720201&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformC14N11_WithComments.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformC14N11_WithComments.java Tue Dec 15 17:13:17 2015
@@ -42,20 +42,20 @@ public class TransformC14N11_WithComment
protected XMLSignatureInput enginePerformTransform(
XMLSignatureInput input, OutputStream os, Transform transform
) throws CanonicalizationException {
-
+
Canonicalizer11_WithComments c14n = new Canonicalizer11_WithComments();
c14n.setSecureValidation(secureValidation);
if (os != null) {
c14n.setWriter(os);
}
-
+
byte[] result = null;
- result = c14n.engineCanonicalize(input);
+ result = c14n.engineCanonicalize(input);
XMLSignatureInput output = new XMLSignatureInput(result);
output.setSecureValidation(secureValidation);
if (os != null) {
output.setOutputStream(os);
}
- return output;
+ return output;
}
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformC14NExclusive.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformC14NExclusive.java?rev=1720201&r1=1720200&r2=1720201&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformC14NExclusive.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformC14NExclusive.java Tue Dec 15 17:13:17 2015
@@ -44,7 +44,7 @@ public class TransformC14NExclusive exte
/**
* Method engineGetURI
*
- * @inheritDoc
+ * @inheritDoc
*/
protected String engineGetURI() {
return implementedTransformURI;
@@ -57,7 +57,7 @@ public class TransformC14NExclusive exte
String inclusiveNamespaces = null;
if (transformObject.length(
- InclusiveNamespaces.ExclusiveCanonicalizationNamespace,
+ InclusiveNamespaces.ExclusiveCanonicalizationNamespace,
InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES) == 1
) {
Element inclusiveElement =
@@ -68,7 +68,7 @@ public class TransformC14NExclusive exte
0
);
- inclusiveNamespaces =
+ inclusiveNamespaces =
new InclusiveNamespaces(
inclusiveElement, transformObject.getBaseURI()).getInclusiveNamespaces();
}
@@ -86,9 +86,9 @@ public class TransformC14NExclusive exte
if (os != null) {
output.setOutputStream(os);
}
- return output;
+ return output;
} catch (XMLSecurityException ex) {
throw new CanonicalizationException(ex);
- }
+ }
}
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformC14NExclusiveWithComments.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformC14NExclusiveWithComments.java?rev=1720201&r1=1720200&r2=1720201&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformC14NExclusiveWithComments.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformC14NExclusiveWithComments.java Tue Dec 15 17:13:17 2015
@@ -45,7 +45,7 @@ public class TransformC14NExclusiveWithC
/**
* Method engineGetURI
- *@inheritDoc
+ *@inheritDoc
*
*/
protected String engineGetURI() {
@@ -59,7 +59,7 @@ public class TransformC14NExclusiveWithC
String inclusiveNamespaces = null;
if (transformObject.length(
- InclusiveNamespaces.ExclusiveCanonicalizationNamespace,
+ InclusiveNamespaces.ExclusiveCanonicalizationNamespace,
InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES) == 1
) {
Element inclusiveElement =
@@ -70,7 +70,7 @@ public class TransformC14NExclusiveWithC
0
);
- inclusiveNamespaces =
+ inclusiveNamespaces =
new InclusiveNamespaces(
inclusiveElement, transformObject.getBaseURI()
).getInclusiveNamespaces();
@@ -89,6 +89,6 @@ public class TransformC14NExclusiveWithC
return output;
} catch (XMLSecurityException ex) {
throw new CanonicalizationException(ex);
- }
+ }
}
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformC14NWithComments.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformC14NWithComments.java?rev=1720201&r1=1720200&r2=1720201&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformC14NWithComments.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformC14NWithComments.java Tue Dec 15 17:13:17 2015
@@ -56,12 +56,12 @@ public class TransformC14NWithComments e
}
byte[] result = null;
- result = c14n.engineCanonicalize(input);
- XMLSignatureInput output = new XMLSignatureInput(result);
+ result = c14n.engineCanonicalize(input);
+ XMLSignatureInput output = new XMLSignatureInput(result);
output.setSecureValidation(secureValidation);
if (os != null) {
output.setOutputStream(os);
}
- return output;
+ return output;
}
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformEnvelopedSignature.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformEnvelopedSignature.java?rev=1720201&r1=1720200&r2=1720201&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformEnvelopedSignature.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformEnvelopedSignature.java Tue Dec 15 17:13:17 2015
@@ -72,18 +72,18 @@ public class TransformEnvelopedSignature
Node signatureElement = transformObject.getElement();
- signatureElement = searchSignatureElement(signatureElement);
- input.setExcludeNode(signatureElement);
+ signatureElement = searchSignatureElement(signatureElement);
+ input.setExcludeNode(signatureElement);
input.addNodeFilter(new EnvelopedNodeFilter(signatureElement));
return input;
}
/**
- * @param signatureElement
+ * @param signatureElement
* @return the node that is the signature
* @throws TransformationException
*/
- private static Node searchSignatureElement(Node signatureElement)
+ private static Node searchSignatureElement(Node signatureElement)
throws TransformationException {
boolean found = false;
@@ -110,25 +110,25 @@ public class TransformEnvelopedSignature
}
static class EnvelopedNodeFilter implements NodeFilter {
-
+
Node exclude;
-
+
EnvelopedNodeFilter(Node n) {
exclude = n;
}
-
+
public int isNodeIncludeDO(Node n, int level) {
if (n == exclude) {
return -1;
}
return 1;
}
-
+
/**
* @see org.apache.xml.security.signature.NodeFilter#isNodeInclude(org.w3c.dom.Node)
*/
public int isNodeInclude(Node n) {
- if (n == exclude || XMLUtils.isDescendantOrSelf(exclude, n)) {
+ if (n == exclude || XMLUtils.isDescendantOrSelf(exclude, n)) {
return -1;
}
return 1;
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformXPath.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformXPath.java?rev=1720201&r1=1720200&r2=1720201&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformXPath.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformXPath.java Tue Dec 15 17:13:17 2015
@@ -51,7 +51,7 @@ public class TransformXPath extends Tran
/** Field implementedTransformURI */
public static final String implementedTransformURI = Transforms.TRANSFORM_XPATH;
-
+
/**
* Method engineGetURI
*
@@ -100,7 +100,7 @@ public class TransformXPath extends Tran
DOMException.HIERARCHY_REQUEST_ERR, "Text must be in ds:Xpath"
);
}
-
+
XPathFactory xpathFactory = XPathFactory.newInstance();
XPathAPI xpathAPIInstance = xpathFactory.newXPathAPI();
input.addNodeFilter(new XPathNodeFilter(xpathElement, xpathnode, str, xpathAPIInstance));
@@ -120,12 +120,12 @@ public class TransformXPath extends Tran
}
static class XPathNodeFilter implements NodeFilter {
-
+
XPathAPI xPathAPI;
- Node xpathnode;
+ Node xpathnode;
Element xpathElement;
String str;
-
+
XPathNodeFilter(Element xpathElement, Node xpathnode, String str, XPathAPI xPathAPI) {
this.xpathnode = xpathnode;
this.str = str;
@@ -151,10 +151,10 @@ public class TransformXPath extends Tran
throw new XMLSecurityRuntimeException("signature.Transform.nodeAndType",eArgs, e);
}
}
-
+
public int isNodeIncludeDO(Node n, int level) {
return isNodeInclude(n);
}
-
+
}
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformXPath2Filter.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformXPath2Filter.java?rev=1720201&r1=1720200&r2=1720201&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformXPath2Filter.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformXPath2Filter.java Tue Dec 15 17:13:17 2015
@@ -58,7 +58,7 @@ public class TransformXPath2Filter exten
/** Field implementedTransformURI */
public static final String implementedTransformURI =
Transforms.TRANSFORM_XPATH2FILTER;
-
+
/**
* Method engineGetURI
*
@@ -96,7 +96,7 @@ public class TransformXPath2Filter exten
}
Document inputDoc = null;
- if (input.getSubNode() != null) {
+ if (input.getSubNode() != null) {
inputDoc = XMLUtils.getOwnerDocument(input.getSubNode());
} else {
inputDoc = XMLUtils.getOwnerDocument(input.getNodeSet());
@@ -104,17 +104,17 @@ public class TransformXPath2Filter exten
for (int i = 0; i < xpathElements.length; i++) {
Element xpathElement = xpathElements[i];
-
+
XPath2FilterContainer xpathContainer =
XPath2FilterContainer.newInstance(xpathElement, input.getSourceURI());
- String str =
+ String str =
XMLUtils.getStrFromNode(xpathContainer.getXPathFilterTextNode());
-
+
XPathFactory xpathFactory = XPathFactory.newInstance();
XPathAPI xpathAPIInstance = xpathFactory.newXPathAPI();
-
- NodeList subtreeRoots =
+
+ NodeList subtreeRoots =
xpathAPIInstance.selectNodeList(
inputDoc,
xpathContainer.getXPathFilterTextNode(),
@@ -126,7 +126,7 @@ public class TransformXPath2Filter exten
subtractNodes.add(subtreeRoots);
} else if (xpathContainer.isUnion()) {
unionNodes.add(subtreeRoots);
- }
+ }
}
input.addNodeFilter(
@@ -155,7 +155,7 @@ public class TransformXPath2Filter exten
}
class XPath2NodeFilter implements NodeFilter {
-
+
boolean hasUnionFilter;
boolean hasSubtractFilter;
boolean hasIntersectFilter;
@@ -165,7 +165,7 @@ class XPath2NodeFilter implements NodeFi
int inSubtract = -1;
int inIntersect = -1;
int inUnion = -1;
-
+
XPath2NodeFilter(List<NodeList> unionNodes, List<NodeList> subtractNodes,
List<NodeList> intersectNodes) {
hasUnionFilter = !unionNodes.isEmpty();
@@ -179,7 +179,7 @@ class XPath2NodeFilter implements NodeFi
/**
* @see org.apache.xml.security.signature.NodeFilter#isNodeInclude(org.w3c.dom.Node)
*/
- public int isNodeInclude(Node currentNode) {
+ public int isNodeInclude(Node currentNode) {
int result = 1;
if (hasSubtractFilter && rooted(currentNode, subtractNodes)) {
@@ -189,10 +189,10 @@ class XPath2NodeFilter implements NodeFi
}
//TODO OPTIMIZE
- if (result == 1) {
+ if (result == 1) {
return 1;
}
- if (hasUnionFilter) {
+ if (hasUnionFilter) {
if (rooted(currentNode, unionNodes)) {
return 1;
}
@@ -200,7 +200,7 @@ class XPath2NodeFilter implements NodeFi
}
return result;
}
-
+
public int isNodeIncludeDO(Node n, int level) {
int result = 1;
if (hasSubtractFilter) {
@@ -208,27 +208,27 @@ class XPath2NodeFilter implements NodeFi
if (inList(n, subtractNodes)) {
inSubtract = level;
} else {
- inSubtract = -1;
- }
- }
+ inSubtract = -1;
+ }
+ }
if (inSubtract != -1){
result = -1;
}
- }
- if (result != -1 && hasIntersectFilter
- && (inIntersect == -1 || level <= inIntersect)) {
+ }
+ if (result != -1 && hasIntersectFilter
+ && (inIntersect == -1 || level <= inIntersect)) {
if (!inList(n, intersectNodes)) {
inIntersect = -1;
result = 0;
} else {
- inIntersect = level;
- }
+ inIntersect = level;
+ }
}
if (level <= inUnion) {
inUnion = -1;
}
- if (result == 1) {
+ if (result == 1) {
return 1;
}
if (hasUnionFilter) {
@@ -246,8 +246,8 @@ class XPath2NodeFilter implements NodeFi
/**
* Method rooted
- * @param currentNode
- * @param nodeList
+ * @param currentNode
+ * @param nodeList
*
* @return if rooted bye the rootnodes
*/
@@ -268,15 +268,15 @@ class XPath2NodeFilter implements NodeFi
/**
* Method rooted
- * @param currentNode
- * @param nodeList
+ * @param currentNode
+ * @param nodeList
*
* @return if rooted bye the rootnodes
*/
static boolean inList(Node currentNode, Set<Node> nodeList) {
return nodeList.contains(currentNode);
}
-
+
private static Set<Node> convertNodeListToSet(List<NodeList> l) {
Set<Node> result = new HashSet<Node>();
for (NodeList rootNodes : l) {
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformXSLT.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformXSLT.java?rev=1720201&r1=1720200&r2=1720201&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformXSLT.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/implementations/TransformXSLT.java Tue Dec 15 17:13:17 2015
@@ -77,7 +77,7 @@ public class TransformXSLT extends Trans
) throws IOException, TransformationException {
try {
Element transformElement = transformObject.getElement();
-
+
Element xsltElement =
XMLUtils.selectNode(transformElement.getFirstChild(), XSLTSpecNS, "stylesheet", 0);
@@ -123,7 +123,7 @@ public class TransformXSLT extends Trans
Transformer transformer = tFactory.newTransformer(stylesheet);
- // Force Xalan to use \n as line separator on all OSes. This
+ // Force Xalan to use \n as line separator on all OSes. This
// avoids OS specific signature validation failures due to line
// separator differences in the transformed output. Unfortunately,
// this is not a standard JAXP property so will not work with non-Xalan
@@ -144,7 +144,7 @@ public class TransformXSLT extends Trans
}
StreamResult outputTarget = new StreamResult(baos);
- transformer.transform(xmlSource, outputTarget);
+ transformer.transform(xmlSource, outputTarget);
XMLSignatureInput output = new XMLSignatureInput((byte[])null);
output.setSecureValidation(secureValidation);
output.setOutputStream(baos);
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/params/InclusiveNamespaces.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/params/InclusiveNamespaces.java?rev=1720201&r1=1720200&r2=1720201&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/params/InclusiveNamespaces.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/params/InclusiveNamespaces.java Tue Dec 15 17:13:17 2015
@@ -85,7 +85,7 @@ public class InclusiveNamespaces extends
sb.append(" ");
}
}
-
+
setLocalAttribute(InclusiveNamespaces._ATT_EC_PREFIXLIST, sb.toString().trim());
}
@@ -109,7 +109,7 @@ public class InclusiveNamespaces extends
public String getInclusiveNamespaces() {
return getLocalAttribute(InclusiveNamespaces._ATT_EC_PREFIXLIST);
}
-
+
/**
* Decodes the <code>inclusiveNamespaces</code> String and returns all
* selected namespace prefixes as a Set. The <code>#default</code>
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/params/XPath2FilterContainer.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/params/XPath2FilterContainer.java?rev=1720201&r1=1720200&r2=1720201&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/params/XPath2FilterContainer.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/params/XPath2FilterContainer.java Tue Dec 15 17:13:17 2015
@@ -103,8 +103,8 @@ public class XPath2FilterContainer exten
String filterStr = getLocalAttribute(XPath2FilterContainer._ATT_FILTER);
- if (!filterStr.equals(XPath2FilterContainer._ATT_FILTER_VALUE_INTERSECT)
- && !filterStr.equals(XPath2FilterContainer._ATT_FILTER_VALUE_SUBTRACT)
+ if (!filterStr.equals(XPath2FilterContainer._ATT_FILTER_VALUE_INTERSECT)
+ && !filterStr.equals(XPath2FilterContainer._ATT_FILTER_VALUE_SUBTRACT)
&& !filterStr.equals(XPath2FilterContainer._ATT_FILTER_VALUE_UNION)) {
Object exArgs[] = { XPath2FilterContainer._ATT_FILTER, filterStr,
XPath2FilterContainer._ATT_FILTER_VALUE_INTERSECT
@@ -171,8 +171,8 @@ public class XPath2FilterContainer exten
String type = params[i][0];
String xpath = params[i][1];
- if (!(type.equals(XPath2FilterContainer._ATT_FILTER_VALUE_INTERSECT)
- || type.equals(XPath2FilterContainer._ATT_FILTER_VALUE_SUBTRACT)
+ if (!(type.equals(XPath2FilterContainer._ATT_FILTER_VALUE_INTERSECT)
+ || type.equals(XPath2FilterContainer._ATT_FILTER_VALUE_SUBTRACT)
|| type.equals(XPath2FilterContainer._ATT_FILTER_VALUE_UNION))) {
throw new IllegalArgumentException("The type(" + i + ")=\"" + type
+ "\" is illegal");
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/params/XPath2FilterContainer04.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/params/XPath2FilterContainer04.java?rev=1720201&r1=1720200&r2=1720201&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/params/XPath2FilterContainer04.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/params/XPath2FilterContainer04.java Tue Dec 15 17:13:17 2015
@@ -98,8 +98,8 @@ public class XPath2FilterContainer04 ext
String filterStr = getLocalAttribute(XPath2FilterContainer04._ATT_FILTER);
- if (!filterStr.equals(XPath2FilterContainer04._ATT_FILTER_VALUE_INTERSECT)
- && !filterStr.equals(XPath2FilterContainer04._ATT_FILTER_VALUE_SUBTRACT)
+ if (!filterStr.equals(XPath2FilterContainer04._ATT_FILTER_VALUE_INTERSECT)
+ && !filterStr.equals(XPath2FilterContainer04._ATT_FILTER_VALUE_SUBTRACT)
&& !filterStr.equals(XPath2FilterContainer04._ATT_FILTER_VALUE_UNION)) {
Object exArgs[] = { XPath2FilterContainer04._ATT_FILTER, filterStr,
XPath2FilterContainer04._ATT_FILTER_VALUE_INTERSECT
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/params/XPathFilterCHGPContainer.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/params/XPathFilterCHGPContainer.java?rev=1720201&r1=1720200&r2=1720201&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/params/XPathFilterCHGPContainer.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/params/XPathFilterCHGPContainer.java Tue Dec 15 17:13:17 2015
@@ -35,7 +35,7 @@ import org.w3c.dom.Node;
*/
public class XPathFilterCHGPContainer extends ElementProxy implements TransformParam {
- public static final String TRANSFORM_XPATHFILTERCHGP =
+ public static final String TRANSFORM_XPATHFILTERCHGP =
"http://www.nue.et-inf.uni-siegen.de/~geuer-pollmann/#xpathFilter";
/** Field _ATT_FILTER_VALUE_INTERSECT */
@@ -109,13 +109,13 @@ public class XPathFilterCHGPContainer ex
excludeButSearchElem.appendChild(
createText(indentXPathText(excludeButSearch)));
-
+
addReturnToSelf();
appendSelf(excludeButSearchElem);
}
if (exclude != null && exclude.trim().length() > 0) {
- Element excludeElem =
+ Element excludeElem =
ElementProxy.createElementForFamily(
doc, this.getBaseNamespace(), XPathFilterCHGPContainer._TAG_EXCLUDE);
@@ -136,7 +136,7 @@ public class XPathFilterCHGPContainer ex
static String indentXPathText(String xp) {
if (xp.length() > 2 && !Character.isWhitespace(xp.charAt(0))) {
return "\n" + xp + "\n";
- }
+ }
return xp;
}
@@ -196,7 +196,7 @@ public class XPathFilterCHGPContainer ex
return "";
}
- Element xElem =
+ Element xElem =
XMLUtils.selectNode(
getElement().getFirstChild(), this.getBaseNamespace(), type, 0
);
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/Base64.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/Base64.java?rev=1720201&r1=1720200&r2=1720201&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/Base64.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/Base64.java Tue Dec 15 17:13:17 2015
@@ -32,7 +32,7 @@ import org.w3c.dom.Text;
/**
* Implementation of MIME's Base64 encoding and decoding conversions.
- * Optimized code. (raw version taken from oreilly.jonathan.util,
+ * Optimized code. (raw version taken from oreilly.jonathan.util,
* and currently org.apache.xerces.ds.util.Base64)
*
* @author Raul Benito(Of the xerces copy, and little adaptations).
@@ -45,7 +45,7 @@ public class Base64 {
/** Field BASE64DEFAULTLENGTH */
public static final int BASE64DEFAULTLENGTH = 76;
-
+
private static final int BASELENGTH = 255;
private static final int LOOKUPLENGTH = 64;
private static final int TWENTYFOURBITGROUP = 24;
@@ -53,7 +53,7 @@ public class Base64 {
private static final int SIXTEENBIT = 16;
private static final int FOURBYTE = 4;
private static final int SIGN = -128;
- private static final char PAD = '=';
+ private static final char PAD = '=';
private static final byte [] base64Alphabet = new byte[BASELENGTH];
private static final char [] lookUpBase64Alphabet = new char[LOOKUPLENGTH];
@@ -201,7 +201,7 @@ public class Base64 {
* @return the biginteger obtained from the node
* @throws Base64DecodingException
*/
- public static final BigInteger decodeBigIntegerFromElement(Element element)
+ public static final BigInteger decodeBigIntegerFromElement(Element element)
throws Base64DecodingException {
return new BigInteger(1, Base64.decode(element));
}
@@ -292,12 +292,12 @@ public class Base64 {
* @throws Base64DecodingException
*
*/
- public static final byte[] decode(byte[] base64) throws Base64DecodingException {
+ public static final byte[] decode(byte[] base64) throws Base64DecodingException {
return decodeInternal(base64, -1);
}
/**
- * Encode a byte array and fold lines at the standard 76th character unless
+ * Encode a byte array and fold lines at the standard 76th character unless
* ignore line breaks property is set.
*
* @param binaryData <code>byte[]<code> to be base64 encoded
@@ -305,7 +305,7 @@ public class Base64 {
*/
public static final String encode(byte[] binaryData) {
return XMLUtils.ignoreLineBreaks()
- ? encode(binaryData, Integer.MAX_VALUE)
+ ? encode(binaryData, Integer.MAX_VALUE)
: encode(binaryData, BASE64DEFAULTLENGTH);
}
@@ -409,8 +409,8 @@ public class Base64 {
encodedData[encodedIndex++] = lookUpBase64Alphabet[b3 & 0x3f];
i++;
- }
- encodedData[encodedIndex++] = 0xa;
+ }
+ encodedData[encodedIndex++] = 0xa;
}
for (; i < numberTriplets; i++) {
@@ -425,8 +425,8 @@ public class Base64 {
byte val2 = ((b2 & SIGN) == 0) ? (byte)(b2 >> 4) : (byte)((b2) >> 4 ^ 0xf0);
byte val3 = ((b3 & SIGN) == 0) ? (byte)(b3 >> 6) : (byte)((b3) >> 6 ^ 0xfc);
-
-
+
+
encodedData[encodedIndex++] = lookUpBase64Alphabet[val1];
encodedData[encodedIndex++] = lookUpBase64Alphabet[val2 | (k << 4)];
encodedData[encodedIndex++] = lookUpBase64Alphabet[(l << 2) | val3];
@@ -450,7 +450,7 @@ public class Base64 {
byte val1 = ((b1 & SIGN) == 0) ? (byte)(b1 >> 2) : (byte)((b1) >> 2 ^ 0xc0);
byte val2 = ((b2 & SIGN) == 0) ? (byte)(b2 >> 4) : (byte)((b2) >> 4 ^ 0xf0);
-
+
encodedData[encodedIndex++] = lookUpBase64Alphabet[val1];
encodedData[encodedIndex++] = lookUpBase64Alphabet[val2 | (k << 4)];
encodedData[encodedIndex++] = lookUpBase64Alphabet[l << 2];
@@ -491,7 +491,7 @@ public class Base64 {
return newSize;
}
- protected static final byte[] decodeInternal(byte[] base64Data, int len)
+ protected static final byte[] decodeInternal(byte[] base64Data, int len)
throws Base64DecodingException {
// remove white spaces
if (len == -1) {
@@ -537,15 +537,15 @@ public class Base64 {
if ((b2 & 0xf) != 0) { //last 4 bits should be zero
throw new Base64DecodingException("decoding.general");
}
- decodedData = new byte[encodedIndex + 1];
- decodedData[encodedIndex] = (byte)(b1 << 2 | b2 >> 4) ;
- } else if (!isPad(d3) && isPad(d4)) { //One PAD e.g. 3cQ[Pad]
+ decodedData = new byte[encodedIndex + 1];
+ decodedData[encodedIndex] = (byte)(b1 << 2 | b2 >> 4) ;
+ } else if (!isPad(d3) && isPad(d4)) { //One PAD e.g. 3cQ[Pad]
if ((b3 & 0x3) != 0) { //last 2 bits should be zero
throw new Base64DecodingException("decoding.general");
}
- decodedData = new byte[encodedIndex + 2];
+ decodedData = new byte[encodedIndex + 2];
decodedData[encodedIndex++] = (byte)(b1 << 2 | b2 >> 4);
- decodedData[encodedIndex] = (byte)(((b2 & 0xf) << 4) |((b3 >> 2) & 0xf));
+ decodedData[encodedIndex] = (byte)(((b2 & 0xf) << 4) |((b3 >> 2) & 0xf));
} else {
//an error like "3c[Pad]r", "3cdX", "3cXd", "3cXX" where X is non data
throw new Base64DecodingException("decoding.general");
@@ -567,14 +567,14 @@ public class Base64 {
b4 = base64Alphabet[base64Data[dataIndex++]];
if (b1 == -1 || b2 == -1 || b3 == -1 || b4 == -1) {
- //if found "no data" just return null
+ //if found "no data" just return null
throw new Base64DecodingException("decoding.general");
}
decodedData[encodedIndex++] = (byte)(b1 << 2 | b2 >> 4) ;
decodedData[encodedIndex++] = (byte)(((b2 & 0xf) << 4) |((b3 >> 2) & 0xf));
decodedData[encodedIndex++] = (byte)(b3 << 6 | b4 );
- }
+ }
return decodedData;
}
@@ -586,7 +586,7 @@ public class Base64 {
* @throws IOException
* @throws Base64DecodingException
*/
- public static final void decode(String base64Data, OutputStream os)
+ public static final void decode(String base64Data, OutputStream os)
throws Base64DecodingException, IOException {
byte[] bytes = new byte[base64Data.length()];
int len = getBytesInternal(base64Data, bytes);
@@ -601,13 +601,13 @@ public class Base64 {
* @throws IOException
* @throws Base64DecodingException
*/
- public static final void decode(byte[] base64Data, OutputStream os)
- throws Base64DecodingException, IOException {
+ public static final void decode(byte[] base64Data, OutputStream os)
+ throws Base64DecodingException, IOException {
decode(base64Data, os, -1);
}
- protected static final void decode(byte[] base64Data, OutputStream os, int len)
- throws Base64DecodingException, IOException {
+ protected static final void decode(byte[] base64Data, OutputStream os, int len)
+ throws Base64DecodingException, IOException {
// remove white spaces
if (len == -1) {
len = removeWhiteSpace(base64Data);
@@ -628,7 +628,7 @@ public class Base64 {
byte b1 = 0, b2 = 0, b3 = 0, b4 = 0;
int i = 0;
- int dataIndex = 0;
+ int dataIndex = 0;
//the begin
for (i = numberQuadruple - 1; i > 0; i--) {
@@ -644,7 +644,7 @@ public class Base64 {
os.write((byte)(b1 << 2 | b2 >> 4));
os.write((byte)(((b2 & 0xf) << 4 ) | ((b3 >> 2) & 0xf)));
os.write((byte)(b3 << 6 | b4));
- }
+ }
b1 = base64Alphabet[base64Data[dataIndex++]];
b2 = base64Alphabet[base64Data[dataIndex++]];
@@ -662,19 +662,19 @@ public class Base64 {
if ((b2 & 0xf) != 0) { //last 4 bits should be zero
throw new Base64DecodingException("decoding.general");
}
- os.write((byte)(b1 << 2 | b2 >> 4));
- } else if (!isPad(d3) && isPad(d4)) { //One PAD e.g. 3cQ[Pad]
+ os.write((byte)(b1 << 2 | b2 >> 4));
+ } else if (!isPad(d3) && isPad(d4)) { //One PAD e.g. 3cQ[Pad]
if ((b3 & 0x3 ) != 0) { //last 2 bits should be zero
throw new Base64DecodingException("decoding.general");
}
os.write((byte)(b1 << 2 | b2 >> 4));
- os.write((byte)(((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf)));
+ os.write((byte)(((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf)));
} else {
//an error like "3c[Pad]r", "3cdX", "3cXd", "3cXX" where X is non data
throw new Base64DecodingException("decoding.general");
}
} else {
- //No PAD e.g 3cQl
+ //No PAD e.g 3cQl
os.write((byte)(b1 << 2 | b2 >> 4));
os.write( (byte)(((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf)));
os.write((byte)(b3 << 6 | b4));
@@ -689,10 +689,10 @@ public class Base64 {
* @throws IOException
* @throws Base64DecodingException
*/
- public static final void decode(InputStream is, OutputStream os)
+ public static final void decode(InputStream is, OutputStream os)
throws Base64DecodingException, IOException {
//byte decodedData[] = null;
- byte b1 = 0, b2 = 0, b3 = 0, b4 = 0;
+ byte b1 = 0, b2 = 0, b3 = 0, b4 = 0;
int index = 0;
byte[] data = new byte[4];
@@ -708,13 +708,13 @@ public class Base64 {
if (index == 3) {
data[index++] = (byte)is.read();
}
- break;
+ break;
}
if ((data[index++] = readed) == -1) {
//if found "no data" just return null
throw new Base64DecodingException("decoding.general");
- }
+ }
if (index != 4) {
continue;
@@ -728,7 +728,7 @@ public class Base64 {
os.write((byte)(b1 << 2 | b2 >> 4));
os.write((byte)(((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf)));
os.write((byte)(b3 << 6 | b4));
- }
+ }
byte d1 = data[0], d2 = data[1], d3 = data[2], d4 = data[3];
b1 = base64Alphabet[d1];
@@ -740,20 +740,20 @@ public class Base64 {
if ((b2 & 0xf) != 0) { //last 4 bits should be zero
throw new Base64DecodingException("decoding.general");
}
- os.write((byte)(b1 << 2 | b2 >> 4));
+ os.write((byte)(b1 << 2 | b2 >> 4));
} else if (!isPad(d3) && isPad(d4)) { //One PAD e.g. 3cQ[Pad]
b3 = base64Alphabet[d3];
if ((b3 & 0x3) != 0) { //last 2 bits should be zero
throw new Base64DecodingException("decoding.general");
}
os.write((byte)(b1 << 2 | b2 >> 4));
- os.write((byte)(((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf)));
+ os.write((byte)(((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf)));
} else {
//an error like "3c[Pad]r", "3cdX", "3cXd", "3cXX" where X is non data
throw new Base64DecodingException("decoding.general");
}
} else {
- //No PAD e.g 3cQl
+ //No PAD e.g 3cQl
os.write((byte)(b1 << 2 | b2 >> 4));
os.write((byte)(((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf)));
os.write((byte)(b3 << 6 | b4));
@@ -762,7 +762,7 @@ public class Base64 {
/**
* remove WhiteSpace from MIME containing encoded Base64 data.
- *
+ *
* @param data the byte array of base64 data (with WS)
* @return the new length
*/
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/ClassLoaderUtils.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/ClassLoaderUtils.java?rev=1720201&r1=1720200&r2=1720201&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/ClassLoaderUtils.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/ClassLoaderUtils.java Tue Dec 15 17:13:17 2015
@@ -33,13 +33,13 @@ import java.util.List;
* verify any change on 6 different application servers.
*/
public final class ClassLoaderUtils {
-
+
private static final org.slf4j.Logger log =
org.slf4j.LoggerFactory.getLogger(ClassLoaderUtils.class);
-
+
private ClassLoaderUtils() {
}
-
+
/**
* Load a given resource. <p/> This method will try to load the resource
* using the following methods (in order):
@@ -48,7 +48,7 @@ public final class ClassLoaderUtils {
* <li>From ClassLoaderUtil.class.getClassLoader()
* <li>callingClass.getClassLoader()
* </ul>
- *
+ *
* @param resourceName The name of the resource to load
* @param callingClass The Class object of the calling object
*/
@@ -56,7 +56,7 @@ public final class ClassLoaderUtils {
URL url = Thread.currentThread().getContextClassLoader().getResource(resourceName);
if (url == null && resourceName.startsWith("/")) {
//certain classloaders need it without the leading /
- url =
+ url =
Thread.currentThread().getContextClassLoader().getResource(
resourceName.substring(1)
);
@@ -85,14 +85,14 @@ public final class ClassLoaderUtils {
if (url == null) {
url = callingClass.getResource(resourceName);
}
-
+
if (url == null && resourceName != null && resourceName.charAt(0) != '/') {
return getResource('/' + resourceName, callingClass);
}
return url;
}
-
+
/**
* Load a given resources. <p/> This method will try to load the resources
* using the following methods (in order):
@@ -101,7 +101,7 @@ public final class ClassLoaderUtils {
* <li>From ClassLoaderUtil.class.getClassLoader()
* <li>callingClass.getClassLoader()
* </ul>
- *
+ *
* @param resourceName The name of the resource to load
* @param callingClass The Class object of the calling object
*/
@@ -114,7 +114,7 @@ public final class ClassLoaderUtils {
public URL nextElement() {
return null;
}
-
+
};
try {
urls = Thread.currentThread().getContextClassLoader().getResources(resourceName);
@@ -127,7 +127,7 @@ public final class ClassLoaderUtils {
if (!urls.hasMoreElements() && resourceName.startsWith("/")) {
//certain classloaders need it without the leading /
try {
- urls =
+ urls =
Thread.currentThread().getContextClassLoader().getResources(
resourceName.substring(1)
);
@@ -190,7 +190,7 @@ public final class ClassLoaderUtils {
ret.add(urls.nextElement());
}
-
+
if (ret.isEmpty() && resourceName != null && resourceName.charAt(0) != '/') {
return getResources('/' + resourceName, callingClass);
}
@@ -201,7 +201,7 @@ public final class ClassLoaderUtils {
/**
* This is a convenience method to load a resource as a stream. <p/> The
* algorithm used to find the resource is given in getResource()
- *
+ *
* @param resourceName The name of the resource to load
* @param callingClass The Class object of the calling object
*/
@@ -227,7 +227,7 @@ public final class ClassLoaderUtils {
* <li>From ClassLoaderUtil.class.getClassLoader()
* <li>From the callingClass.getClassLoader()
* </ul>
- *
+ *
* @param className The name of the class to load
* @param callingClass The Class object of the calling object
* @throws ClassNotFoundException If the class cannot be found anywhere.
@@ -239,7 +239,7 @@ public final class ClassLoaderUtils {
if (cl != null) {
return cl.loadClass(className);
- }
+ }
} catch (ClassNotFoundException e) {
if (log.isDebugEnabled()) {
log.debug(e.getMessage(), e);
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/Constants.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/Constants.java?rev=1720201&r1=1720200&r2=1720201&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/Constants.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/Constants.java Tue Dec 15 17:13:17 2015
@@ -44,54 +44,54 @@ public final class Constants {
exceptionMessagesResourceBundleDir + "/" + "xmlsecurity";
/**
- * The URL of the
+ * The URL of the
* <A HREF="http://www.w3.org/TR/2001/CR-xmldsig-core-20010419/">XML Signature specification</A>
*/
- public static final String SIGNATURESPECIFICATION_URL =
+ public static final String SIGNATURESPECIFICATION_URL =
"http://www.w3.org/TR/2001/CR-xmldsig-core-20010419/";
/**
- * The namespace of the
+ * The namespace of the
* <A HREF="http://www.w3.org/TR/2001/CR-xmldsig-core-20010419/">XML Signature specification</A>
*/
public static final String SignatureSpecNS = "http://www.w3.org/2000/09/xmldsig#";
-
+
/**
- * The namespace of the
+ * The namespace of the
* <A HREF="http://www.w3.org/TR/xmldsig-core1/">XML Signature specification</A>
*/
public static final String SignatureSpec11NS = "http://www.w3.org/2009/xmldsig11#";
-
+
/** The URL for more algorithms **/
public static final String MoreAlgorithmsSpecNS = "http://www.w3.org/2001/04/xmldsig-more#";
-
+
/** The (newer) URL for more algorithms **/
public static final String XML_DSIG_NS_MORE_07_05 = "http://www.w3.org/2007/05/xmldsig-more#";
-
+
/** The URI for XML spec*/
public static final String XML_LANG_SPACE_SpecNS = "http://www.w3.org/XML/1998/namespace";
-
+
/** The URI for XMLNS spec*/
public static final String NamespaceSpecNS = "http://www.w3.org/2000/xmlns/";
/** Tag of Attr Algorithm**/
public static final String _ATT_ALGORITHM = "Algorithm";
-
+
/** Tag of Attr URI**/
public static final String _ATT_URI = "URI";
-
+
/** Tag of Attr Type**/
public static final String _ATT_TYPE = "Type";
-
+
/** Tag of Attr Id**/
public static final String _ATT_ID = "Id";
-
+
/** Tag of Attr MimeType**/
public static final String _ATT_MIMETYPE = "MimeType";
-
+
/** Tag of Attr Encoding**/
public static final String _ATT_ENCODING = "Encoding";
-
+
/** Tag of Attr Target**/
public static final String _ATT_TARGET = "Target";
@@ -107,136 +107,136 @@ public final class Constants {
/** Tag of Element CanonicalizationMethod **/
public static final String _TAG_CANONICALIZATIONMETHOD = "CanonicalizationMethod";
-
+
/** Tag of Element DigestMethod **/
public static final String _TAG_DIGESTMETHOD = "DigestMethod";
-
+
/** Tag of Element DigestValue **/
public static final String _TAG_DIGESTVALUE = "DigestValue";
-
+
/** Tag of Element Manifest **/
public static final String _TAG_MANIFEST = "Manifest";
-
+
/** Tag of Element Methods **/
public static final String _TAG_METHODS = "Methods";
-
+
/** Tag of Element Object **/
public static final String _TAG_OBJECT = "Object";
-
+
/** Tag of Element Reference **/
public static final String _TAG_REFERENCE = "Reference";
-
+
/** Tag of Element Signature **/
public static final String _TAG_SIGNATURE = "Signature";
-
+
/** Tag of Element SignatureMethod **/
public static final String _TAG_SIGNATUREMETHOD = "SignatureMethod";
-
+
/** Tag of Element HMACOutputLength **/
public static final String _TAG_HMACOUTPUTLENGTH = "HMACOutputLength";
-
+
/** Tag of Element SignatureProperties **/
public static final String _TAG_SIGNATUREPROPERTIES = "SignatureProperties";
-
+
/** Tag of Element SignatureProperty **/
public static final String _TAG_SIGNATUREPROPERTY = "SignatureProperty";
-
+
/** Tag of Element SignatureValue **/
public static final String _TAG_SIGNATUREVALUE = "SignatureValue";
-
+
/** Tag of Element SignedInfo **/
public static final String _TAG_SIGNEDINFO = "SignedInfo";
-
+
/** Tag of Element Transform **/
public static final String _TAG_TRANSFORM = "Transform";
-
+
/** Tag of Element Transforms **/
public static final String _TAG_TRANSFORMS = "Transforms";
-
+
/** Tag of Element XPath **/
public static final String _TAG_XPATH = "XPath";
-
+
/** Tag of Element KeyInfo **/
public static final String _TAG_KEYINFO = "KeyInfo";
-
+
/** Tag of Element KeyName **/
public static final String _TAG_KEYNAME = "KeyName";
-
+
/** Tag of Element KeyValue **/
public static final String _TAG_KEYVALUE = "KeyValue";
-
+
/** Tag of Element RetrievalMethod **/
public static final String _TAG_RETRIEVALMETHOD = "RetrievalMethod";
-
+
/** Tag of Element X509Data **/
public static final String _TAG_X509DATA = "X509Data";
-
+
/** Tag of Element PGPData **/
public static final String _TAG_PGPDATA = "PGPData";
-
+
/** Tag of Element SPKIData **/
public static final String _TAG_SPKIDATA = "SPKIData";
-
+
/** Tag of Element MgmtData **/
public static final String _TAG_MGMTDATA = "MgmtData";
-
+
/** Tag of Element RSAKeyValue **/
public static final String _TAG_RSAKEYVALUE = "RSAKeyValue";
-
+
/** Tag of Element Exponent **/
public static final String _TAG_EXPONENT = "Exponent";
-
+
/** Tag of Element Modulus **/
public static final String _TAG_MODULUS = "Modulus";
-
+
/** Tag of Element DSAKeyValue **/
public static final String _TAG_DSAKEYVALUE = "DSAKeyValue";
-
+
/** Tag of Element P **/
public static final String _TAG_P = "P";
-
+
/** Tag of Element Q **/
public static final String _TAG_Q = "Q";
-
+
/** Tag of Element G **/
public static final String _TAG_G = "G";
-
+
/** Tag of Element Y **/
public static final String _TAG_Y = "Y";
-
+
/** Tag of Element J **/
public static final String _TAG_J = "J";
-
+
/** Tag of Element Seed **/
public static final String _TAG_SEED = "Seed";
-
+
/** Tag of Element PgenCounter **/
public static final String _TAG_PGENCOUNTER = "PgenCounter";
-
+
/** Tag of Element rawX509Certificate **/
public static final String _TAG_RAWX509CERTIFICATE = "rawX509Certificate";
-
+
/** Tag of Element X509IssuerSerial **/
public static final String _TAG_X509ISSUERSERIAL= "X509IssuerSerial";
-
+
/** Tag of Element X509SKI **/
public static final String _TAG_X509SKI = "X509SKI";
-
+
/** Tag of Element X509SubjectName **/
public static final String _TAG_X509SUBJECTNAME = "X509SubjectName";
-
+
/** Tag of Element X509Certificate **/
public static final String _TAG_X509CERTIFICATE = "X509Certificate";
-
+
/** Tag of Element X509CRL **/
public static final String _TAG_X509CRL = "X509CRL";
-
+
/** Tag of Element X509IssuerName **/
public static final String _TAG_X509ISSUERNAME = "X509IssuerName";
-
+
/** Tag of Element X509SerialNumber **/
public static final String _TAG_X509SERIALNUMBER = "X509SerialNumber";
-
+
/** Tag of Element PGPKeyID **/
public static final String _TAG_PGPKEYID = "PGPKeyID";
@@ -245,13 +245,13 @@ public final class Constants {
/** Tag of Element PGPKeyPacket **/
public static final String _TAG_DERENCODEDKEYVALUE = "DEREncodedKeyValue";
-
+
/** Tag of Element PGPKeyPacket **/
public static final String _TAG_KEYINFOREFERENCE = "KeyInfoReference";
-
+
/** Tag of Element PGPKeyPacket **/
public static final String _TAG_X509DIGEST = "X509Digest";
-
+
/** Tag of Element SPKISexp **/
public static final String _TAG_SPKISEXP = "SPKISexp";
@@ -262,7 +262,7 @@ public final class Constants {
* @see <A HREF="http://www.ietf.org/internet-drafts/draft-blake-wilson-xmldsig-ecdsa-02.txt">
* draft-blake-wilson-xmldsig-ecdsa-02.txt</A>
*/
- public static final String ALGO_ID_SIGNATURE_ECDSA_CERTICOM =
+ public static final String ALGO_ID_SIGNATURE_ECDSA_CERTICOM =
"http://www.certicom.com/2000/11/xmlecdsig#ecdsa-sha1";
private Constants() {
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/DOMNamespaceContext.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/DOMNamespaceContext.java?rev=1720201&r1=1720200&r2=1720201&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/DOMNamespaceContext.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/DOMNamespaceContext.java Tue Dec 15 17:13:17 2015
@@ -32,13 +32,13 @@ import org.w3c.dom.Node;
/**
*/
public class DOMNamespaceContext implements NamespaceContext {
-
+
private Map<String, String> namespaceMap = new HashMap<String, String>();
-
+
public DOMNamespaceContext(Node contextNode) {
addNamespaces(contextNode);
}
-
+
public String getNamespaceURI(String arg0) {
return namespaceMap.get(arg0);
}
@@ -56,7 +56,7 @@ public class DOMNamespaceContext impleme
public Iterator<String> getPrefixes(String arg0) {
return namespaceMap.keySet().iterator();
}
-
+
private void addNamespaces(Node element) {
if (element.getParentNode() != null) {
addNamespaces(element.getParentNode());
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/DigesterOutputStream.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/DigesterOutputStream.java?rev=1720201&r1=1720200&r2=1720201&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/DigesterOutputStream.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/DigesterOutputStream.java Tue Dec 15 17:13:17 2015
@@ -29,7 +29,7 @@ import org.apache.xml.security.algorithm
public class DigesterOutputStream extends ByteArrayOutputStream {
private static final org.slf4j.Logger log =
org.slf4j.LoggerFactory.getLogger(DigesterOutputStream.class);
-
+
final MessageDigestAlgorithm mda;
/**
@@ -63,9 +63,9 @@ public class DigesterOutputStream extend
}
/**
- * @return the digest value
+ * @return the digest value
*/
public byte[] getDigestValue() {
- return mda.digest();
+ return mda.digest();
}
}