[java-opensaml COMMIT] /trunk/opensaml-security-api/src/main/java/org/opensaml/security/x509/X509Support.java

noreply at shibboleth.net noreply at shibboleth.net
Thu Nov 20 18:20:08 EST 2014


Author: scantor
Date: Thu Nov 20 18:20:07 2014
New Revision: 4163

URL: http://svn.shibboleth.net/view/java-opensaml?rev=4163&view=rev
Log:
Update cryptacular RC, and port DN parsing code.

Modified:
    trunk/opensaml-security-api/src/main/java/org/opensaml/security/x509/X509Support.java

Modified: trunk/opensaml-security-api/src/main/java/org/opensaml/security/x509/X509Support.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-security-api/src/main/java/org/opensaml/security/x509/X509Support.java?rev=4163&r1=4162&r2=4163&view=diff
==============================================================================
--- trunk/opensaml-security-api/src/main/java/org/opensaml/security/x509/X509Support.java (original)
+++ trunk/opensaml-security-api/src/main/java/org/opensaml/security/x509/X509Support.java Thu Nov 20 18:20:07 2014
@@ -54,9 +54,9 @@
 import org.cryptacular.util.CertUtil;
 import org.cryptacular.util.CodecUtil;
 import org.cryptacular.x509.GeneralNameType;
-import org.cryptacular.x509.dn.AttributeType;
-import org.cryptacular.x509.dn.Attributes;
 import org.cryptacular.x509.dn.NameReader;
+import org.cryptacular.x509.dn.RDNSequence;
+import org.cryptacular.x509.dn.StandardAttributeType;
 import org.opensaml.security.SecurityException;
 import org.opensaml.security.crypto.KeySupport;
 import org.slf4j.Logger;
@@ -164,9 +164,9 @@
 
         Logger log = getLogger();
         log.debug("Extracting CNs from the following DN: {}", dn.toString());
-        final Attributes attrs = NameReader.readX500Principal(dn);
+        final RDNSequence attrs = NameReader.readX500Principal(dn);
         // Have to copy because list returned from Attributes is unmodifiable, so can't reverse it.
-        List<String> values = Lists.newArrayList(attrs.getValues(AttributeType.CommonName));
+        List<String> values = Lists.newArrayList(attrs.getValues(StandardAttributeType.CommonName));
         
         // Reverse the order so that the most-specific CN is first in the list, 
         // consistent with RFC 1779/2253 RDN ordering.



More information about the commits mailing list