summaryrefslogtreecommitdiffstats
path: root/pki/base
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2012-01-10 16:39:57 -0600
committerEndi Sukma Dewata <edewata@redhat.com>2012-01-10 20:23:06 -0600
commit950766c4899741527aadb7ce785522f0fb14ec5c (patch)
tree1b128dc2af0143f47a891f54ae68d755d49cf6cf /pki/base
parentd5a1c6dfcbe1b1ab7ffe711996f970f1c410b919 (diff)
downloadpki-950766c4899741527aadb7ce785522f0fb14ec5c.tar.gz
pki-950766c4899741527aadb7ce785522f0fb14ec5c.tar.xz
pki-950766c4899741527aadb7ce785522f0fb14ec5c.zip
Replaced TreeSet with LinkedHashSet.
The TreeSet has been replaced by LinkedHashSet because it is used to store non-Comparable objects according to the insertion order. This fixes a ClassCastException that happens while viewing Certificate Revocation List.
Diffstat (limited to 'pki/base')
-rw-r--r--pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java4
-rwxr-xr-xpki/base/util/src/netscape/security/x509/RevokedCertImpl.java6
-rwxr-xr-xpki/base/util/src/netscape/security/x509/X509CRLImpl.java8
-rwxr-xr-xpki/base/util/src/netscape/security/x509/X509CertImpl.java6
4 files changed, 12 insertions, 12 deletions
diff --git a/pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java b/pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java
index 0e675be8c..d85550ee0 100644
--- a/pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java
+++ b/pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java
@@ -25,10 +25,10 @@ import java.security.cert.CRLException;
import java.util.Date;
import java.util.Enumeration;
import java.util.Hashtable;
+import java.util.LinkedHashSet;
import java.util.Set;
import java.util.StringTokenizer;
import java.util.TimeZone;
-import java.util.TreeSet;
import java.util.Vector;
import netscape.security.util.BitArray;
@@ -1382,7 +1382,7 @@ public class CRLIssuingPoint implements ICRLIssuingPoint, Runnable {
if (mCRLCacheIsCleared || mCRLCerts == null || mCRLCerts.isEmpty()) {
return null;
} else {
- Set<RevokedCertificate> certSet = new TreeSet<RevokedCertificate>(mCRLCerts.values());
+ Set<RevokedCertificate> certSet = new LinkedHashSet<RevokedCertificate>(mCRLCerts.values());
return certSet;
}
}
diff --git a/pki/base/util/src/netscape/security/x509/RevokedCertImpl.java b/pki/base/util/src/netscape/security/x509/RevokedCertImpl.java
index ed78be9b8..d18324290 100755
--- a/pki/base/util/src/netscape/security/x509/RevokedCertImpl.java
+++ b/pki/base/util/src/netscape/security/x509/RevokedCertImpl.java
@@ -26,8 +26,8 @@ import java.math.BigInteger;
import java.security.cert.CRLException;
import java.util.Date;
import java.util.Enumeration;
+import java.util.LinkedHashSet;
import java.util.Set;
-import java.util.TreeSet;
import netscape.security.util.BigInt;
import netscape.security.util.DerInputStream;
@@ -294,7 +294,7 @@ public class RevokedCertImpl extends RevokedCertificate
public Set<String> getCriticalExtensionOIDs() {
if (extensions == null)
return null;
- Set<String> extSet = new TreeSet<String>();
+ Set<String> extSet = new LinkedHashSet<String>();
Extension ex;
for (Enumeration<Extension> e = extensions.getElements();
e.hasMoreElements();) {
@@ -315,7 +315,7 @@ public class RevokedCertImpl extends RevokedCertificate
public Set<String> getNonCriticalExtensionOIDs() {
if (extensions == null)
return null;
- Set<String> extSet = new TreeSet<String>();
+ Set<String> extSet = new LinkedHashSet<String>();
Extension ex;
for (Enumeration<Extension> e = extensions.getElements();
e.hasMoreElements();) {
diff --git a/pki/base/util/src/netscape/security/x509/X509CRLImpl.java b/pki/base/util/src/netscape/security/x509/X509CRLImpl.java
index 14cf3c016..a722216a2 100755
--- a/pki/base/util/src/netscape/security/x509/X509CRLImpl.java
+++ b/pki/base/util/src/netscape/security/x509/X509CRLImpl.java
@@ -37,8 +37,8 @@ import java.security.cert.X509Certificate;
import java.util.Date;
import java.util.Enumeration;
import java.util.Hashtable;
+import java.util.LinkedHashSet;
import java.util.Set;
-import java.util.TreeSet;
import netscape.security.util.BigInt;
import netscape.security.util.DerInputStream;
@@ -668,7 +668,7 @@ public class X509CRLImpl extends X509CRL {
if (revokedCerts == null || revokedCerts.isEmpty())
return null;
else {
- Set<RevokedCertificate> certSet = new TreeSet<RevokedCertificate>(revokedCerts.values());
+ Set<RevokedCertificate> certSet = new LinkedHashSet<RevokedCertificate>(revokedCerts.values());
return certSet;
}
}
@@ -802,7 +802,7 @@ public class X509CRLImpl extends X509CRL {
public Set<String> getCriticalExtensionOIDs() {
if (extensions == null)
return null;
- Set<String> extSet = new TreeSet<String>();
+ Set<String> extSet = new LinkedHashSet<String>();
Extension ex;
for (Enumeration<Extension> e = extensions.getElements();
e.hasMoreElements();) {
@@ -824,7 +824,7 @@ public class X509CRLImpl extends X509CRL {
public Set<String> getNonCriticalExtensionOIDs() {
if (extensions == null)
return null;
- Set<String> extSet = new TreeSet<String>();
+ Set<String> extSet = new LinkedHashSet<String>();
Extension ex;
for (Enumeration<Extension> e = extensions.getElements();
e.hasMoreElements();) {
diff --git a/pki/base/util/src/netscape/security/x509/X509CertImpl.java b/pki/base/util/src/netscape/security/x509/X509CertImpl.java
index c916a5d76..10aab98ec 100755
--- a/pki/base/util/src/netscape/security/x509/X509CertImpl.java
+++ b/pki/base/util/src/netscape/security/x509/X509CertImpl.java
@@ -41,8 +41,8 @@ import java.security.cert.CertificateParsingException;
import java.security.cert.X509Certificate;
import java.util.Date;
import java.util.Enumeration;
+import java.util.LinkedHashSet;
import java.util.Set;
-import java.util.TreeSet;
import java.util.Vector;
import netscape.security.util.BigInt;
@@ -913,7 +913,7 @@ implements Serializable, DerEncoder {
CertificateExtensions.NAME);
if (exts == null)
return null;
- Set<String> extSet = new TreeSet<String>();
+ Set<String> extSet = new LinkedHashSet<String>();
Extension ex;
for (Enumeration e = exts.getElements(); e.hasMoreElements(); ) {
ex = (Extension)e.nextElement();
@@ -942,7 +942,7 @@ implements Serializable, DerEncoder {
if (exts == null)
return null;
- Set<String> extSet = new TreeSet<String>();
+ Set<String> extSet = new LinkedHashSet<String>();
Extension ex;
for (Enumeration e = exts.getElements(); e.hasMoreElements(); ) {
ex = (Extension)e.nextElement();