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/03/28 11:29:57 UTC

svn commit: r1306225 - in /santuario/xml-security-java/trunk: CHANGELOG.txt src/test/java/javax/xml/crypto/test/KeySelectors.java

Author: coheigea
Date: Wed Mar 28 09:29:57 2012
New Revision: 1306225

URL: http://svn.apache.org/viewvc?rev=1306225&view=rev
Log:
[SANTUARIO-306] - KeySelectors loop

Modified:
    santuario/xml-security-java/trunk/CHANGELOG.txt
    santuario/xml-security-java/trunk/src/test/java/javax/xml/crypto/test/KeySelectors.java

Modified: santuario/xml-security-java/trunk/CHANGELOG.txt
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/CHANGELOG.txt?rev=1306225&r1=1306224&r2=1306225&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/CHANGELOG.txt (original)
+++ santuario/xml-security-java/trunk/CHANGELOG.txt Wed Mar 28 09:29:57 2012
@@ -1,6 +1,7 @@
 Changelog for "Apache xml-security" <http://santuario.apache.org/>
 
 New in v1.5.2-SNAPSHOT:
+    Fixed SANTUARIO-306 - KeySelectors loop
     Fixed SANTUARIO-304 - No way to distinguish DataReference from a KeyReference when iterating a ReferenceList
     Fixed SANTUARIO-302 - Need API to martial an independent ReferenceList.
     Fixed SANTUARIO-301 - Missing KeyInfo element when encrypting multiple elements.

Modified: santuario/xml-security-java/trunk/src/test/java/javax/xml/crypto/test/KeySelectors.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/java/javax/xml/crypto/test/KeySelectors.java?rev=1306225&r1=1306224&r2=1306225&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/test/java/javax/xml/crypto/test/KeySelectors.java (original)
+++ santuario/xml-security-java/trunk/src/test/java/javax/xml/crypto/test/KeySelectors.java Wed Mar 28 09:29:57 2012
@@ -103,7 +103,7 @@ public class KeySelectors {
                     Object[] entries = xd.getContent().toArray();
                     X509CRL crl = null;
                     // Looking for CRL before finding certificates
-                    for (int i = 0; (i < entries.length && crl != null); i++) {
+                    for (int i = 0; (i < entries.length && crl == null); i++) {
                         if (entries[i] instanceof X509CRL) {
                             crl = (X509CRL) entries[i];
                         }
@@ -281,7 +281,7 @@ public class KeySelectors {
                         }
                         return new SimpleKSResult(pk);
                     } else if (xmlStructure instanceof RetrievalMethod) {
-                        // Lookup the public key using the retrievel method.
+                        // Lookup the public key using the retrieval method.
                         // NOTE: only X509Certificate type is supported.
                         RetrievalMethod rm = (RetrievalMethod) xmlStructure;
                         String type = rm.getType();