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 2012/05/04 12:42:46 UTC
svn commit: r1333869 [1/2] - in /santuario/xml-security-java/trunk/src:
main/java/javax/xml/crypto/dsig/ main/java/javax/xml/crypto/dsig/keyinfo/
main/java/org/apache/jcp/xml/dsig/internal/dom/
main/java/org/apache/xml/security/ main/java/org/apache/xm...
Author: coheigea
Date: Fri May 4 10:42:44 2012
New Revision: 1333869
URL: http://svn.apache.org/viewvc?rev=1333869&view=rev
Log:
More cleanup
Modified:
santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/CanonicalizationMethod.java
santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/DigestMethod.java
santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/Manifest.java
santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/SignatureMethod.java
santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/SignatureProperties.java
santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/Transform.java
santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/XMLObject.java
santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/XMLSignature.java
santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/keyinfo/KeyValue.java
santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/keyinfo/PGPData.java
santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/keyinfo/X509Data.java
santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/ApacheCanonicalizer.java
santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/ApacheData.java
santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/ApacheTransform.java
santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMKeyInfo.java
santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMKeyInfoFactory.java
santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/Init.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/SignatureAlgorithm.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer11.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/CanonicalizerBase.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/CipherData.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/CipherReference.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/ReferenceList.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/XMLCipher.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/XMLCipherParameters.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/KeyInfo.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/content/X509Data.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/content/keyvalues/DSAKeyValue.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/content/keyvalues/KeyValueContent.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/keyresolver/KeyResolver.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/keyresolver/KeyResolverSpi.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/RetrievalMethodResolver.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/SecretKeyResolver.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/SingleKeyResolver.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/X509IssuerSerialResolver.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/X509SKIResolver.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/X509SubjectNameResolver.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/signature/NodeFilter.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/signature/ObjectContainer.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/signature/Reference.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/signature/SignatureProperty.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/signature/XMLSignature.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/signature/XMLSignatureInput.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/ElementChecker.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/UnsyncBufferedOutputStream.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/XMLUtils.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/XPathAPI.java
santuario/xml-security-java/trunk/src/test/java/javax/xml/crypto/test/dsig/keyinfo/KeyInfoTest.java
Modified: santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/CanonicalizationMethod.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/CanonicalizationMethod.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/CanonicalizationMethod.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/CanonicalizationMethod.java Fri May 4 10:42:44 2012
@@ -59,7 +59,7 @@ public interface CanonicalizationMethod
* The <a href="http://www.w3.org/TR/2001/REC-xml-c14n-20010315">Canonical
* XML (without comments)</a> canonicalization method algorithm URI.
*/
- static final String INCLUSIVE =
+ String INCLUSIVE =
"http://www.w3.org/TR/2001/REC-xml-c14n-20010315";
/**
@@ -67,7 +67,7 @@ public interface CanonicalizationMethod
* <a href="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments">
* Canonical XML with comments</a> canonicalization method algorithm URI.
*/
- static final String INCLUSIVE_WITH_COMMENTS =
+ String INCLUSIVE_WITH_COMMENTS =
"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments";
/**
@@ -75,7 +75,7 @@ public interface CanonicalizationMethod
* Canonical XML (without comments)</a> canonicalization method algorithm
* URI.
*/
- static final String EXCLUSIVE =
+ String EXCLUSIVE =
"http://www.w3.org/2001/10/xml-exc-c14n#";
/**
@@ -83,7 +83,7 @@ public interface CanonicalizationMethod
* Exclusive Canonical XML with comments</a> canonicalization method
* algorithm URI.
*/
- static final String EXCLUSIVE_WITH_COMMENTS =
+ String EXCLUSIVE_WITH_COMMENTS =
"http://www.w3.org/2001/10/xml-exc-c14n#WithComments";
/**
Modified: santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/DigestMethod.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/DigestMethod.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/DigestMethod.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/DigestMethod.java Fri May 4 10:42:44 2012
@@ -59,25 +59,25 @@ public interface DigestMethod extends XM
* The <a href="http://www.w3.org/2000/09/xmldsig#sha1">
* SHA1</a> digest method algorithm URI.
*/
- static final String SHA1 = "http://www.w3.org/2000/09/xmldsig#sha1";
+ String SHA1 = "http://www.w3.org/2000/09/xmldsig#sha1";
/**
* The <a href="http://www.w3.org/2001/04/xmlenc#sha256">
* SHA256</a> digest method algorithm URI.
*/
- static final String SHA256 = "http://www.w3.org/2001/04/xmlenc#sha256";
+ String SHA256 = "http://www.w3.org/2001/04/xmlenc#sha256";
/**
* The <a href="http://www.w3.org/2001/04/xmlenc#sha512">
* SHA512</a> digest method algorithm URI.
*/
- static final String SHA512 = "http://www.w3.org/2001/04/xmlenc#sha512";
+ String SHA512 = "http://www.w3.org/2001/04/xmlenc#sha512";
/**
* The <a href="http://www.w3.org/2001/04/xmlenc#ripemd160">
* RIPEMD-160</a> digest method algorithm URI.
*/
- static final String RIPEMD160 = "http://www.w3.org/2001/04/xmlenc#ripemd160";
+ String RIPEMD160 = "http://www.w3.org/2001/04/xmlenc#ripemd160";
/**
* Returns the algorithm-specific input parameters associated with this
Modified: santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/Manifest.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/Manifest.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/Manifest.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/Manifest.java Fri May 4 10:42:44 2012
@@ -65,7 +65,7 @@ public interface Manifest extends XMLStr
* specified as the value of the <code>type</code> parameter of the
* {@link Reference} class to identify the referent's type).
*/
- static final String TYPE = "http://www.w3.org/2000/09/xmldsig#Manifest";
+ String TYPE = "http://www.w3.org/2000/09/xmldsig#Manifest";
/**
* Returns the Id of this <code>Manifest</code>.
Modified: santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/SignatureMethod.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/SignatureMethod.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/SignatureMethod.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/SignatureMethod.java Fri May 4 10:42:44 2012
@@ -60,21 +60,21 @@ public interface SignatureMethod extends
* The <a href="http://www.w3.org/2000/09/xmldsig#dsa-sha1">DSAwithSHA1</a>
* (DSS) signature method algorithm URI.
*/
- static final String DSA_SHA1 =
+ String DSA_SHA1 =
"http://www.w3.org/2000/09/xmldsig#dsa-sha1";
/**
* The <a href="http://www.w3.org/2000/09/xmldsig#rsa-sha1">RSAwithSHA1</a>
* (PKCS #1) signature method algorithm URI.
*/
- static final String RSA_SHA1 =
+ String RSA_SHA1 =
"http://www.w3.org/2000/09/xmldsig#rsa-sha1";
/**
* The <a href="http://www.w3.org/2000/09/xmldsig#hmac-sha1">HMAC-SHA1</a>
* MAC signature method algorithm URI
*/
- static final String HMAC_SHA1 =
+ String HMAC_SHA1 =
"http://www.w3.org/2000/09/xmldsig#hmac-sha1";
/**
Modified: santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/SignatureProperties.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/SignatureProperties.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/SignatureProperties.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/SignatureProperties.java Fri May 4 10:42:44 2012
@@ -64,7 +64,7 @@ public interface SignatureProperties ext
* can be specified as the value of the <code>type</code> parameter of the
* {@link Reference} class to identify the referent's type).
*/
- static final String TYPE =
+ String TYPE =
"http://www.w3.org/2000/09/xmldsig#SignatureProperties";
/**
Modified: santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/Transform.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/Transform.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/Transform.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/Transform.java Fri May 4 10:42:44 2012
@@ -64,32 +64,32 @@ public interface Transform extends XMLSt
* The <a href="http://www.w3.org/2000/09/xmldsig#base64">Base64</a>
* transform algorithm URI.
*/
- static final String BASE64 = "http://www.w3.org/2000/09/xmldsig#base64";
+ String BASE64 = "http://www.w3.org/2000/09/xmldsig#base64";
/**
* The <a href="http://www.w3.org/2000/09/xmldsig#enveloped-signature">
* Enveloped Signature</a> transform algorithm URI.
*/
- static final String ENVELOPED =
+ String ENVELOPED =
"http://www.w3.org/2000/09/xmldsig#enveloped-signature";
/**
* The <a href="http://www.w3.org/TR/1999/REC-xpath-19991116">XPath</a>
* transform algorithm URI.
*/
- static final String XPATH = "http://www.w3.org/TR/1999/REC-xpath-19991116";
+ String XPATH = "http://www.w3.org/TR/1999/REC-xpath-19991116";
/**
* The <a href="http://www.w3.org/2002/06/xmldsig-filter2">
* XPath Filter 2</a> transform algorithm URI.
*/
- static final String XPATH2 = "http://www.w3.org/2002/06/xmldsig-filter2";
+ String XPATH2 = "http://www.w3.org/2002/06/xmldsig-filter2";
/**
* The <a href="http://www.w3.org/TR/1999/REC-xslt-19991116">XSLT</a>
* transform algorithm URI.
*/
- static final String XSLT = "http://www.w3.org/TR/1999/REC-xslt-19991116";
+ String XSLT = "http://www.w3.org/TR/1999/REC-xslt-19991116";
/**
* Returns the algorithm-specific input parameters associated with this
Modified: santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/XMLObject.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/XMLObject.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/XMLObject.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/XMLObject.java Fri May 4 10:42:44 2012
@@ -80,7 +80,7 @@ public interface XMLObject extends XMLSt
* specified as the value of the <code>type</code> parameter of the
* {@link Reference} class to identify the referent's type).
*/
- static final String TYPE = "http://www.w3.org/2000/09/xmldsig#Object";
+ String TYPE = "http://www.w3.org/2000/09/xmldsig#Object";
/**
* Returns an {@link java.util.Collections#unmodifiableList unmodifiable
Modified: santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/XMLSignature.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/XMLSignature.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/XMLSignature.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/XMLSignature.java Fri May 4 10:42:44 2012
@@ -84,7 +84,7 @@ public interface XMLSignature extends XM
* The XML Namespace URI of the W3C Recommendation for XML-Signature
* Syntax and Processing.
*/
- static final String XMLNS = "http://www.w3.org/2000/09/xmldsig#";
+ String XMLNS = "http://www.w3.org/2000/09/xmldsig#";
/**
* Validates the signature according to the
Modified: santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/keyinfo/KeyValue.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/keyinfo/KeyValue.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/keyinfo/KeyValue.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/keyinfo/KeyValue.java Fri May 4 10:42:44 2012
@@ -105,7 +105,7 @@ public interface KeyValue extends XMLStr
* {@link RetrievalMethod} class to describe a remote
* <code>DSAKeyValue</code> structure.
*/
- static final String DSA_TYPE =
+ String DSA_TYPE =
"http://www.w3.org/2000/09/xmldsig#DSAKeyValue";
/**
@@ -115,7 +115,7 @@ public interface KeyValue extends XMLStr
* {@link RetrievalMethod} class to describe a remote
* <code>RSAKeyValue</code> structure.
*/
- static final String RSA_TYPE =
+ String RSA_TYPE =
"http://www.w3.org/2000/09/xmldsig#RSAKeyValue";
/**
Modified: santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/keyinfo/PGPData.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/keyinfo/PGPData.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/keyinfo/PGPData.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/keyinfo/PGPData.java Fri May 4 10:42:44 2012
@@ -76,7 +76,7 @@ public interface PGPData extends XMLStru
* value of the <code>type</code> parameter of the {@link RetrievalMethod}
* class to describe a remote <code>PGPData</code> structure.
*/
- static final String TYPE = "http://www.w3.org/2000/09/xmldsig#PGPData";
+ String TYPE = "http://www.w3.org/2000/09/xmldsig#PGPData";
/**
* Returns the PGP public key identifier of this <code>PGPData</code> as
Modified: santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/keyinfo/X509Data.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/keyinfo/X509Data.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/keyinfo/X509Data.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/javax/xml/crypto/dsig/keyinfo/X509Data.java Fri May 4 10:42:44 2012
@@ -83,7 +83,7 @@ public interface X509Data extends XMLStr
* {@link RetrievalMethod} class to describe a remote
* <code>X509Data</code> structure.
*/
- static final String TYPE = "http://www.w3.org/2000/09/xmldsig#X509Data";
+ String TYPE = "http://www.w3.org/2000/09/xmldsig#X509Data";
/**
* URI identifying the binary (ASN.1 DER) X.509 Certificate KeyInfo type:
@@ -91,7 +91,7 @@ public interface X509Data extends XMLStr
* specified as the value of the <code>type</code> parameter of the
* {@link RetrievalMethod} class to describe a remote X509 Certificate.
*/
- static final String RAW_X509_CERTIFICATE_TYPE =
+ String RAW_X509_CERTIFICATE_TYPE =
"http://www.w3.org/2000/09/xmldsig#rawX509Certificate";
/**
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/ApacheCanonicalizer.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/ApacheCanonicalizer.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/ApacheCanonicalizer.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/ApacheCanonicalizer.java Fri May 4 10:42:44 2012
@@ -71,6 +71,9 @@ public abstract class ApacheCanonicalize
throw new ClassCastException
("context must be of type DOMCryptoContext");
}
+ if (parent == null || !(parent instanceof javax.xml.crypto.dom.DOMStructure)) {
+ throw new ClassCastException("parent must be of type DOMStructure");
+ }
transformElem = (Element)
((javax.xml.crypto.dom.DOMStructure)parent).getNode();
ownerDoc = DOMUtils.getOwnerDocument(transformElem);
@@ -83,6 +86,9 @@ public abstract class ApacheCanonicalize
throw new ClassCastException
("context must be of type DOMCryptoContext");
}
+ if (parent == null || !(parent instanceof javax.xml.crypto.dom.DOMStructure)) {
+ throw new ClassCastException("parent must be of type DOMStructure");
+ }
transformElem = (Element)
((javax.xml.crypto.dom.DOMStructure)parent).getNode();
ownerDoc = DOMUtils.getOwnerDocument(transformElem);
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/ApacheData.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/ApacheData.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/ApacheData.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/ApacheData.java Fri May 4 10:42:44 2012
@@ -37,5 +37,5 @@ public interface ApacheData extends Data
/**
* Returns the XMLSignatureInput.
*/
- public XMLSignatureInput getXMLSignatureInput();
+ XMLSignatureInput getXMLSignatureInput();
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/ApacheTransform.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/ApacheTransform.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/ApacheTransform.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/ApacheTransform.java Fri May 4 10:42:44 2012
@@ -72,6 +72,9 @@ public abstract class ApacheTransform ex
throw new ClassCastException
("context must be of type DOMCryptoContext");
}
+ if (parent == null || !(parent instanceof javax.xml.crypto.dom.DOMStructure)) {
+ throw new ClassCastException("parent must be of type DOMStructure");
+ }
transformElem = (Element)
((javax.xml.crypto.dom.DOMStructure) parent).getNode();
ownerDoc = DOMUtils.getOwnerDocument(transformElem);
@@ -84,6 +87,9 @@ public abstract class ApacheTransform ex
throw new ClassCastException
("context must be of type DOMCryptoContext");
}
+ if (parent == null || !(parent instanceof javax.xml.crypto.dom.DOMStructure)) {
+ throw new ClassCastException("parent must be of type DOMStructure");
+ }
transformElem = (Element)
((javax.xml.crypto.dom.DOMStructure) parent).getNode();
ownerDoc = DOMUtils.getOwnerDocument(transformElem);
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMKeyInfo.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMKeyInfo.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMKeyInfo.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMKeyInfo.java Fri May 4 10:42:44 2012
@@ -141,8 +141,8 @@ public final class DOMKeyInfo extends DO
public void marshal(XMLStructure parent, XMLCryptoContext context)
throws MarshalException
{
- if (parent == null) {
- throw new NullPointerException("parent is null");
+ if (parent == null || !(parent instanceof javax.xml.crypto.dom.DOMStructure)) {
+ throw new ClassCastException("parent must be of type DOMStructure");
}
Node pNode = ((javax.xml.crypto.dom.DOMStructure)parent).getNode();
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMKeyInfoFactory.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMKeyInfoFactory.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMKeyInfoFactory.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMKeyInfoFactory.java Fri May 4 10:42:44 2012
@@ -121,8 +121,8 @@ public final class DOMKeyInfoFactory ext
public KeyInfo unmarshalKeyInfo(XMLStructure xmlStructure)
throws MarshalException {
- if (xmlStructure == null) {
- throw new NullPointerException("xmlStructure cannot be null");
+ if (xmlStructure == null || !(xmlStructure instanceof javax.xml.crypto.dom.DOMStructure)) {
+ throw new ClassCastException("xmlStructure must be of type DOMStructure");
}
Node node =
((javax.xml.crypto.dom.DOMStructure) xmlStructure).getNode();
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.java Fri May 4 10:42:44 2012
@@ -149,8 +149,8 @@ public final class DOMXMLSignatureFactor
public XMLSignature unmarshalXMLSignature(XMLStructure xmlStructure)
throws MarshalException {
- if (xmlStructure == null) {
- throw new NullPointerException("xmlStructure cannot be null");
+ if (xmlStructure == null || !(xmlStructure instanceof javax.xml.crypto.dom.DOMStructure)) {
+ throw new ClassCastException("xmlStructure must be of type DOMStructure");
}
return unmarshal
(((javax.xml.crypto.dom.DOMStructure) xmlStructure).getNode(),
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/Init.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/Init.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/Init.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/Init.java Fri May 4 10:42:44 2012
@@ -200,16 +200,16 @@ public class Init {
XMLUtils.selectNodes(el.getFirstChild(), CONF_NS, "CanonicalizationMethod");
for (int i = 0; i < list.length; i++) {
- String URI = list[i].getAttributeNS(null, "URI");
- String JAVACLASS =
+ String uri = list[i].getAttributeNS(null, "URI");
+ String javaClass =
list[i].getAttributeNS(null, "JAVACLASS");
try {
- Canonicalizer.register(URI, JAVACLASS);
+ Canonicalizer.register(uri, javaClass);
if (log.isDebugEnabled()) {
- log.debug("Canonicalizer.register(" + URI + ", " + JAVACLASS + ")");
+ log.debug("Canonicalizer.register(" + uri + ", " + javaClass + ")");
}
} catch (ClassNotFoundException e) {
- Object exArgs[] = { URI, JAVACLASS };
+ Object exArgs[] = { uri, javaClass };
log.error(I18n.translate("algorithm.classDoesNotExist", exArgs));
}
}
@@ -220,16 +220,16 @@ public class Init {
XMLUtils.selectNodes(el.getFirstChild(), CONF_NS, "TransformAlgorithm");
for (int i = 0; i < tranElem.length; i++) {
- String URI = tranElem[i].getAttributeNS(null, "URI");
- String JAVACLASS =
+ String uri = tranElem[i].getAttributeNS(null, "URI");
+ String javaClass =
tranElem[i].getAttributeNS(null, "JAVACLASS");
try {
- Transform.register(URI, JAVACLASS);
+ Transform.register(uri, javaClass);
if (log.isDebugEnabled()) {
- log.debug("Transform.register(" + URI + ", " + JAVACLASS + ")");
+ log.debug("Transform.register(" + uri + ", " + javaClass + ")");
}
} catch (ClassNotFoundException e) {
- Object exArgs[] = { URI, JAVACLASS };
+ Object exArgs[] = { uri, javaClass };
log.error(I18n.translate("algorithm.classDoesNotExist", exArgs));
} catch (NoClassDefFoundError ex) {
@@ -256,20 +256,20 @@ public class Init {
XMLUtils.selectNodes(el.getFirstChild(), CONF_NS, "SignatureAlgorithm");
for (int i = 0; i < sigElems.length; i++) {
- String URI = sigElems[i].getAttributeNS(null, "URI");
- String JAVACLASS =
+ String uri = sigElems[i].getAttributeNS(null, "URI");
+ String javaClass =
sigElems[i].getAttributeNS(null, "JAVACLASS");
/** $todo$ handle registering */
try {
- SignatureAlgorithm.register(URI, JAVACLASS);
+ SignatureAlgorithm.register(uri, javaClass);
if (log.isDebugEnabled()) {
- log.debug("SignatureAlgorithm.register(" + URI + ", "
- + JAVACLASS + ")");
+ log.debug("SignatureAlgorithm.register(" + uri + ", "
+ + javaClass + ")");
}
} catch (ClassNotFoundException e) {
- Object exArgs[] = { URI, JAVACLASS };
+ Object exArgs[] = { uri, javaClass };
log.error(I18n.translate("algorithm.classDoesNotExist", exArgs));
}
@@ -281,27 +281,27 @@ public class Init {
XMLUtils.selectNodes(el.getFirstChild(), CONF_NS, "Resolver");
for (int i = 0; i < resolverElem.length; i++) {
- String JAVACLASS =
+ String javaClass =
resolverElem[i].getAttributeNS(null, "JAVACLASS");
- String Description =
+ String description =
resolverElem[i].getAttributeNS(null, "DESCRIPTION");
- if ((Description != null) && (Description.length() > 0)) {
+ if ((description != null) && (description.length() > 0)) {
if (log.isDebugEnabled()) {
- log.debug("Register Resolver: " + JAVACLASS + ": "
- + Description);
+ log.debug("Register Resolver: " + javaClass + ": "
+ + description);
}
} else {
if (log.isDebugEnabled()) {
- log.debug("Register Resolver: " + JAVACLASS
+ log.debug("Register Resolver: " + javaClass
+ ": For unknown purposes");
}
}
try {
- ResourceResolver.register(JAVACLASS);
+ ResourceResolver.register(javaClass);
} catch (Throwable e) {
log.warn(
- "Cannot register:" + JAVACLASS
+ "Cannot register:" + javaClass
+ " perhaps some needed jars are not installed",
e
);
@@ -314,23 +314,23 @@ public class Init {
XMLUtils.selectNodes(el.getFirstChild(), CONF_NS, "Resolver");
List<String> classNames = new ArrayList<String>(resolverElem.length);
for (int i = 0; i < resolverElem.length; i++) {
- String JAVACLASS =
+ String javaClass =
resolverElem[i].getAttributeNS(null, "JAVACLASS");
- String Description =
+ String description =
resolverElem[i].getAttributeNS(null, "DESCRIPTION");
- if ((Description != null) && (Description.length() > 0)) {
+ if ((description != null) && (description.length() > 0)) {
if (log.isDebugEnabled()) {
- log.debug("Register Resolver: " + JAVACLASS + ": "
- + Description);
+ log.debug("Register Resolver: " + javaClass + ": "
+ + description);
}
} else {
if (log.isDebugEnabled()) {
- log.debug("Register Resolver: " + JAVACLASS
+ log.debug("Register Resolver: " + javaClass
+ ": For unknown purposes");
}
}
- classNames.add(JAVACLASS);
+ classNames.add(javaClass);
}
KeyResolver.registerClassNames(classNames);
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/SignatureAlgorithm.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/SignatureAlgorithm.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/SignatureAlgorithm.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/SignatureAlgorithm.java Fri May 4 10:42:44 2012
@@ -79,11 +79,11 @@ public class SignatureAlgorithm extends
*
* @param doc
* @param algorithmURI
- * @param HMACOutputLength
+ * @param hmacOutputLength
* @throws XMLSecurityException
*/
public SignatureAlgorithm(
- Document doc, String algorithmURI, int HMACOutputLength
+ Document doc, String algorithmURI, int hmacOutputLength
) throws XMLSecurityException {
super(doc, algorithmURI);
this.algorithmURI = algorithmURI;
@@ -91,7 +91,7 @@ public class SignatureAlgorithm extends
signatureAlgorithm = getSignatureAlgorithmSpi(algorithmURI);
signatureAlgorithm.engineGetContextFromElement(this.constructionElement);
- signatureAlgorithm.engineSetHMACOutputLength(HMACOutputLength);
+ signatureAlgorithm.engineSetHMACOutputLength(hmacOutputLength);
((IntegrityHmac)signatureAlgorithm).engineAddContextToElement(constructionElement);
}
@@ -99,25 +99,25 @@ public class SignatureAlgorithm extends
* Constructor SignatureAlgorithm
*
* @param element
- * @param BaseURI
+ * @param baseURI
* @throws XMLSecurityException
*/
- public SignatureAlgorithm(Element element, String BaseURI) throws XMLSecurityException {
- this(element, BaseURI, false);
+ public SignatureAlgorithm(Element element, String baseURI) throws XMLSecurityException {
+ this(element, baseURI, false);
}
/**
* Constructor SignatureAlgorithm
*
* @param element
- * @param BaseURI
+ * @param baseURI
* @param secureValidation
* @throws XMLSecurityException
*/
public SignatureAlgorithm(
- Element element, String BaseURI, boolean secureValidation
+ Element element, String baseURI, boolean secureValidation
) throws XMLSecurityException {
- super(element, BaseURI);
+ super(element, baseURI);
algorithmURI = this.getURI();
Attr attr = element.getAttributeNodeNS(null, "Id");
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer11.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer11.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer11.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer11.java Fri May 4 10:42:44 2012
@@ -165,7 +165,9 @@ public abstract class Canonicalizer11 ex
try {
base = joinURI(n.getValue(), base);
} catch (URISyntaxException ue) {
- ue.printStackTrace();
+ if (log.isDebugEnabled()) {
+ log.debug(ue.getMessage(), ue);
+ }
}
}
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/CanonicalizerBase.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/CanonicalizerBase.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/CanonicalizerBase.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/CanonicalizerBase.java Fri May 4 10:42:44 2012
@@ -589,10 +589,10 @@ public abstract class CanonicalizerBase
String NValue = e.getNamespaceURI();
String Name;
if (NName == null || NName.equals("")) {
- NName = "xmlns";
- Name = "xmlns";
+ NName = XMLNS;
+ Name = XMLNS;
} else {
- Name = "xmlns:" + NName;
+ Name = XMLNS + ":" + NName;
}
Attr n = e.getOwnerDocument().createAttributeNS("http://www.w3.org/2000/xmlns/", Name);
n.setValue(NValue);
@@ -628,9 +628,9 @@ public abstract class CanonicalizerBase
handleParent(ele, ns);
}
Attr nsprefix;
- if (((nsprefix = ns.getMappingWithoutRendered("xmlns")) != null)
+ if (((nsprefix = ns.getMappingWithoutRendered(XMLNS)) != null)
&& "".equals(nsprefix.getValue())) {
- ns.addMappingAndRender("xmlns", "", nullNode);
+ ns.addMappingAndRender(XMLNS, "", nullNode);
}
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/CipherData.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/CipherData.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/CipherData.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/CipherData.java Fri May 4 10:42:44 2012
@@ -41,10 +41,10 @@ package org.apache.xml.security.encrypti
public interface CipherData {
/** VALUE_TYPE ASN */
- public static final int VALUE_TYPE = 0x00000001;
+ int VALUE_TYPE = 0x00000001;
/** REFERENCE_TYPE ASN */
- public static final int REFERENCE_TYPE = 0x00000002;
+ int REFERENCE_TYPE = 0x00000002;
/**
* Returns the type of encrypted data contained in the
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/CipherReference.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/CipherReference.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/CipherReference.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/CipherReference.java Fri May 4 10:42:44 2012
@@ -68,7 +68,7 @@ public interface CipherReference {
* with the XMLSignature ResourceResolvers
* @return the URI as an Attribute node
*/
- public Attr getURIAsAttr();
+ Attr getURIAsAttr();
/**
* Returns the <code>Transforms</code> that specifies how to transform the
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/ReferenceList.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/ReferenceList.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/ReferenceList.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/ReferenceList.java Fri May 4 10:42:44 2012
@@ -43,10 +43,10 @@ import java.util.Iterator;
public interface ReferenceList {
/** DATA TAG */
- public static final int DATA_REFERENCE = 0x00000001;
+ int DATA_REFERENCE = 0x00000001;
/** KEY TAG */
- public static final int KEY_REFERENCE = 0x00000002;
+ int KEY_REFERENCE = 0x00000002;
/**
* Adds a reference to this reference list.
@@ -55,21 +55,21 @@ public interface ReferenceList {
* @throws IllegalAccessException if the <code>Reference</code> is not an
* instance of <code>DataReference</code> or <code>KeyReference</code>.
*/
- public void add(Reference reference);
+ void add(Reference reference);
/**
* Removes a reference from the <code>ReferenceList</code>.
*
* @param reference the reference to remove.
*/
- public void remove(Reference reference);
+ void remove(Reference reference);
/**
* Returns the size of the <code>ReferenceList</code>.
*
* @return the size of the <code>ReferenceList</code>.
*/
- public int size();
+ int size();
/**
* Indicates if the <code>ReferenceList</code> is empty.
@@ -77,7 +77,7 @@ public interface ReferenceList {
* @return <code><b>true</b></code> if the <code>ReferenceList</code> is
* empty, else <code><b>false</b></code>.
*/
- public boolean isEmpty();
+ boolean isEmpty();
/**
* Returns an <code>Iterator</code> over all the <code>Reference</code>s
@@ -85,7 +85,7 @@ public interface ReferenceList {
*
* @return Iterator.
*/
- public Iterator<Reference> getReferences();
+ Iterator<Reference> getReferences();
/**
* <code>DataReference</code> factory method. Returns a
@@ -93,7 +93,7 @@ public interface ReferenceList {
* @param uri
* @return a <code>DataReference</code>.
*/
- public Reference newDataReference(String uri);
+ Reference newDataReference(String uri);
/**
* <code>KeyReference</code> factory method. Returns a
@@ -101,5 +101,5 @@ public interface ReferenceList {
* @param uri
* @return a <code>KeyReference</code>.
*/
- public Reference newKeyReference(String uri);
+ Reference newKeyReference(String uri);
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/XMLCipher.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/XMLCipher.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/XMLCipher.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/XMLCipher.java Fri May 4 10:42:44 2012
@@ -284,7 +284,7 @@ public class XMLCipher {
private XMLCipher(
String transformation,
String provider,
- String canon,
+ String canonAlg,
String digestMethod
) throws XMLEncryptionException {
if (log.isDebugEnabled()) {
@@ -300,13 +300,13 @@ public class XMLCipher {
// Create a canonicalizer - used when serializing DOM to octets
// prior to encryption (and for the reverse)
- if (canon == null) {
- // The default is to preserve the physical representation.
- canon = Canonicalizer.ALGO_ID_C14N_PHYSICAL;
- }
-
try {
- this.canon = Canonicalizer.getInstance(canon);
+ if (canonAlg == null) {
+ // The default is to preserve the physical representation.
+ this.canon = Canonicalizer.getInstance(Canonicalizer.ALGO_ID_C14N_PHYSICAL);
+ } else {
+ this.canon = Canonicalizer.getInstance(canonAlg);
+ }
} catch (InvalidCanonicalizerException ice) {
throw new XMLEncryptionException("empty", ice);
}
@@ -1677,8 +1677,8 @@ public class XMLCipher {
if (ki != null) {
try {
// Add an EncryptedKey resolver
- String algorithm = encryptedData.getEncryptionMethod().getAlgorithm();
- EncryptedKeyResolver resolver = new EncryptedKeyResolver(algorithm, kek);
+ String encMethodAlgorithm = encryptedData.getEncryptionMethod().getAlgorithm();
+ EncryptedKeyResolver resolver = new EncryptedKeyResolver(encMethodAlgorithm, kek);
if (internalKeyResolvers != null) {
int size = internalKeyResolvers.size();
for (int i = 0; i < size; i++) {
@@ -2135,9 +2135,9 @@ public class XMLCipher {
*/
CipherReference newCipherReference(Element element) throws XMLEncryptionException {
- Attr URIAttr =
+ Attr uriAttr =
element.getAttributeNodeNS(null, EncryptionConstants._ATT_URI);
- CipherReference result = new CipherReferenceImpl(URIAttr);
+ CipherReference result = new CipherReferenceImpl(uriAttr);
// Find any Transforms
NodeList transformsElements =
@@ -2328,8 +2328,8 @@ public class XMLCipher {
* @return a new EncryptionMethod
*/
EncryptionMethod newEncryptionMethod(Element element) {
- String algorithm = element.getAttributeNS(null, EncryptionConstants._ATT_ALGORITHM);
- EncryptionMethod result = newEncryptionMethod(algorithm);
+ String encAlgorithm = element.getAttributeNS(null, EncryptionConstants._ATT_ALGORITHM);
+ EncryptionMethod result = newEncryptionMethod(encAlgorithm);
Element keySizeElement =
(Element) element.getElementsByTagNameNS(
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/XMLCipherParameters.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/XMLCipherParameters.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/XMLCipherParameters.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/XMLCipherParameters.java Fri May 4 10:42:44 2012
@@ -23,79 +23,60 @@ package org.apache.xml.security.encrypti
*/
public interface XMLCipherParameters {
- /** */
- public static final String AES_128 =
+ String AES_128 =
"http://www.w3.org/2001/04/xmlenc#aes128-cbc";
- /** */
- public static final String AES_256 =
+ String AES_256 =
"http://www.w3.org/2001/04/xmlenc#aes256-cbc";
- /** */
- public static final String AES_192 =
+ String AES_192 =
"http://www.w3.org/2001/04/xmlenc#aes192-cbc";
- /** */
- public static final String RSA_1_5 =
+ String RSA_1_5 =
"http://www.w3.org/2001/04/xmlenc#rsa-1_5";
- /** */
- public static final String RSA_OAEP =
+ String RSA_OAEP =
"http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p";
- /** */
- public static final String DIFFIE_HELLMAN =
+ String DIFFIE_HELLMAN =
"http://www.w3.org/2001/04/xmlenc#dh";
- /** */
- public static final String TRIPLEDES_KEYWRAP =
+ String TRIPLEDES_KEYWRAP =
"http://www.w3.org/2001/04/xmlenc#kw-tripledes";
- /** */
- public static final String AES_128_KEYWRAP =
+ String AES_128_KEYWRAP =
"http://www.w3.org/2001/04/xmlenc#kw-aes128";
- /** */
- public static final String AES_256_KEYWRAP =
+ String AES_256_KEYWRAP =
"http://www.w3.org/2001/04/xmlenc#kw-aes256";
- /** */
- public static final String AES_192_KEYWRAP =
+ String AES_192_KEYWRAP =
"http://www.w3.org/2001/04/xmlenc#kw-aes192";
- /** */
- public static final String SHA1 =
+ String SHA1 =
"http://www.w3.org/2000/09/xmldsig#sha1";
- /** */
- public static final String SHA256 =
+ String SHA256 =
"http://www.w3.org/2001/04/xmlenc#sha256";
- /** */
- public static final String SHA512 =
+ String SHA512 =
"http://www.w3.org/2001/04/xmlenc#sha512";
- /** */
- public static final String RIPEMD_160 =
+ String RIPEMD_160 =
"http://www.w3.org/2001/04/xmlenc#ripemd160";
- /** */
- public static final String XML_DSIG =
+ String XML_DSIG =
"http://www.w3.org/2000/09/xmldsig#";
- /** */
- public static final String N14C_XML =
+ String N14C_XML =
"http://www.w3.org/TR/2001/REC-xml-c14n-20010315";
- /** */
- public static final String N14C_XML_CMMNTS =
+ String N14C_XML_CMMNTS =
"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments";
- /** */
- public static final String EXCL_XML_N14C =
+ String EXCL_XML_N14C =
"http://www.w3.org/2001/10/xml-exc-c14n#";
- /** */
- public static final String EXCL_XML_N14C_CMMNTS =
+ String EXCL_XML_N14C_CMMNTS =
"http://www.w3.org/2001/10/xml-exc-c14n#WithComments";
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/KeyInfo.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/KeyInfo.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/KeyInfo.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/KeyInfo.java Fri May 4 10:42:44 2012
@@ -130,11 +130,11 @@ public class KeyInfo extends SignatureEl
* Constructor KeyInfo
*
* @param element
- * @param BaseURI
+ * @param baseURI
* @throws XMLSecurityException
*/
- public KeyInfo(Element element, String BaseURI) throws XMLSecurityException {
- super(element, BaseURI);
+ public KeyInfo(Element element, String baseURI) throws XMLSecurityException {
+ super(element, baseURI);
Attr attr = element.getAttributeNodeNS(null, "Id");
if (attr != null) {
@@ -154,9 +154,9 @@ public class KeyInfo extends SignatureEl
*
* @param Id ID
*/
- public void setId(String Id) {
- if (Id != null) {
- this.constructionElement.setAttributeNS(null, Constants._ATT_ID, Id);
+ public void setId(String id) {
+ if (id != null) {
+ this.constructionElement.setAttributeNS(null, Constants._ATT_ID, id);
this.constructionElement.setIdAttributeNS(null, Constants._ATT_ID, true);
}
}
@@ -276,12 +276,12 @@ public class KeyInfo extends SignatureEl
/**
* Method addRetrievalMethod
*
- * @param URI
+ * @param uri
* @param transforms
* @param Type
*/
- public void addRetrievalMethod(String URI, Transforms transforms, String Type) {
- this.add(new RetrievalMethod(this.doc, URI, transforms, Type));
+ public void addRetrievalMethod(String uri, Transforms transforms, String Type) {
+ this.add(new RetrievalMethod(this.doc, uri, transforms, Type));
}
/**
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/content/X509Data.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/content/X509Data.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/content/X509Data.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/content/X509Data.java Fri May 4 10:42:44 2012
@@ -55,11 +55,11 @@ public class X509Data extends SignatureE
* Constructor X509Data
*
* @param element
- * @param BaseURI
+ * @param baseURI
* @throws XMLSecurityException
*/
- public X509Data(Element element, String BaseURI) throws XMLSecurityException {
- super(element, BaseURI);
+ public X509Data(Element element, String baseURI) throws XMLSecurityException {
+ super(element, baseURI);
Node sibling = this.constructionElement.getFirstChild();
while (sibling != null) {
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/content/keyvalues/DSAKeyValue.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/content/keyvalues/DSAKeyValue.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/content/keyvalues/DSAKeyValue.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/content/keyvalues/DSAKeyValue.java Fri May 4 10:42:44 2012
@@ -41,11 +41,11 @@ public class DSAKeyValue extends Signatu
* Constructor DSAKeyValue
*
* @param element
- * @param BaseURI
+ * @param baseURI
* @throws XMLSecurityException
*/
- public DSAKeyValue(Element element, String BaseURI) throws XMLSecurityException {
- super(element, BaseURI);
+ public DSAKeyValue(Element element, String baseURI) throws XMLSecurityException {
+ super(element, baseURI);
}
/**
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/content/keyvalues/KeyValueContent.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/content/keyvalues/KeyValueContent.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/content/keyvalues/KeyValueContent.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/content/keyvalues/KeyValueContent.java Fri May 4 10:42:44 2012
@@ -30,6 +30,6 @@ public interface KeyValueContent {
* @return the public key
* @throws XMLSecurityException
*/
- public PublicKey getPublicKey() throws XMLSecurityException;
+ PublicKey getPublicKey() throws XMLSecurityException;
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/keyresolver/KeyResolver.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/keyresolver/KeyResolver.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/keyresolver/KeyResolver.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/keyresolver/KeyResolver.java Fri May 4 10:42:44 2012
@@ -76,14 +76,14 @@ public class KeyResolver {
* Method getX509Certificate
*
* @param element
- * @param BaseURI
+ * @param baseURI
* @param storage
* @return The certificate represented by the element.
*
* @throws KeyResolverException
*/
public static final X509Certificate getX509Certificate(
- Element element, String BaseURI, StorageResolver storage
+ Element element, String baseURI, StorageResolver storage
) throws KeyResolverException {
for (KeyResolver resolver : resolverVector) {
if (resolver == null) {
@@ -99,7 +99,7 @@ public class KeyResolver {
log.debug("check resolvability by class " + resolver.getClass());
}
- X509Certificate cert = resolver.resolveX509Certificate(element, BaseURI, storage);
+ X509Certificate cert = resolver.resolveX509Certificate(element, baseURI, storage);
if (cert != null) {
return cert;
}
@@ -117,14 +117,14 @@ public class KeyResolver {
* Method getPublicKey
*
* @param element
- * @param BaseURI
+ * @param baseURI
* @param storage
* @return the public key contained in the element
*
* @throws KeyResolverException
*/
public static final PublicKey getPublicKey(
- Element element, String BaseURI, StorageResolver storage
+ Element element, String baseURI, StorageResolver storage
) throws KeyResolverException {
for (KeyResolver resolver : resolverVector) {
if (resolver == null) {
@@ -140,7 +140,7 @@ public class KeyResolver {
log.debug("check resolvability by class " + resolver.getClass());
}
- PublicKey cert = resolver.resolvePublicKey(element, BaseURI, storage);
+ PublicKey cert = resolver.resolvePublicKey(element, baseURI, storage);
if (cert != null) {
return cert;
}
@@ -281,45 +281,45 @@ public class KeyResolver {
* Method resolvePublicKey
*
* @param element
- * @param BaseURI
+ * @param baseURI
* @param storage
* @return resolved public key from the registered from the elements
*
* @throws KeyResolverException
*/
public PublicKey resolvePublicKey(
- Element element, String BaseURI, StorageResolver storage
+ Element element, String baseURI, StorageResolver storage
) throws KeyResolverException {
- return resolverSpi.engineLookupAndResolvePublicKey(element, BaseURI, storage);
+ return resolverSpi.engineLookupAndResolvePublicKey(element, baseURI, storage);
}
/**
* Method resolveX509Certificate
*
* @param element
- * @param BaseURI
+ * @param baseURI
* @param storage
* @return resolved X509certificate key from the registered from the elements
*
* @throws KeyResolverException
*/
public X509Certificate resolveX509Certificate(
- Element element, String BaseURI, StorageResolver storage
+ Element element, String baseURI, StorageResolver storage
) throws KeyResolverException {
- return resolverSpi.engineLookupResolveX509Certificate(element, BaseURI, storage);
+ return resolverSpi.engineLookupResolveX509Certificate(element, baseURI, storage);
}
/**
* @param element
- * @param BaseURI
+ * @param baseURI
* @param storage
* @return resolved SecretKey key from the registered from the elements
* @throws KeyResolverException
*/
public SecretKey resolveSecretKey(
- Element element, String BaseURI, StorageResolver storage
+ Element element, String baseURI, StorageResolver storage
) throws KeyResolverException {
- return resolverSpi.engineLookupAndResolveSecretKey(element, BaseURI, storage);
+ return resolverSpi.engineLookupAndResolveSecretKey(element, baseURI, storage);
}
/**
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/keyresolver/KeyResolverSpi.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/keyresolver/KeyResolverSpi.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/keyresolver/KeyResolverSpi.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/keyresolver/KeyResolverSpi.java Fri May 4 10:42:44 2012
@@ -58,11 +58,11 @@ public abstract class KeyResolverSpi {
* This method returns whether the KeyResolverSpi is able to perform the requested action.
*
* @param element
- * @param BaseURI
+ * @param baseURI
* @param storage
* @return whether the KeyResolverSpi is able to perform the requested action.
*/
- public boolean engineCanResolve(Element element, String BaseURI, StorageResolver storage) {
+ public boolean engineCanResolve(Element element, String baseURI, StorageResolver storage) {
throw new UnsupportedOperationException();
}
@@ -70,14 +70,14 @@ public abstract class KeyResolverSpi {
* Method engineResolvePublicKey
*
* @param element
- * @param BaseURI
+ * @param baseURI
* @param storage
* @return resolved public key from the registered from the element.
*
* @throws KeyResolverException
*/
public PublicKey engineResolvePublicKey(
- Element element, String BaseURI, StorageResolver storage
+ Element element, String baseURI, StorageResolver storage
) throws KeyResolverException {
throw new UnsupportedOperationException();
};
@@ -86,20 +86,20 @@ public abstract class KeyResolverSpi {
* Method engineLookupAndResolvePublicKey
*
* @param element
- * @param BaseURI
+ * @param baseURI
* @param storage
* @return resolved public key from the registered from the element.
*
* @throws KeyResolverException
*/
public PublicKey engineLookupAndResolvePublicKey(
- Element element, String BaseURI, StorageResolver storage
+ Element element, String baseURI, StorageResolver storage
) throws KeyResolverException {
KeyResolverSpi tmp = cloneIfNeeded();
- if (!tmp.engineCanResolve(element, BaseURI, storage)) {
+ if (!tmp.engineCanResolve(element, baseURI, storage)) {
return null;
}
- return tmp.engineResolvePublicKey(element, BaseURI, storage);
+ return tmp.engineResolvePublicKey(element, baseURI, storage);
}
private KeyResolverSpi cloneIfNeeded() throws KeyResolverException {
@@ -120,14 +120,14 @@ public abstract class KeyResolverSpi {
* Method engineResolveCertificate
*
* @param element
- * @param BaseURI
+ * @param baseURI
* @param storage
* @return resolved X509Certificate key from the registered from the elements
*
* @throws KeyResolverException
*/
public X509Certificate engineResolveX509Certificate(
- Element element, String BaseURI, StorageResolver storage
+ Element element, String baseURI, StorageResolver storage
) throws KeyResolverException{
throw new UnsupportedOperationException();
};
@@ -136,34 +136,34 @@ public abstract class KeyResolverSpi {
* Method engineLookupResolveX509Certificate
*
* @param element
- * @param BaseURI
+ * @param baseURI
* @param storage
* @return resolved X509Certificate key from the registered from the elements
*
* @throws KeyResolverException
*/
public X509Certificate engineLookupResolveX509Certificate(
- Element element, String BaseURI, StorageResolver storage
+ Element element, String baseURI, StorageResolver storage
) throws KeyResolverException {
KeyResolverSpi tmp = cloneIfNeeded();
- if (!tmp.engineCanResolve(element, BaseURI, storage)) {
+ if (!tmp.engineCanResolve(element, baseURI, storage)) {
return null;
}
- return tmp.engineResolveX509Certificate(element, BaseURI, storage);
+ return tmp.engineResolveX509Certificate(element, baseURI, storage);
}
/**
* Method engineResolveSecretKey
*
* @param element
- * @param BaseURI
+ * @param baseURI
* @param storage
* @return resolved SecretKey key from the registered from the elements
*
* @throws KeyResolverException
*/
public SecretKey engineResolveSecretKey(
- Element element, String BaseURI, StorageResolver storage
+ Element element, String baseURI, StorageResolver storage
) throws KeyResolverException{
throw new UnsupportedOperationException();
};
@@ -172,34 +172,34 @@ public abstract class KeyResolverSpi {
* Method engineLookupAndResolveSecretKey
*
* @param element
- * @param BaseURI
+ * @param baseURI
* @param storage
* @return resolved SecretKey key from the registered from the elements
*
* @throws KeyResolverException
*/
public SecretKey engineLookupAndResolveSecretKey(
- Element element, String BaseURI, StorageResolver storage
+ Element element, String baseURI, StorageResolver storage
) throws KeyResolverException {
KeyResolverSpi tmp = cloneIfNeeded();
- if (!tmp.engineCanResolve(element, BaseURI, storage)) {
+ if (!tmp.engineCanResolve(element, baseURI, storage)) {
return null;
}
- return tmp.engineResolveSecretKey(element, BaseURI, storage);
+ return tmp.engineResolveSecretKey(element, baseURI, storage);
}
/**
* Method engineLookupAndResolvePrivateKey
*
* @param element
- * @param BaseURI
+ * @param baseURI
* @param storage
* @return resolved PrivateKey key from the registered from the elements
*
* @throws KeyResolverException
*/
public PrivateKey engineLookupAndResolvePrivateKey(
- Element element, String BaseURI, StorageResolver storage
+ Element element, String baseURI, StorageResolver storage
) throws KeyResolverException {
// This method was added later, it has no equivalent
// engineResolvePrivateKey() in the old API.
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/RetrievalMethodResolver.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/RetrievalMethodResolver.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/RetrievalMethodResolver.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/RetrievalMethodResolver.java Fri May 4 10:42:44 2012
@@ -75,11 +75,11 @@ public class RetrievalMethodResolver ext
* Method engineResolvePublicKey
* @inheritDoc
* @param element
- * @param BaseURI
+ * @param baseURI
* @param storage
*/
public PublicKey engineLookupAndResolvePublicKey(
- Element element, String BaseURI, StorageResolver storage
+ Element element, String baseURI, StorageResolver storage
) {
if (!XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_RETRIEVALMETHOD)) {
return null;
@@ -87,9 +87,9 @@ public class RetrievalMethodResolver ext
try {
// Create a retrieval method over the given element
- RetrievalMethod rm = new RetrievalMethod(element, BaseURI);
+ RetrievalMethod rm = new RetrievalMethod(element, baseURI);
String type = rm.getType();
- XMLSignatureInput resource = resolveInput(rm, BaseURI, secureValidation);
+ XMLSignatureInput resource = resolveInput(rm, baseURI, secureValidation);
if (RetrievalMethod.TYPE_RAWX509.equals(type)) {
// a raw certificate, direct parsing is done!
X509Certificate cert = getRawCertificate(resource);
@@ -111,8 +111,8 @@ public class RetrievalMethodResolver ext
}
return null;
}
- RetrievalMethod rm2 = new RetrievalMethod(e, BaseURI);
- XMLSignatureInput resource2 = resolveInput(rm2, BaseURI, secureValidation);
+ RetrievalMethod rm2 = new RetrievalMethod(e, baseURI);
+ XMLSignatureInput resource2 = resolveInput(rm2, baseURI, secureValidation);
Element e2 = obtainReferenceElement(resource2);
if (e2 == element) {
if (log.isDebugEnabled()) {
@@ -122,7 +122,7 @@ public class RetrievalMethodResolver ext
}
}
- return resolveKey(e, BaseURI, storage);
+ return resolveKey(e, baseURI, storage);
} catch (XMLSecurityException ex) {
if (log.isDebugEnabled()) {
log.debug("XMLSecurityException", ex);
@@ -151,19 +151,19 @@ public class RetrievalMethodResolver ext
* Method engineResolveX509Certificate
* @inheritDoc
* @param element
- * @param BaseURI
+ * @param baseURI
* @param storage
*/
public X509Certificate engineLookupResolveX509Certificate(
- Element element, String BaseURI, StorageResolver storage) {
+ Element element, String baseURI, StorageResolver storage) {
if (!XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_RETRIEVALMETHOD)) {
return null;
}
try {
- RetrievalMethod rm = new RetrievalMethod(element, BaseURI);
+ RetrievalMethod rm = new RetrievalMethod(element, baseURI);
String type = rm.getType();
- XMLSignatureInput resource = resolveInput(rm, BaseURI, secureValidation);
+ XMLSignatureInput resource = resolveInput(rm, baseURI, secureValidation);
if (RetrievalMethod.TYPE_RAWX509.equals(type)) {
return getRawCertificate(resource);
}
@@ -181,8 +181,8 @@ public class RetrievalMethodResolver ext
}
return null;
}
- RetrievalMethod rm2 = new RetrievalMethod(e, BaseURI);
- XMLSignatureInput resource2 = resolveInput(rm2, BaseURI, secureValidation);
+ RetrievalMethod rm2 = new RetrievalMethod(e, baseURI);
+ XMLSignatureInput resource2 = resolveInput(rm2, baseURI, secureValidation);
Element e2 = obtainReferenceElement(resource2);
if (e2 == element) {
if (log.isDebugEnabled()) {
@@ -192,7 +192,7 @@ public class RetrievalMethodResolver ext
}
}
- return resolveCertificate(e, BaseURI, storage);
+ return resolveCertificate(e, baseURI, storage);
} catch (XMLSecurityException ex) {
if (log.isDebugEnabled()) {
log.debug("XMLSecurityException", ex);
@@ -220,13 +220,13 @@ public class RetrievalMethodResolver ext
/**
* Retrieves a x509Certificate from the given information
* @param e
- * @param BaseURI
+ * @param baseURI
* @param storage
* @return
* @throws KeyResolverException
*/
private static X509Certificate resolveCertificate(
- Element e, String BaseURI, StorageResolver storage
+ Element e, String baseURI, StorageResolver storage
) throws KeyResolverException {
if (log.isDebugEnabled()) {
log.debug("Now we have a {" + e.getNamespaceURI() + "}"
@@ -234,7 +234,7 @@ public class RetrievalMethodResolver ext
}
// An element has been provided
if (e != null) {
- return KeyResolver.getX509Certificate(e, BaseURI, storage);
+ return KeyResolver.getX509Certificate(e, baseURI, storage);
}
return null;
}
@@ -242,13 +242,13 @@ public class RetrievalMethodResolver ext
/**
* Retrieves a PublicKey from the given information
* @param e
- * @param BaseURI
+ * @param baseURI
* @param storage
* @return
* @throws KeyResolverException
*/
private static PublicKey resolveKey(
- Element e, String BaseURI, StorageResolver storage
+ Element e, String baseURI, StorageResolver storage
) throws KeyResolverException {
if (log.isDebugEnabled()) {
log.debug("Now we have a {" + e.getNamespaceURI() + "}"
@@ -256,7 +256,7 @@ public class RetrievalMethodResolver ext
}
// An element has been provided
if (e != null) {
- return KeyResolver.getPublicKey(e, BaseURI, storage);
+ return KeyResolver.getPublicKey(e, baseURI, storage);
}
return null;
}
@@ -299,13 +299,13 @@ public class RetrievalMethodResolver ext
* @throws XMLSecurityException
*/
private static XMLSignatureInput resolveInput(
- RetrievalMethod rm, String BaseURI, boolean secureValidation
+ RetrievalMethod rm, String baseURI, boolean secureValidation
) throws XMLSecurityException {
Attr uri = rm.getURIAttr();
// Apply the transforms
Transforms transforms = rm.getTransforms();
- ResourceResolver resRes = ResourceResolver.getInstance(uri, BaseURI, secureValidation);
- XMLSignatureInput resource = resRes.resolve(uri, BaseURI);
+ ResourceResolver resRes = ResourceResolver.getInstance(uri, baseURI, secureValidation);
+ XMLSignatureInput resource = resRes.resolve(uri, baseURI);
if (transforms != null) {
if (log.isDebugEnabled()) {
log.debug("We have Transforms");
@@ -343,11 +343,11 @@ public class RetrievalMethodResolver ext
* Method engineResolveSecretKey
* @inheritDoc
* @param element
- * @param BaseURI
+ * @param baseURI
* @param storage
*/
public javax.crypto.SecretKey engineLookupAndResolveSecretKey(
- Element element, String BaseURI, StorageResolver storage
+ Element element, String baseURI, StorageResolver storage
) {
return null;
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/SecretKeyResolver.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/SecretKeyResolver.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/SecretKeyResolver.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/SecretKeyResolver.java Fri May 4 10:42:44 2012
@@ -38,11 +38,11 @@ public class SecretKeyResolver extends K
* This method returns whether the KeyResolverSpi is able to perform the requested action.
*
* @param element
- * @param BaseURI
+ * @param baseURI
* @param storage
* @return whether the KeyResolverSpi is able to perform the requested action.
*/
- public boolean engineCanResolve(Element element, String BaseURI, StorageResolver storage) {
+ public boolean engineCanResolve(Element element, String baseURI, StorageResolver storage) {
return XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_KEYNAME);
}
@@ -50,13 +50,13 @@ public class SecretKeyResolver extends K
* Method engineLookupAndResolvePublicKey
*
* @param element
- * @param BaseURI
+ * @param baseURI
* @param storage
* @return null if no {@link PublicKey} could be obtained
* @throws KeyResolverException
*/
public PublicKey engineLookupAndResolvePublicKey(
- Element element, String BaseURI, StorageResolver storage
+ Element element, String baseURI, StorageResolver storage
) throws KeyResolverException {
return null;
}
@@ -65,12 +65,12 @@ public class SecretKeyResolver extends K
* Method engineResolveX509Certificate
* @inheritDoc
* @param element
- * @param BaseURI
+ * @param baseURI
* @param storage
* @throws KeyResolverException
*/
public X509Certificate engineLookupResolveX509Certificate(
- Element element, String BaseURI, StorageResolver storage
+ Element element, String baseURI, StorageResolver storage
) throws KeyResolverException {
return null;
}
@@ -79,14 +79,14 @@ public class SecretKeyResolver extends K
* Method engineResolveSecretKey
*
* @param element
- * @param BaseURI
+ * @param baseURI
* @param storage
* @return resolved SecretKey key or null if no {@link SecretKey} could be obtained
*
* @throws KeyResolverException
*/
public SecretKey engineResolveSecretKey(
- Element element, String BaseURI, StorageResolver storage
+ Element element, String baseURI, StorageResolver storage
) throws KeyResolverException {
if (log.isDebugEnabled()) {
log.debug("Can I resolve " + element.getTagName() + "?");
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/SingleKeyResolver.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/SingleKeyResolver.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/SingleKeyResolver.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/SingleKeyResolver.java Fri May 4 10:42:44 2012
@@ -63,7 +63,7 @@ public class SingleKeyResolver extends K
* @param storage
* @return whether the KeyResolverSpi is able to perform the requested action.
*/
- public boolean engineCanResolve(Element element, String BaseURI, StorageResolver storage) {
+ public boolean engineCanResolve(Element element, String baseURI, StorageResolver storage) {
return XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_KEYNAME);
}
@@ -71,13 +71,13 @@ public class SingleKeyResolver extends K
* Method engineLookupAndResolvePublicKey
*
* @param element
- * @param BaseURI
+ * @param baseURI
* @param storage
* @return null if no {@link PublicKey} could be obtained
* @throws KeyResolverException
*/
public PublicKey engineLookupAndResolvePublicKey(
- Element element, String BaseURI, StorageResolver storage
+ Element element, String baseURI, StorageResolver storage
) throws KeyResolverException {
if (log.isDebugEnabled()) {
log.debug("Can I resolve " + element.getTagName() + "?");
@@ -99,12 +99,12 @@ public class SingleKeyResolver extends K
* Method engineResolveX509Certificate
* @inheritDoc
* @param element
- * @param BaseURI
+ * @param baseURI
* @param storage
* @throws KeyResolverException
*/
public X509Certificate engineLookupResolveX509Certificate(
- Element element, String BaseURI, StorageResolver storage
+ Element element, String baseURI, StorageResolver storage
) throws KeyResolverException {
return null;
}
@@ -113,14 +113,14 @@ public class SingleKeyResolver extends K
* Method engineResolveSecretKey
*
* @param element
- * @param BaseURI
+ * @param baseURI
* @param storage
* @return resolved SecretKey key or null if no {@link SecretKey} could be obtained
*
* @throws KeyResolverException
*/
public SecretKey engineResolveSecretKey(
- Element element, String BaseURI, StorageResolver storage
+ Element element, String baseURI, StorageResolver storage
) throws KeyResolverException {
if (log.isDebugEnabled()) {
log.debug("Can I resolve " + element.getTagName() + "?");
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/X509IssuerSerialResolver.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/X509IssuerSerialResolver.java?rev=1333869&r1=1333868&r2=1333869&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/X509IssuerSerialResolver.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/X509IssuerSerialResolver.java Fri May 4 10:42:44 2012
@@ -42,11 +42,11 @@ public class X509IssuerSerialResolver ex
/** @inheritDoc */
public PublicKey engineLookupAndResolvePublicKey(
- Element element, String BaseURI, StorageResolver storage
+ Element element, String baseURI, StorageResolver storage
) throws KeyResolverException {
X509Certificate cert =
- this.engineLookupResolveX509Certificate(element, BaseURI, storage);
+ this.engineLookupResolveX509Certificate(element, baseURI, storage);
if (cert != null) {
return cert.getPublicKey();
@@ -57,7 +57,7 @@ public class X509IssuerSerialResolver ex
/** @inheritDoc */
public X509Certificate engineLookupResolveX509Certificate(
- Element element, String BaseURI, StorageResolver storage
+ Element element, String baseURI, StorageResolver storage
) throws KeyResolverException {
if (log.isDebugEnabled()) {
log.debug("Can I resolve " + element.getTagName() + "?");
@@ -65,7 +65,7 @@ public class X509IssuerSerialResolver ex
X509Data x509data = null;
try {
- x509data = new X509Data(element, BaseURI);
+ x509data = new X509Data(element, baseURI);
} catch (XMLSignatureException ex) {
if (log.isDebugEnabled()) {
log.debug("I can't");
@@ -139,7 +139,7 @@ public class X509IssuerSerialResolver ex
/** @inheritDoc */
public javax.crypto.SecretKey engineLookupAndResolveSecretKey(
- Element element, String BaseURI, StorageResolver storage
+ Element element, String baseURI, StorageResolver storage
) {
return null;
}