[java-xmltooling COMMIT] in /branches/REL_1: doc/RELEASE-NOTES.txt pom.xml src/main/java/org/opensaml/xml/security/x5...
noreply at shibboleth.net
noreply at shibboleth.net
Wed Aug 6 19:06:00 EDT 2014
Author: putmanb
Date: Wed Aug 6 19:05:59 2014
New Revision: 825
URL: http://svn.shibboleth.net/view/java-xmltooling?rev=825&view=rev
Log:
JXT-112: Update Bouncy Castle to latest version
Modified:
branches/REL_1/doc/RELEASE-NOTES.txt
branches/REL_1/pom.xml
branches/REL_1/src/main/java/org/opensaml/xml/security/x509/X509Util.java
branches/REL_1/src/test/java/org/opensaml/xml/security/x509/X509UtilTest.java
Modified: branches/REL_1/doc/RELEASE-NOTES.txt
URL: http://svn.shibboleth.net/view/java-xmltooling/branches/REL_1/doc/RELEASE-NOTES.txt?rev=825&r1=824&r2=825&view=diff
==============================================================================
--- branches/REL_1/doc/RELEASE-NOTES.txt (original)
+++ branches/REL_1/doc/RELEASE-NOTES.txt Wed Aug 6 19:05:59 2014
@@ -4,6 +4,7 @@
[JXT-109] - SimpleKeyInfoReferenceEncryptedKeyResolver constructor missing 'public' modifier
[JXT-110] - SecurityHelper derivePublicKey incorrectly derives public key for DSAPrivateKey
[JXT-111] - IndexingObjectStore uses hashCode() in an unsafe manner
+[JXT-112] - Update Bouncy Castle to latest version
Changes in Release 1.4.1
=============================================
Modified: branches/REL_1/pom.xml
URL: http://svn.shibboleth.net/view/java-xmltooling/branches/REL_1/pom.xml?rev=825&r1=824&r2=825&view=diff
==============================================================================
--- branches/REL_1/pom.xml (original)
+++ branches/REL_1/pom.xml Wed Aug 6 19:05:59 2014
@@ -43,8 +43,8 @@
<!-- Compile dependencies -->
<dependency>
<groupId>org.bouncycastle</groupId>
- <artifactId>bcprov-jdk15</artifactId>
- <version>1.46</version>
+ <artifactId>bcprov-jdk15on</artifactId>
+ <version>1.51</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
Modified: branches/REL_1/src/main/java/org/opensaml/xml/security/x509/X509Util.java
URL: http://svn.shibboleth.net/view/java-xmltooling/branches/REL_1/src/main/java/org/opensaml/xml/security/x509/X509Util.java?rev=825&r1=824&r2=825&view=diff
==============================================================================
--- branches/REL_1/src/main/java/org/opensaml/xml/security/x509/X509Util.java (original)
+++ branches/REL_1/src/main/java/org/opensaml/xml/security/x509/X509Util.java Wed Aug 6 19:05:59 2014
@@ -38,18 +38,15 @@
import javax.security.auth.x500.X500Principal;
import org.apache.commons.ssl.TrustMaterial;
+import org.bouncycastle.asn1.ASN1Encoding;
import org.bouncycastle.asn1.ASN1InputStream;
-import org.bouncycastle.asn1.DERObject;
-import org.bouncycastle.asn1.DERObjectIdentifier;
-import org.bouncycastle.asn1.DERSequence;
-import org.bouncycastle.asn1.DERSet;
-import org.bouncycastle.asn1.DERString;
-import org.bouncycastle.asn1.x509.SubjectKeyIdentifier;
-import org.bouncycastle.asn1.x509.X509Extensions;
-import org.bouncycastle.util.Arrays;
-import org.bouncycastle.x509.extension.SubjectKeyIdentifierStructure;
+import org.bouncycastle.asn1.ASN1ObjectIdentifier;
+import org.bouncycastle.asn1.ASN1Primitive;
+import org.bouncycastle.asn1.ASN1Sequence;
+import org.bouncycastle.asn1.ASN1Set;
+import org.bouncycastle.asn1.ASN1String;
+import org.bouncycastle.asn1.DEROctetString;
import org.bouncycastle.x509.extension.X509ExtensionUtil;
-import org.opensaml.xml.schema.SchemaBuilder;
import org.opensaml.xml.security.SecurityException;
import org.opensaml.xml.security.SecurityHelper;
import org.opensaml.xml.util.DatatypeHelper;
@@ -69,6 +66,9 @@
/** Common Name (CN) OID. */
public static final String CN_OID = "2.5.4.3";
+
+ /** Subject Key Identifier (SKI) OID. */
+ public static final String SKI_OID = "2.5.29.14";
/** RFC 2459 Other Subject Alt Name type. */
public static final Integer OTHER_ALT_NAME = new Integer(0);
@@ -153,32 +153,32 @@
List<String> commonNames = new LinkedList<String>();
try {
ASN1InputStream asn1Stream = new ASN1InputStream(dn.getEncoded());
- DERObject parent = asn1Stream.readObject();
+ ASN1Primitive parent = asn1Stream.readObject();
String cn = null;
- DERObject dnComponent;
- DERSequence grandChild;
- DERObjectIdentifier componentId;
- for (int i = 0; i < ((DERSequence) parent).size(); i++) {
- dnComponent = ((DERSequence) parent).getObjectAt(i).getDERObject();
- if (!(dnComponent instanceof DERSet)) {
+ ASN1Primitive dnComponent;
+ ASN1Sequence grandChild;
+ ASN1ObjectIdentifier componentId;
+ for (int i = 0; i < ((ASN1Sequence) parent).size(); i++) {
+ dnComponent = ((ASN1Sequence) parent).getObjectAt(i).toASN1Primitive();
+ if (!(dnComponent instanceof ASN1Set)) {
log.debug("No DN components.");
continue;
}
// Each DN component is a set
[... 184 lines stripped ...]
More information about the commits
mailing list