You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by ra...@apache.org on 2005/04/02 21:17:31 UTC
cvs commit: xml-security/src/org/apache/xml/security/keys/content/x509 XMLX509SKI.java
raul 2005/04/02 11:17:31
Modified: src/org/apache/xml/security/keys/content/x509
XMLX509SKI.java
Log:
Used the standard Class.forName instead of the <1.1 in XMLUtils
Revision Changes Path
1.14 +4 -7 xml-security/src/org/apache/xml/security/keys/content/x509/XMLX509SKI.java
Index: XMLX509SKI.java
===================================================================
RCS file: /home/cvs/xml-security/src/org/apache/xml/security/keys/content/x509/XMLX509SKI.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- XMLX509SKI.java 2 Apr 2005 18:52:39 -0000 1.13
+++ XMLX509SKI.java 2 Apr 2005 19:17:31 -0000 1.14
@@ -143,8 +143,7 @@
/**
* Use sun.security.util.DerValue if it is present.
*/
- try {
- if (XMLUtils.classForName("sun.security.util.DerValue") != null) {
+ try {
DerValue dervalue = new DerValue(derEncodedValue);
if (dervalue == null) {
throw new XMLSecurityException("certificate.noSki.null");
@@ -152,10 +151,8 @@
if (dervalue.tag != DerValue.tag_OctetString) {
throw new XMLSecurityException("certificate.noSki.notOctetString");
}
- extensionValue = dervalue.getOctetString();
- }
+ extensionValue = dervalue.getOctetString();
} catch (NoClassDefFoundError e) {
- } catch (ClassNotFoundException e) {
}
/**
@@ -163,7 +160,7 @@
*/
if (extensionValue == null) {
try {
- Class clazz = XMLUtils.classForName("org.bouncycastle.asn1.DERInputStream");
+ Class clazz = Class.forName("org.bouncycastle.asn1.DERInputStream");
if (clazz != null) {
Constructor constructor = clazz.getConstructor(new Class[]{InputStream.class});
InputStream is = (InputStream) constructor.newInstance(new Object[]{new ByteArrayInputStream(derEncodedValue)});
@@ -172,7 +169,7 @@
if (obj == null) {
throw new XMLSecurityException("certificate.noSki.null");
}
- Class clazz2 = XMLUtils.classForName("org.bouncycastle.asn1.ASN1OctetString");
+ Class clazz2 = Class.forName("org.bouncycastle.asn1.ASN1OctetString");
if (!clazz2.isInstance(obj)) {
throw new XMLSecurityException("certificate.noSki.notOctetString");
}