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/09/17 16:41:17 UTC
svn commit: r1386636 [2/2] - in /santuario/xml-security-java/trunk: ./
src/main/java/org/apache/xml/security/keys/
src/main/java/org/apache/xml/security/keys/content/
src/main/java/org/apache/xml/security/keys/content/x509/
src/main/java/org/apache/xml...
Added: santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/dom/keys/keyresolver/KeyInfoReferenceResolverTest.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/dom/keys/keyresolver/KeyInfoReferenceResolverTest.java?rev=1386636&view=auto
==============================================================================
--- santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/dom/keys/keyresolver/KeyInfoReferenceResolverTest.java (added)
+++ santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/dom/keys/keyresolver/KeyInfoReferenceResolverTest.java Mon Sep 17 14:41:16 2012
@@ -0,0 +1,168 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.xml.security.test.dom.keys.keyresolver;
+
+import java.io.FileInputStream;
+import java.security.KeyFactory;
+import java.security.PublicKey;
+import java.security.cert.CertificateFactory;
+import java.security.cert.X509Certificate;
+import java.security.spec.X509EncodedKeySpec;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.apache.xml.security.Init;
+import org.apache.xml.security.keys.KeyInfo;
+import org.apache.xml.security.utils.Base64;
+import org.apache.xml.security.utils.Constants;
+import org.apache.xml.security.utils.JavaUtils;
+import org.junit.Assert;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+public class KeyInfoReferenceResolverTest extends Assert {
+
+ private static final String BASEDIR = System.getProperty("basedir") == null ? "./": System.getProperty("basedir");
+ private static final String SEP = System.getProperty("file.separator");
+
+ private DocumentBuilder documentBuilder;
+
+ public KeyInfoReferenceResolverTest() throws Exception {
+ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+ dbf.setNamespaceAware(true);
+ documentBuilder = dbf.newDocumentBuilder();
+
+ if (!Init.isInitialized()) {
+ Init.init();
+ }
+ }
+
+ @org.junit.Test
+ public void testRSAPublicKey() throws Exception {
+ PublicKey rsaKeyControl = loadPublicKey("rsa-KeyInfoReference.key", "RSA");
+
+ Document doc = loadXML("KeyInfoReference-RSA.xml");
+ markKeyInfoIdAttrs(doc);
+
+ Element referenceElement = doc.getElementById("theReference");
+ assertNotNull(referenceElement);
+
+ KeyInfo keyInfo = new KeyInfo(referenceElement, "");
+ assertEquals(rsaKeyControl, keyInfo.getPublicKey());
+ }
+
+ @org.junit.Test
+ public void testX509Certificate() throws Exception {
+ X509Certificate certControl = loadCertificate("cert-KeyInfoReference.crt");
+
+ Document doc = loadXML("KeyInfoReference-X509Certificate.xml");
+ markKeyInfoIdAttrs(doc);
+
+ Element referenceElement = doc.getElementById("theReference");
+ assertNotNull(referenceElement);
+
+ KeyInfo keyInfo = new KeyInfo(referenceElement, "");
+ assertEquals(certControl, keyInfo.getX509Certificate());
+ assertEquals(certControl.getPublicKey(), keyInfo.getPublicKey());
+ }
+
+ @org.junit.Test
+ public void testWrongReferentType() throws Exception {
+ Document doc = loadXML("KeyInfoReference-WrongReferentType.xml");
+ markKeyInfoIdAttrs(doc);
+
+ // Mark the ID-ness of the bogus element so can be resolved
+ NodeList nl = doc.getElementsByTagNameNS("http://www.example.org/test", "KeyInfo");
+ for (int i = 0; i < nl.getLength(); i++) {
+ Element keyInfoElement = (Element) nl.item(i);
+ keyInfoElement.setIdAttributeNS(null, Constants._ATT_ID, true);
+ }
+
+ Element referenceElement = doc.getElementById("theReference");
+ assertNotNull(referenceElement);
+
+ KeyInfo keyInfo = new KeyInfo(referenceElement, "");
+ assertNull(keyInfo.getPublicKey());
+ }
+
+ @org.junit.Test
+ public void testSameDocumentReferenceChain() throws Exception {
+ Document doc = loadXML("KeyInfoReference-ReferenceChain.xml");
+ markKeyInfoIdAttrs(doc);
+
+ Element referenceElement = doc.getElementById("theReference");
+ assertNotNull(referenceElement);
+
+ KeyInfo keyInfo = new KeyInfo(referenceElement, "");
+ // Chains of references are not supported at this time
+ assertNull(keyInfo.getPublicKey());
+ }
+
+ @org.junit.Test
+ public void testSameDocumentReferenceChainWithSecureValidation() throws Exception {
+ Document doc = loadXML("KeyInfoReference-ReferenceChain.xml");
+ markKeyInfoIdAttrs(doc);
+
+ Element referenceElement = doc.getElementById("theReference");
+ assertNotNull(referenceElement);
+
+ KeyInfo keyInfo = new KeyInfo(referenceElement, "");
+ keyInfo.setSecureValidation(true);
+ // Chains of references are not supported at this time
+ assertNull(keyInfo.getPublicKey());
+ }
+
+ // Utility methods
+
+ private String getControlFilePath(String fileName) {
+ return BASEDIR + SEP + "src" + SEP + "test" + SEP + "resources" +
+ SEP + "org" + SEP + "apache" + SEP + "xml" + SEP + "security" +
+ SEP + "keyresolver" +
+ SEP + fileName;
+ }
+
+ private Document loadXML(String fileName) throws Exception {
+ return documentBuilder.parse(new FileInputStream(getControlFilePath(fileName)));
+ }
+
+ private PublicKey loadPublicKey(String filePath, String algorithm) throws Exception {
+ String fileData = new String(JavaUtils.getBytesFromFile(getControlFilePath(filePath)));
+ byte[] keyBytes = Base64.decode(fileData);
+ KeyFactory kf = KeyFactory.getInstance(algorithm);
+ X509EncodedKeySpec keySpec = new X509EncodedKeySpec(keyBytes);
+ return kf.generatePublic(keySpec);
+ }
+
+ private X509Certificate loadCertificate(String fileName) throws Exception {
+ FileInputStream fis = new FileInputStream(getControlFilePath(fileName));
+ CertificateFactory certFactory = CertificateFactory.getInstance("X.509");
+ return (X509Certificate) certFactory.generateCertificate(fis);
+ }
+
+ private void markKeyInfoIdAttrs(Document doc) {
+ NodeList nl = doc.getElementsByTagNameNS(Constants.SignatureSpecNS, Constants._TAG_KEYINFO);
+ for (int i = 0; i < nl.getLength(); i++) {
+ Element keyInfoElement = (Element) nl.item(i);
+ keyInfoElement.setIdAttributeNS(null, Constants._ATT_ID, true);
+ }
+ }
+
+}
Added: santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/dom/keys/keyresolver/X509DigestResolverTest.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/dom/keys/keyresolver/X509DigestResolverTest.java?rev=1386636&view=auto
==============================================================================
--- santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/dom/keys/keyresolver/X509DigestResolverTest.java (added)
+++ santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/dom/keys/keyresolver/X509DigestResolverTest.java Mon Sep 17 14:41:16 2012
@@ -0,0 +1,97 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.xml.security.test.dom.keys.keyresolver;
+
+import java.io.FileInputStream;
+import java.security.cert.CertificateFactory;
+import java.security.cert.X509Certificate;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.apache.xml.security.Init;
+import org.apache.xml.security.keys.KeyInfo;
+import org.apache.xml.security.keys.storage.StorageResolver;
+import org.apache.xml.security.keys.storage.implementations.SingleCertificateResolver;
+import org.junit.Assert;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+public class X509DigestResolverTest extends Assert {
+
+ private static final String BASEDIR = System.getProperty("basedir") == null ? "./": System.getProperty("basedir");
+ private static final String SEP = System.getProperty("file.separator");
+
+ private DocumentBuilder documentBuilder;
+
+ private X509Certificate certControl;
+
+ private StorageResolver storageResolver;
+
+ public X509DigestResolverTest() throws Exception {
+ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+ dbf.setNamespaceAware(true);
+ documentBuilder = dbf.newDocumentBuilder();
+
+ certControl = loadCertificate("cert-X509Digest.crt");
+
+ storageResolver = new StorageResolver(new SingleCertificateResolver(certControl));
+
+ if (!Init.isInitialized()) {
+ Init.init();
+ }
+ }
+
+ @org.junit.Test
+ public void testDigest() throws Exception {
+ Document doc = loadXML("X509Digest.xml");
+ Element element = doc.getDocumentElement();
+
+ KeyInfo keyInfo = new KeyInfo(element, "");
+
+ assertNull(keyInfo.getX509Certificate());
+ assertNull(keyInfo.getPublicKey());
+
+ keyInfo.addStorageResolver(storageResolver);
+
+ assertEquals(certControl, keyInfo.getX509Certificate());
+ assertEquals(certControl.getPublicKey(), keyInfo.getPublicKey());
+ }
+
+
+ // Utility methods
+
+ private String getControlFilePath(String fileName) {
+ return BASEDIR + SEP + "src" + SEP + "test" + SEP + "resources" +
+ SEP + "org" + SEP + "apache" + SEP + "xml" + SEP + "security" +
+ SEP + "keys" + SEP + "content" + SEP + "x509" +
+ SEP + fileName;
+ }
+
+ private Document loadXML(String fileName) throws Exception {
+ return documentBuilder.parse(new FileInputStream(getControlFilePath(fileName)));
+ }
+
+ private X509Certificate loadCertificate(String fileName) throws Exception {
+ FileInputStream fis = new FileInputStream(getControlFilePath(fileName));
+ CertificateFactory certFactory = CertificateFactory.getInstance("X.509");
+ return (X509Certificate) certFactory.generateCertificate(fis);
+ }
+
+}
Added: santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keyresolver/KeyInfoReference-RSA.xml
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keyresolver/KeyInfoReference-RSA.xml?rev=1386636&view=auto
==============================================================================
--- santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keyresolver/KeyInfoReference-RSA.xml (added)
+++ santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keyresolver/KeyInfoReference-RSA.xml Mon Sep 17 14:41:16 2012
@@ -0,0 +1,18 @@
+<test:root xmlns:test="http://www.example.org/test">
+
+ <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="theRealKey">
+ <dsig11:DEREncodedKeyValue xmlns:dsig11="http://www.w3.org/2009/xmldsig11#">
+ MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmDnHagSzfia3N7jOaMSp4VIZjK2lxZgN
+ X/2z98YLp1XE3cvpP+mOvX3gENWQuX3uoix+2qroZ0BFHzhzf4E7is5Q9+42ZFi5naFk3c/B0Q8A
+ jtHtWUEZ8VPPBZggz6uJ1ttJS7YDP6XVjaw6SN1bJSD4/lWNIVsh95kuhunbOef6x/kyIbBz9wF4
+ S0//G6zPD4GG7/jJ+sDXe+bAgPB1qwhLhrK3N1jGuDZkGGcY/c4b7aba0B0rognwKlygv16GoA/n
+ zWehxih7clhmMTzP2VWa3Q2GcN8ETe00dz68KtS7GF6W15qftjUvRXEKSoPz86ZsP30jIH1tvIrs
+ qSh/kwIDAQAB
+ </dsig11:DEREncodedKeyValue>
+ </ds:KeyInfo>
+
+ <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="theReference">
+ <dsig11:KeyInfoReference xmlns:dsig11="http://www.w3.org/2009/xmldsig11#" URI="#theRealKey" />
+ </ds:KeyInfo>
+
+</test:root>
Added: santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keyresolver/KeyInfoReference-ReferenceChain.xml
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keyresolver/KeyInfoReference-ReferenceChain.xml?rev=1386636&view=auto
==============================================================================
--- santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keyresolver/KeyInfoReference-ReferenceChain.xml (added)
+++ santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keyresolver/KeyInfoReference-ReferenceChain.xml Mon Sep 17 14:41:16 2012
@@ -0,0 +1,22 @@
+<test:root xmlns:test="http://www.example.org/test">
+
+ <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="theRealKey">
+ <dsig11:DEREncodedKeyValue xmlns:dsig11="http://www.w3.org/2009/xmldsig11#">
+ MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmDnHagSzfia3N7jOaMSp4VIZjK2lxZgN
+ X/2z98YLp1XE3cvpP+mOvX3gENWQuX3uoix+2qroZ0BFHzhzf4E7is5Q9+42ZFi5naFk3c/B0Q8A
+ jtHtWUEZ8VPPBZggz6uJ1ttJS7YDP6XVjaw6SN1bJSD4/lWNIVsh95kuhunbOef6x/kyIbBz9wF4
+ S0//G6zPD4GG7/jJ+sDXe+bAgPB1qwhLhrK3N1jGuDZkGGcY/c4b7aba0B0rognwKlygv16GoA/n
+ zWehxih7clhmMTzP2VWa3Q2GcN8ETe00dz68KtS7GF6W15qftjUvRXEKSoPz86ZsP30jIH1tvIrs
+ qSh/kwIDAQAB
+ </dsig11:DEREncodedKeyValue>
+ </ds:KeyInfo>
+
+ <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="theReference">
+ <dsig11:KeyInfoReference xmlns:dsig11="http://www.w3.org/2009/xmldsig11#" URI="#theReference2" />
+ </ds:KeyInfo>
+
+ <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="theReference2">
+ <dsig11:KeyInfoReference xmlns:dsig11="http://www.w3.org/2009/xmldsig11#" URI="#theRealKey" />
+ </ds:KeyInfo>
+
+</test:root>
Added: santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keyresolver/KeyInfoReference-WrongReferentType.xml
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keyresolver/KeyInfoReference-WrongReferentType.xml?rev=1386636&view=auto
==============================================================================
--- santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keyresolver/KeyInfoReference-WrongReferentType.xml (added)
+++ santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keyresolver/KeyInfoReference-WrongReferentType.xml Mon Sep 17 14:41:16 2012
@@ -0,0 +1,19 @@
+<test:root xmlns:test="http://www.example.org/test">
+
+ <!-- This is not a valid referent. -->
+ <test:KeyInfo Id="theRealKey">
+ <dsig11:DEREncodedKeyValue xmlns:dsig11="http://www.w3.org/2009/xmldsig11#">
+ MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmDnHagSzfia3N7jOaMSp4VIZjK2lxZgN
+ X/2z98YLp1XE3cvpP+mOvX3gENWQuX3uoix+2qroZ0BFHzhzf4E7is5Q9+42ZFi5naFk3c/B0Q8A
+ jtHtWUEZ8VPPBZggz6uJ1ttJS7YDP6XVjaw6SN1bJSD4/lWNIVsh95kuhunbOef6x/kyIbBz9wF4
+ S0//G6zPD4GG7/jJ+sDXe+bAgPB1qwhLhrK3N1jGuDZkGGcY/c4b7aba0B0rognwKlygv16GoA/n
+ zWehxih7clhmMTzP2VWa3Q2GcN8ETe00dz68KtS7GF6W15qftjUvRXEKSoPz86ZsP30jIH1tvIrs
+ qSh/kwIDAQAB
+ </dsig11:DEREncodedKeyValue>
+ </test:KeyInfo>
+
+ <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="theReference">
+ <dsig11:KeyInfoReference xmlns:dsig11="http://www.w3.org/2009/xmldsig11#" URI="#theRealKey" />
+ </ds:KeyInfo>
+
+</test:root>
Added: santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keyresolver/KeyInfoReference-X509Certificate.xml
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keyresolver/KeyInfoReference-X509Certificate.xml?rev=1386636&view=auto
==============================================================================
--- santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keyresolver/KeyInfoReference-X509Certificate.xml (added)
+++ santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keyresolver/KeyInfoReference-X509Certificate.xml Mon Sep 17 14:41:16 2012
@@ -0,0 +1,32 @@
+<test:root xmlns:test="http://www.example.org/test">
+
+ <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="theRealKey">
+ <ds:X509Data>
+ <ds:X509Certificate>
+ MIIDMjCCAhqgAwIBAgIJANMtZaoBDP2dMA0GCSqGSIb3DQEBBQUAMBoxGDAWBgNV
+ BAMTD3d3dy5leGFtcGxlLm9yZzAeFw0xMjA5MDcwMTU1MzZaFw00MjEwMjAwMTU1
+ MzZaMBoxGDAWBgNVBAMTD3d3dy5leGFtcGxlLm9yZzCCASIwDQYJKoZIhvcNAQEB
+ BQADggEPADCCAQoCggEBAMLE68jUfv64M/Hy/SBcM8h1WMV8/4zUj/0hwOvfzRkR
+ kXgY7oMO1z0ltwccEVP340kCk6uv3e+EGECng/jdU1GQWkJVieHvWLw295sUICha
+ DAlLBQinGekfQn0dYU5bZ66QXZ56NDytmKKAkDfe65TH4Kmg7XhebXYGkb7GMThG
+ 8eD8QsBnL4yRYscY8ZZAu7APWHyIB+xXokZVnGwBKkN1M5LOlcRRUzpOW3bEO5nz
+ vhvUKuSwIMJeHxqOwCio8Ue5YY+LK3fc9qNmktuV/KVSXSmVBTsD+a7G7u7lu0cb
+ WLhNYxrzhrKy0ctmJDCy1U5bmb7UoAsm8PRbARa0WpcCAwEAAaN7MHkwHQYDVR0O
+ BBYEFPH9Xc38vVMOjrHikUVYuJkuQto1MEoGA1UdIwRDMEGAFPH9Xc38vVMOjrHi
+ kUVYuJkuQto1oR6kHDAaMRgwFgYDVQQDEw93d3cuZXhhbXBsZS5vcmeCCQDTLWWq
+ AQz9nTAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQA4/0BxiAB+NLS3
+ gbc04dkoe3tKk1UlGav748JnioUX2uXoQ8KLPYqelHnSYzGpwfRm4dN/mUqN2d1t
+ cRIH4nyrYPxXz9vO0rAPZ2ZEfCVuL4jpK92CJjvOKRdIJZIHDu8foXVkca55r5+s
+ txnGRJnDhwXK+e/+BkojvOtyqZ5jyZTMEq9ez8E0XgBNDFmu3sDNLDxxF0fAMFyQ
+ +Fs0FHeqZSEZs8SMrcrqpbX4OygDOun0GeHRRlIbXScKxOLofhjuXTGj+oomIxbf
+ t/gyBha1Gfd25+TpRxVxx5XNosWAezdz7sGSJwWuPApQH19bN/2iunwtfEZ1CB7g
+ LUyOfR/g
+ </ds:X509Certificate>
+ </ds:X509Data>
+ </ds:KeyInfo>
+
+ <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="theReference">
+ <dsig11:KeyInfoReference xmlns:dsig11="http://www.w3.org/2009/xmldsig11#" URI="#theRealKey" />
+ </ds:KeyInfo>
+
+</test:root>
Added: santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keyresolver/cert-KeyInfoReference.crt
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keyresolver/cert-KeyInfoReference.crt?rev=1386636&view=auto
==============================================================================
--- santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keyresolver/cert-KeyInfoReference.crt (added)
+++ santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keyresolver/cert-KeyInfoReference.crt Mon Sep 17 14:41:16 2012
@@ -0,0 +1,20 @@
+-----BEGIN CERTIFICATE-----
+MIIDMjCCAhqgAwIBAgIJANMtZaoBDP2dMA0GCSqGSIb3DQEBBQUAMBoxGDAWBgNV
+BAMTD3d3dy5leGFtcGxlLm9yZzAeFw0xMjA5MDcwMTU1MzZaFw00MjEwMjAwMTU1
+MzZaMBoxGDAWBgNVBAMTD3d3dy5leGFtcGxlLm9yZzCCASIwDQYJKoZIhvcNAQEB
+BQADggEPADCCAQoCggEBAMLE68jUfv64M/Hy/SBcM8h1WMV8/4zUj/0hwOvfzRkR
+kXgY7oMO1z0ltwccEVP340kCk6uv3e+EGECng/jdU1GQWkJVieHvWLw295sUICha
+DAlLBQinGekfQn0dYU5bZ66QXZ56NDytmKKAkDfe65TH4Kmg7XhebXYGkb7GMThG
+8eD8QsBnL4yRYscY8ZZAu7APWHyIB+xXokZVnGwBKkN1M5LOlcRRUzpOW3bEO5nz
+vhvUKuSwIMJeHxqOwCio8Ue5YY+LK3fc9qNmktuV/KVSXSmVBTsD+a7G7u7lu0cb
+WLhNYxrzhrKy0ctmJDCy1U5bmb7UoAsm8PRbARa0WpcCAwEAAaN7MHkwHQYDVR0O
+BBYEFPH9Xc38vVMOjrHikUVYuJkuQto1MEoGA1UdIwRDMEGAFPH9Xc38vVMOjrHi
+kUVYuJkuQto1oR6kHDAaMRgwFgYDVQQDEw93d3cuZXhhbXBsZS5vcmeCCQDTLWWq
+AQz9nTAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQA4/0BxiAB+NLS3
+gbc04dkoe3tKk1UlGav748JnioUX2uXoQ8KLPYqelHnSYzGpwfRm4dN/mUqN2d1t
+cRIH4nyrYPxXz9vO0rAPZ2ZEfCVuL4jpK92CJjvOKRdIJZIHDu8foXVkca55r5+s
+txnGRJnDhwXK+e/+BkojvOtyqZ5jyZTMEq9ez8E0XgBNDFmu3sDNLDxxF0fAMFyQ
++Fs0FHeqZSEZs8SMrcrqpbX4OygDOun0GeHRRlIbXScKxOLofhjuXTGj+oomIxbf
+t/gyBha1Gfd25+TpRxVxx5XNosWAezdz7sGSJwWuPApQH19bN/2iunwtfEZ1CB7g
+LUyOfR/g
+-----END CERTIFICATE-----
Added: santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keyresolver/rsa-KeyInfoReference.key
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keyresolver/rsa-KeyInfoReference.key?rev=1386636&view=auto
==============================================================================
--- santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keyresolver/rsa-KeyInfoReference.key (added)
+++ santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keyresolver/rsa-KeyInfoReference.key Mon Sep 17 14:41:16 2012
@@ -0,0 +1,6 @@
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmDnHagSzfia3N7jOaMSp4VIZjK2lxZgN
+X/2z98YLp1XE3cvpP+mOvX3gENWQuX3uoix+2qroZ0BFHzhzf4E7is5Q9+42ZFi5naFk3c/B0Q8A
+jtHtWUEZ8VPPBZggz6uJ1ttJS7YDP6XVjaw6SN1bJSD4/lWNIVsh95kuhunbOef6x/kyIbBz9wF4
+S0//G6zPD4GG7/jJ+sDXe+bAgPB1qwhLhrK3N1jGuDZkGGcY/c4b7aba0B0rognwKlygv16GoA/n
+zWehxih7clhmMTzP2VWa3Q2GcN8ETe00dz68KtS7GF6W15qftjUvRXEKSoPz86ZsP30jIH1tvIrs
+qSh/kwIDAQAB
\ No newline at end of file
Added: santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/DEREncodedKeyValue-DSA.xml
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/DEREncodedKeyValue-DSA.xml?rev=1386636&view=auto
==============================================================================
--- santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/DEREncodedKeyValue-DSA.xml (added)
+++ santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/DEREncodedKeyValue-DSA.xml Mon Sep 17 14:41:16 2012
@@ -0,0 +1,14 @@
+<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
+
+<dsig11:DEREncodedKeyValue xmlns:dsig11="http://www.w3.org/2009/xmldsig11#" Id="abc123">
+MIIBuDCCASwGByqGSM44BAEwggEfAoGBAP1/U4EddRIpUt9KnC7s5Of2EbdSPO9EAMMeP4C2USZp
+RV1AIlH7WT2NWPq/xfW6MPbLm1Vs14E7gB00b/JmYLdrmVClpJ+f6AR7ECLCT7up1/63xhv4O1fn
+xqimFQ8E+4P208UewwI1VBNaFpEy9nXzrith1yrv8iIDGZ3RSAHHAhUAl2BQjxUjC8yykrmCouuE
+C/BYHPUCgYEA9+GghdabPd7LvKtcNrhXuXmUr7v6OuqC+VdMCz0HgmdRWVeOutRZT+ZxBxCBgLRJ
+FnEj6EwoFhO3zwkyjMim4TwWeotUfI0o4KOuHiuzpnWRbqN/C/ohNWLx+2J6ASQ7zKTxvqhRkImo
+g9/hWuWfBpKLZl6Ae1UlZAFMO/7PSSoDgYUAAoGBANJ+apDNYYL9P6dz7w622+/L6YhFQMyaWlSx
+5GyRo+BbE1J89xfsNUja+gxhIOZ9OAZOd69gFtuNW1UVkbJU1iS0IUhyg2j5wXqHSlULnpIX2sG0
+aAacVrUwtjkvMyQ9Bwbq5M0odRrJT509EPfV2IVcZt4/ho4E1+9gmUwFVjRt
+</dsig11:DEREncodedKeyValue>
+
+</ds:KeyInfo>
Added: santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/DEREncodedKeyValue-EC.xml
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/DEREncodedKeyValue-EC.xml?rev=1386636&view=auto
==============================================================================
--- santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/DEREncodedKeyValue-EC.xml (added)
+++ santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/DEREncodedKeyValue-EC.xml Mon Sep 17 14:41:16 2012
@@ -0,0 +1,8 @@
+<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
+
+<dsig11:DEREncodedKeyValue xmlns:dsig11="http://www.w3.org/2009/xmldsig11#" Id="abc123">
+MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEsDcofqxWaJiuO++U5iLbj9efN0UpNSB6onKO+eSO
+I+9ImUy1HoVXf4ARkJ8nQpp8UC1yExYLXGBWiAJY0DKApQ==
+</dsig11:DEREncodedKeyValue>
+
+</ds:KeyInfo>
Added: santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/DEREncodedKeyValue-RSA.xml
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/DEREncodedKeyValue-RSA.xml?rev=1386636&view=auto
==============================================================================
--- santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/DEREncodedKeyValue-RSA.xml (added)
+++ santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/DEREncodedKeyValue-RSA.xml Mon Sep 17 14:41:16 2012
@@ -0,0 +1,12 @@
+<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
+
+<dsig11:DEREncodedKeyValue xmlns:dsig11="http://www.w3.org/2009/xmldsig11#" Id="abc123">
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmDnHagSzfia3N7jOaMSp4VIZjK2lxZgN
+X/2z98YLp1XE3cvpP+mOvX3gENWQuX3uoix+2qroZ0BFHzhzf4E7is5Q9+42ZFi5naFk3c/B0Q8A
+jtHtWUEZ8VPPBZggz6uJ1ttJS7YDP6XVjaw6SN1bJSD4/lWNIVsh95kuhunbOef6x/kyIbBz9wF4
+S0//G6zPD4GG7/jJ+sDXe+bAgPB1qwhLhrK3N1jGuDZkGGcY/c4b7aba0B0rognwKlygv16GoA/n
+zWehxih7clhmMTzP2VWa3Q2GcN8ETe00dz68KtS7GF6W15qftjUvRXEKSoPz86ZsP30jIH1tvIrs
+qSh/kwIDAQAB
+</dsig11:DEREncodedKeyValue>
+
+</ds:KeyInfo>
Added: santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/KeyInfoReference.xml
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/KeyInfoReference.xml?rev=1386636&view=auto
==============================================================================
--- santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/KeyInfoReference.xml (added)
+++ santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/KeyInfoReference.xml Mon Sep 17 14:41:16 2012
@@ -0,0 +1,5 @@
+<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
+
+<dsig11:KeyInfoReference xmlns:dsig11="http://www.w3.org/2009/xmldsig11#" Id="abc123" URI="http://www.example.org/keyinfo.xml" />
+
+</ds:KeyInfo>
Added: santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/dsa.key
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/dsa.key?rev=1386636&view=auto
==============================================================================
--- santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/dsa.key (added)
+++ santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/dsa.key Mon Sep 17 14:41:16 2012
@@ -0,0 +1,8 @@
+MIIBuDCCASwGByqGSM44BAEwggEfAoGBAP1/U4EddRIpUt9KnC7s5Of2EbdSPO9EAMMeP4C2USZp
+RV1AIlH7WT2NWPq/xfW6MPbLm1Vs14E7gB00b/JmYLdrmVClpJ+f6AR7ECLCT7up1/63xhv4O1fn
+xqimFQ8E+4P208UewwI1VBNaFpEy9nXzrith1yrv8iIDGZ3RSAHHAhUAl2BQjxUjC8yykrmCouuE
+C/BYHPUCgYEA9+GghdabPd7LvKtcNrhXuXmUr7v6OuqC+VdMCz0HgmdRWVeOutRZT+ZxBxCBgLRJ
+FnEj6EwoFhO3zwkyjMim4TwWeotUfI0o4KOuHiuzpnWRbqN/C/ohNWLx+2J6ASQ7zKTxvqhRkImo
+g9/hWuWfBpKLZl6Ae1UlZAFMO/7PSSoDgYUAAoGBANJ+apDNYYL9P6dz7w622+/L6YhFQMyaWlSx
+5GyRo+BbE1J89xfsNUja+gxhIOZ9OAZOd69gFtuNW1UVkbJU1iS0IUhyg2j5wXqHSlULnpIX2sG0
+aAacVrUwtjkvMyQ9Bwbq5M0odRrJT509EPfV2IVcZt4/ho4E1+9gmUwFVjRt
\ No newline at end of file
Added: santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/ec.key
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/ec.key?rev=1386636&view=auto
==============================================================================
--- santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/ec.key (added)
+++ santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/ec.key Mon Sep 17 14:41:16 2012
@@ -0,0 +1,2 @@
+MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEsDcofqxWaJiuO++U5iLbj9efN0UpNSB6onKO+eSO
+I+9ImUy1HoVXf4ARkJ8nQpp8UC1yExYLXGBWiAJY0DKApQ==
\ No newline at end of file
Added: santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/rsa.key
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/rsa.key?rev=1386636&view=auto
==============================================================================
--- santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/rsa.key (added)
+++ santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/rsa.key Mon Sep 17 14:41:16 2012
@@ -0,0 +1,6 @@
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmDnHagSzfia3N7jOaMSp4VIZjK2lxZgN
+X/2z98YLp1XE3cvpP+mOvX3gENWQuX3uoix+2qroZ0BFHzhzf4E7is5Q9+42ZFi5naFk3c/B0Q8A
+jtHtWUEZ8VPPBZggz6uJ1ttJS7YDP6XVjaw6SN1bJSD4/lWNIVsh95kuhunbOef6x/kyIbBz9wF4
+S0//G6zPD4GG7/jJ+sDXe+bAgPB1qwhLhrK3N1jGuDZkGGcY/c4b7aba0B0rognwKlygv16GoA/n
+zWehxih7clhmMTzP2VWa3Q2GcN8ETe00dz68KtS7GF6W15qftjUvRXEKSoPz86ZsP30jIH1tvIrs
+qSh/kwIDAQAB
\ No newline at end of file
Added: santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/x509/X509Digest.xml
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/x509/X509Digest.xml?rev=1386636&view=auto
==============================================================================
--- santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/x509/X509Digest.xml (added)
+++ santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/x509/X509Digest.xml Mon Sep 17 14:41:16 2012
@@ -0,0 +1,11 @@
+<ds:Keyinfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
+
+ <ds:X509Data xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
+
+ <dsig11:X509Digest xmlns:dsig11="http://www.w3.org/2009/xmldsig11#" Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" >
+ jToLQ/K7aaLHy/aXLFnjEfCwSQd9z0MrBOH6Ru/aJyY=
+ </dsig11:X509Digest>
+
+ </ds:X509Data>
+
+</ds:Keyinfo>
Added: santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/x509/cert-X509Digest.crt
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/x509/cert-X509Digest.crt?rev=1386636&view=auto
==============================================================================
--- santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/x509/cert-X509Digest.crt (added)
+++ santuario/xml-security-java/trunk/src/test/resources/org/apache/xml/security/keys/content/x509/cert-X509Digest.crt Mon Sep 17 14:41:16 2012
@@ -0,0 +1,20 @@
+-----BEGIN CERTIFICATE-----
+MIIDMjCCAhqgAwIBAgIJANMtZaoBDP2dMA0GCSqGSIb3DQEBBQUAMBoxGDAWBgNV
+BAMTD3d3dy5leGFtcGxlLm9yZzAeFw0xMjA5MDcwMTU1MzZaFw00MjEwMjAwMTU1
+MzZaMBoxGDAWBgNVBAMTD3d3dy5leGFtcGxlLm9yZzCCASIwDQYJKoZIhvcNAQEB
+BQADggEPADCCAQoCggEBAMLE68jUfv64M/Hy/SBcM8h1WMV8/4zUj/0hwOvfzRkR
+kXgY7oMO1z0ltwccEVP340kCk6uv3e+EGECng/jdU1GQWkJVieHvWLw295sUICha
+DAlLBQinGekfQn0dYU5bZ66QXZ56NDytmKKAkDfe65TH4Kmg7XhebXYGkb7GMThG
+8eD8QsBnL4yRYscY8ZZAu7APWHyIB+xXokZVnGwBKkN1M5LOlcRRUzpOW3bEO5nz
+vhvUKuSwIMJeHxqOwCio8Ue5YY+LK3fc9qNmktuV/KVSXSmVBTsD+a7G7u7lu0cb
+WLhNYxrzhrKy0ctmJDCy1U5bmb7UoAsm8PRbARa0WpcCAwEAAaN7MHkwHQYDVR0O
+BBYEFPH9Xc38vVMOjrHikUVYuJkuQto1MEoGA1UdIwRDMEGAFPH9Xc38vVMOjrHi
+kUVYuJkuQto1oR6kHDAaMRgwFgYDVQQDEw93d3cuZXhhbXBsZS5vcmeCCQDTLWWq
+AQz9nTAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQA4/0BxiAB+NLS3
+gbc04dkoe3tKk1UlGav748JnioUX2uXoQ8KLPYqelHnSYzGpwfRm4dN/mUqN2d1t
+cRIH4nyrYPxXz9vO0rAPZ2ZEfCVuL4jpK92CJjvOKRdIJZIHDu8foXVkca55r5+s
+txnGRJnDhwXK+e/+BkojvOtyqZ5jyZTMEq9ez8E0XgBNDFmu3sDNLDxxF0fAMFyQ
++Fs0FHeqZSEZs8SMrcrqpbX4OygDOun0GeHRRlIbXScKxOLofhjuXTGj+oomIxbf
+t/gyBha1Gfd25+TpRxVxx5XNosWAezdz7sGSJwWuPApQH19bN/2iunwtfEZ1CB7g
+LUyOfR/g
+-----END CERTIFICATE-----