>From 1b28037fcf192f41bc7c63253762990538966200 Mon Sep 17 00:00:00 2001
From: Adam Young <ayoung@redhat.com>
Date: Sat, 10 Dec 2011 21:29:06 -0500
Subject: [PATCH] Simple Name Instead of Extensions using a specified NAME
 field they now use the SimpleName of the class. In most
 cases,  this either matches what was used before,  or adds
 the Words "Extension" on to the end of it.

Fixed the Name for Generic Extensions

https://fedorahosted.org/pki/ticket/2
---
 pki/.gitignore                                     |    5 +
 pki/base/ca/src/com/netscape/ca/CAService.java     |   41 +-
 .../ca/src/com/netscape/ca/CMSCRLExtensions.java   |   74 ++--
 .../ca/src/com/netscape/ca/CRLIssuingPoint.java    |   26 +-
 .../src/com/netscape/ca/CertificateAuthority.java  |   41 +-
 .../common/src/com/netscape/certsrv/apps/CMS.java  |   20 +-
 .../src/com/netscape/certsrv/apps/ICMSEngine.java  |   20 +-
 .../netscape/certsrv/authentication/AuthToken.java |    8 +-
 .../certsrv/authentication/IAuthToken.java         |    2 +-
 .../src/com/netscape/certsrv/base/MetaInfo.java    |    6 +-
 .../com/netscape/certsrv/ca/ICRLIssuingPoint.java  |    5 +-
 .../certsrv/logging/ILogEventListener.java         |    8 +-
 .../src/com/netscape/certsrv/request/IRequest.java |   11 +-
 .../cms/authentication/DirBasedAuthentication.java |   14 +-
 .../SSLclientCertAuthentication.java               |    2 +-
 .../common/src/com/netscape/cms/ocsp/DefStore.java |   45 +-
 .../constraints/UniqueSubjectNameConstraints.java  |   14 +-
 .../cms/policy/extensions/AuthInfoAccessExt.java   |   27 +-
 .../extensions/AuthorityKeyIdentifierExt.java      |   16 +-
 .../cms/policy/extensions/BasicConstraintsExt.java |   20 +-
 .../extensions/CRLDistributionPointsExt.java       |   20 +-
 .../policy/extensions/CertificatePoliciesExt.java  |   22 +-
 .../extensions/CertificateRenewalWindowExt.java    |   12 +-
 .../extensions/CertificateScopeOfUseExt.java       |   16 +-
 .../cms/policy/extensions/ExtendedKeyUsageExt.java |   18 +-
 .../cms/policy/extensions/GenericASN1Ext.java      |   14 +-
 .../cms/policy/extensions/IssuerAltNameExt.java    |   14 +-
 .../cms/policy/extensions/KeyUsageExt.java         |   12 +-
 .../cms/policy/extensions/NSCCommentExt.java       |   12 +-
 .../cms/policy/extensions/NSCertTypeExt.java       |   16 +-
 .../cms/policy/extensions/NameConstraintsExt.java  |   26 +-
 .../cms/policy/extensions/OCSPNoCheckExt.java      |   12 +-
 .../policy/extensions/PolicyConstraintsExt.java    |   12 +-
 .../cms/policy/extensions/PolicyMappingsExt.java   |   20 +-
 .../cms/policy/extensions/PresenceExt.java         |    8 +-
 .../extensions/PrivateKeyUsagePeriodExt.java       |   16 +-
 .../extensions/RemoveBasicConstraintsExt.java      |   10 +-
 .../cms/policy/extensions/SubjAltNameExt.java      |   24 +-
 .../cms/policy/extensions/SubjectAltNameExt.java   |   20 +-
 .../extensions/SubjectDirectoryAttributesExt.java  |   29 +-
 .../policy/extensions/SubjectKeyIdentifierExt.java |   14 +-
 .../netscape/cms/profile/common/EnrollProfile.java |    4 +-
 .../cms/profile/constraint/EnrollConstraint.java   |    8 +-
 .../constraint/UniqueSubjectNameConstraint.java    |   10 +-
 .../def/CRLDistributionPointsExtDefault.java       |    8 +-
 .../profile/def/CertificatePoliciesExtDefault.java |   29 +-
 .../netscape/cms/profile/def/EnrollDefault.java    |   36 +-
 .../cms/profile/def/FreshestCRLExtDefault.java     |    8 +-
 .../cms/profile/def/IssuerAltNameExtDefault.java   |    2 +-
 .../cms/profile/def/NameConstraintsExtDefault.java |   24 +-
 .../cms/profile/def/PolicyMappingsExtDefault.java  |   14 +-
 .../cms/profile/def/SubjectAltNameExtDefault.java  |   10 +-
 .../def/SubjectDirAttributesExtDefault.java        |   26 +-
 .../netscape/cms/publish/mappers/AVAPattern.java   |    7 +-
 .../cms/publish/mappers/LdapCaSimpleMap.java       |    8 +-
 .../cms/publish/mappers/LdapEnhancedMap.java       |   10 +-
 .../cms/publish/mappers/LdapSimpleMap.java         |    8 +-
 .../cms/publish/mappers/MapAVAPattern.java         |    7 +-
 .../netscape/cms/publish/mappers/MapDNPattern.java |    6 +-
 .../cms/publish/mappers/MapRDNPattern.java         |    6 +-
 .../publishers/LdapEncryptCertPublisher.java       |   23 +-
 .../cms/servlet/admin/CMSAdminServlet.java         |   83 ++-
 .../com/netscape/cms/servlet/base/CMSServlet.java  |   44 +-
 .../cms/servlet/cert/CMCRevReqServlet.java         |   12 +-
 .../servlet/cert/ChallengeRevocationServlet1.java  |   12 +-
 .../netscape/cms/servlet/cert/DisplayBySerial.java |    2 +-
 .../com/netscape/cms/servlet/cert/DoRevoke.java    |   14 +-
 .../com/netscape/cms/servlet/cert/DoRevokeTPS.java |   10 +-
 .../netscape/cms/servlet/cert/EnrollServlet.java   |    6 +-
 .../cms/servlet/cert/HashEnrollServlet.java        |   12 +-
 .../com/netscape/cms/servlet/cert/ListCerts.java   |   12 +-
 .../com/netscape/cms/servlet/cert/SrchCerts.java   |    8 +-
 .../com/netscape/cms/servlet/cert/UpdateCRL.java   |   11 +-
 .../cms/servlet/cert/scep/CRSEnrollment.java       |   84 ++--
 .../cms/servlet/cert/scep/ChallengePassword.java   |    6 +-
 .../cms/servlet/cert/scep/ExtensionsRequested.java |    9 +-
 .../cms/servlet/common/CMCOutputTemplate.java      |    4 +-
 .../cms/servlet/connector/ConnectorServlet.java    |    4 +-
 .../cms/servlet/profile/ProfileSubmitServlet.java  |   51 +-
 .../cms/servlet/request/CertReqParser.java         |   51 +-
 .../cms/servlet/request/ProcessCertReq.java        |   17 +-
 .../src/com/netscape/cmscore/apps/CMSEngine.java   |   45 +-
 .../src/com/netscape/cmscore/cert/CertUtils.java   |    2 +-
 .../netscape/cmscore/cert/CrlCachePrettyPrint.java |    8 +-
 .../netscape/cmscore/cert/OidLoaderSubsystem.java  |   16 +-
 .../netscape/cmscore/dbs/RevocationInfoMapper.java |   12 +-
 .../netscape/cmscore/dbs/X509CertImplMapper.java   |   20 +-
 .../cmscore/extensions/CMSExtensionsMap.java       |    6 +-
 .../notification/ReqCertSANameEmailResolver.java   |   12 +-
 .../netscape/cmscore/request/ARequestQueue.java    |   80 ++--
 .../netscape/cmscore/request/ExtDataHashtable.java |   18 +-
 .../netscape/cmscore/security/CertificateInfo.java |    4 +-
 .../netscape/cmscore/security/JssSubsystem.java    |   56 +-
 .../com/netscape/cmscore/security/KeyCertUtil.java |   23 +-
 .../netscape/certsrv/app/CMSEngineDefaultStub.java |   82 ++-
 .../cmscore/request/ExtDataHashtableTest.java      |   10 +-
 .../cmscore/request/RequestDefaultStub.java        |   12 +-
 .../com/netscape/cmscore/request/RequestTest.java  |   60 +-
 .../src/com/netscape/cmstools/GenExtKeyUsage.java  |    4 +-
 .../src/com/netscape/cmstools/PrettyPrintCert.java |    2 +-
 .../src/com/netscape/cmstools/PrettyPrintCrl.java  |    8 +-
 .../com/netscape/pkisilent/common/Utilities.java   |   10 +-
 .../com/netscape/cmsutil/crypto/CryptoUtil.java    |   10 +-
 .../com/netscape/cmsutil/scep/CRSPKIMessage.java   |   16 +-
 .../extensions/AuthInfoAccessExtension.java        |   21 +-
 .../CertificateRenewalWindowExtension.java         |   10 +-
 .../extensions/CertificateScopeOfUseExtension.java |   14 +-
 .../extensions/ExtendedKeyUsageExtension.java      |   24 +-
 .../security/extensions/GenericASN1Extension.java  |   27 +-
 .../extensions/InhibitAnyPolicyExtension.java      |    8 +-
 .../netscape/security/extensions/KerberosName.java |    6 +-
 .../security/extensions/NSCertTypeExtension.java   |   11 +-
 .../security/extensions/OCSPNoCheckExtension.java  |    9 +-
 .../extensions/PresenceServerExtension.java        |    9 +-
 .../extensions/SubjectInfoAccessExtension.java     |   21 +-
 .../netscape/security/pkcs/PKCS10Attribute.java    |    9 +-
 .../src/netscape/security/pkcs/PKCS9Attribute.java |   14 +-
 .../security/provider/X509CertificateFactory.java  |    4 +-
 .../src/netscape/security/util/CrlPrettyPrint.java |    9 +-
 .../src/netscape/security/util/ExtPrettyPrint.java |   19 +-
 .../src/netscape/security/x509/ACertAttrSet.java   |    2 +-
 .../x509/AuthorityKeyIdentifierExtension.java      |    9 +-
 .../security/x509/BasicConstraintsExtension.java   |    9 +-
 .../x509/CRLDistributionPointsExtension.java       |   28 +-
 .../netscape/security/x509/CRLNumberExtension.java |    9 +-
 .../netscape/security/x509/CRLReasonExtension.java |    9 +-
 .../src/netscape/security/x509/CertAttrSet.java    |    3 +-
 .../security/x509/CertificateAlgorithmId.java      |    2 +-
 .../security/x509/CertificateExtensions.java       |   34 +-
 .../security/x509/CertificateIssuerExtension.java  |   11 +-
 .../security/x509/CertificateIssuerName.java       |    2 +-
 .../x509/CertificateIssuerUniqueIdentity.java      |    2 +-
 .../x509/CertificatePoliciesExtension.java         |   43 +-
 .../security/x509/CertificateSerialNumber.java     |    2 +-
 .../security/x509/CertificateSubjectName.java      |    2 +-
 .../x509/CertificateSubjectUniqueIdentity.java     |    2 +-
 .../security/x509/CertificateValidity.java         |    2 +-
 .../netscape/security/x509/CertificateVersion.java |    2 +-
 .../netscape/security/x509/CertificateX509Key.java |    2 +-
 .../security/x509/DeltaCRLIndicatorExtension.java  |   11 +-
 .../util/src/netscape/security/x509/Extension.java |    5 +
 .../src/netscape/security/x509/Extensions.java     |   29 +-
 .../security/x509/FreshestCRLExtension.java        |   27 +-
 .../security/x509/HoldInstructionExtension.java    |   11 +-
 .../security/x509/InvalidityDateExtension.java     |   11 +-
 .../x509/IssuerAlternativeNameExtension.java       |    9 +-
 .../x509/IssuingDistributionPointExtension.java    |   11 +-
 .../netscape/security/x509/KeyUsageExtension.java  |    9 +-
 .../security/x509/NSCCommentExtension.java         |   22 +-
 .../security/x509/NameConstraintsExtension.java    |    9 +-
 .../util/src/netscape/security/x509/OIDMap.java    |   56 +-
 .../security/x509/PolicyConstraintsExtension.java  |    9 +-
 .../security/x509/PolicyMappingsExtension.java     |   28 +-
 .../security/x509/PrivateKeyUsageExtension.java    |   10 +-
 .../netscape/security/x509/RevokedCertImpl.java    |  680 ++++++++++----------
 .../netscape/security/x509/RevokedCertificate.java |    5 +
 .../x509/SubjectAlternativeNameExtension.java      |    9 +-
 .../x509/SubjectDirAttributesExtension.java        |   25 +-
 .../x509/SubjectKeyIdentifierExtension.java        |    9 +-
 .../src/netscape/security/x509/X509CertImpl.java   |   24 +-
 .../src/netscape/security/x509/X509CertInfo.java   |    2 +-
 161 files changed, 1645 insertions(+), 1730 deletions(-)

diff --git a/pki/.gitignore b/pki/.gitignore
index dc84959d1dcee0eb0a0a0a34dda9b3489debcb8d..aa25dac5dae3458d010b4c17f91c551486210d21 100644
--- a/pki/.gitignore
+++ b/pki/.gitignore
@@ -1,2 +1,7 @@
+pki/build/
+.metadata/
 build/
+packages.*/
+packages/
+
 
diff --git a/pki/base/ca/src/com/netscape/ca/CAService.java b/pki/base/ca/src/com/netscape/ca/CAService.java
index 159539d453b78c9a89a3a3cc571f743459b95f17..64fd73e490c0521e0ad33d760401d1ad8531fbad 100644
--- a/pki/base/ca/src/com/netscape/ca/CAService.java
+++ b/pki/base/ca/src/com/netscape/ca/CAService.java
@@ -46,6 +46,7 @@ import netscape.security.x509.CertificateIssuerName;
 import netscape.security.x509.CertificateSerialNumber;
 import netscape.security.x509.CertificateSubjectName;
 import netscape.security.x509.CertificateValidity;
+import netscape.security.x509.Extension;
 import netscape.security.x509.LdapV3DNStrConverter;
 import netscape.security.x509.PKIXExtensions;
 import netscape.security.x509.RevocationReason;
@@ -106,11 +107,11 @@ public class CAService implements ICAService, IService {
     protected static IConnector mCLAConnector = null;
 
     private ICertificateAuthority mCA = null;
-    private Hashtable mServants = new Hashtable();
+    private Hashtable<String, IServant> mServants = new Hashtable<String, IServant>();
     private IConnector mKRAConnector = null;
     private IConfigStore mConfig = null;
     private boolean mArchivalRequired = true;
-    private Hashtable mCRLIssuingPoints = new Hashtable();
+    private Hashtable<String, ICRLIssuingPoint> mCRLIssuingPoints = new Hashtable<String, ICRLIssuingPoint>();
 
     private ILogger mSignedAuditLogger = CMS.getSignedAuditLogger();
     private final static String
@@ -533,7 +534,7 @@ public class CAService implements ICAService, IService {
     /**
      * get CRL Issuing Point
      */
-    public Hashtable getCRLIssuingPoints() {
+    public Hashtable<String, ICRLIssuingPoint> getCRLIssuingPoints() {
         return mCRLIssuingPoints;
     }
 
@@ -686,7 +687,7 @@ public class CAService implements ICAService, IService {
                 exts = (CertificateExtensions)
                     certi.get(X509CertInfo.EXTENSIONS);
                 if (exts != null) {
-                    Enumeration e = exts.getElements();
+                    Enumeration<Extension> e = exts.getAttributes();
 
                     while (e.hasMoreElements()) {
                         netscape.security.x509.Extension ext = (netscape.security.x509.Extension) e.nextElement();
@@ -921,7 +922,7 @@ public class CAService implements ICAService, IService {
                 } else {
                     if (Debug.ON) {
                         System.out.println("Old meta info");
-                        Enumeration n = oldMeta.getElements();
+                        Enumeration<String> n = oldMeta.getElements();
 
                         while (n.hasMoreElements()) {
                             String name = (String) n.nextElement();
@@ -947,7 +948,7 @@ public class CAService implements ICAService, IService {
                         mCA.getCertificateRepository().readCertificateRecord(oldSerialNo);
                     MetaInfo meta = check.getMetaInfo();
 
-                    Enumeration n = oldMeta.getElements();
+                    Enumeration<String> n = oldMeta.getElements();
 
                     while (n.hasMoreElements()) {
                         String name = (String) n.nextElement();
@@ -994,7 +995,7 @@ public class CAService implements ICAService, IService {
         if (exts != null) {
             try {
                 reasonext = (CRLReasonExtension)
-                        exts.get(CRLReasonExtension.NAME);
+                        exts.get(CRLReasonExtension.class.getSimpleName());
             } catch (X509ExtensionException e) {
                 // this means no crl reason extension set.
             }
@@ -1013,7 +1014,7 @@ public class CAService implements ICAService, IService {
             mCA.log(ILogger.LL_INFO, CMS.getLogMessage("CMSCORE_CA_CERT_REVOKED",
                     serialno.toString(16)));
             // inform all CRLIssuingPoints about revoked certificate
-            Enumeration eIPs = mCRLIssuingPoints.elements();
+            Enumeration<ICRLIssuingPoint> eIPs = mCRLIssuingPoints.elements();
 
             while (eIPs.hasMoreElements()) {
                 ICRLIssuingPoint ip = (ICRLIssuingPoint) eIPs.nextElement();
@@ -1077,7 +1078,7 @@ public class CAService implements ICAService, IService {
         if (exts != null) {
             try {
                 reasonext = (CRLReasonExtension)
-                        exts.get(CRLReasonExtension.NAME);
+                        exts.get(CRLReasonExtension.class.getSimpleName());
             } catch (X509ExtensionException e) {
                 mCA.log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_CA_CERT_ON_HOLD", serialNo.toString())); 
                 throw new ECAException(CMS.getUserMessage("CMS_CA_IS_NOT_ON_HOLD", 
@@ -1098,7 +1099,7 @@ public class CAService implements ICAService, IService {
                     certRec.getRevokedOn(), certRec.getRevokedBy());
                 mCA.log(ILogger.LL_INFO, CMS.getLogMessage("CMSCORE_CA_CERT_UNREVOKED", serialNo.toString(16)));
                 // inform all CRLIssuingPoints about unrevoked certificate
-                Enumeration eIPs = mCRLIssuingPoints.elements();
+                Enumeration<ICRLIssuingPoint> eIPs = mCRLIssuingPoints.elements();
 
                 while (eIPs.hasMoreElements()) {
                     ICRLIssuingPoint ip = (ICRLIssuingPoint) eIPs.nextElement();
@@ -1614,15 +1615,15 @@ class serviceCheckChallenge implements IServant {
                 String filter = "(&(x509cert.subject=" + subjectName + ")(certStatus=VALID))";
                 ICertRecordList list = certDB.findCertRecordsInList(filter, null, 10);
                 int size = list.getSize();
-                Enumeration en = list.getCertRecords(0, size - 1);
+                Enumeration<ICertRecord> en = list.getCertRecords(0, size - 1);
 
                 if (!en.hasMoreElements()) {
                     bigIntArray = new BigInteger[0];
                 } else {
-                    Vector idv = new Vector();
+                    Vector<BigInteger> idv = new Vector<BigInteger>();
 
                     while (en.hasMoreElements()) {
-                        CertRecord record = (CertRecord) en.nextElement();
+                        ICertRecord record =  en.nextElement();
                         boolean samepwd = compareChallengePassword(record, pwd);
 
                         if (samepwd) {
@@ -1644,7 +1645,7 @@ class serviceCheckChallenge implements IServant {
         return true;
     }
 
-    private boolean compareChallengePassword(CertRecord record, String pwd)
+    private boolean compareChallengePassword(ICertRecord record, String pwd)
         throws EBaseException {
         MetaInfo metaInfo = (MetaInfo) record.get(CertRecord.ATTR_META_INFO);
 
@@ -1925,7 +1926,7 @@ class serviceGetRevocationInfo implements IServant {
 
     public boolean service(IRequest request)
         throws EBaseException {
-        Enumeration enum1 = request.getExtDataKeys();
+        Enumeration<String> enum1 = request.getExtDataKeys();
 
         while (enum1.hasMoreElements()) {
             String name = (String) enum1.nextElement();
@@ -1966,7 +1967,7 @@ class serviceGetCertificates implements IServant {
 
     public boolean service(IRequest request)
         throws EBaseException {
-        Enumeration enum1 = request.getExtDataKeys();
+        Enumeration<String> enum1 = request.getExtDataKeys();
 
         while (enum1.hasMoreElements()) {
             String name = (String) enum1.nextElement();
@@ -2034,8 +2035,8 @@ class serviceCert4Crl implements IServant {
                 //				mService.revokeCert(crlentries[i]);
                 recordedCerts[i] = revokedCertRecs[i];
                 // inform all CRLIssuingPoints about revoked certificate
-                Hashtable hips = mService.getCRLIssuingPoints();
-                Enumeration eIPs = hips.elements();
+                Hashtable<String, ICRLIssuingPoint> hips = mService.getCRLIssuingPoints();
+                Enumeration<ICRLIssuingPoint> eIPs = hips.elements();
 
                 while (eIPs.hasMoreElements()) {
                     ICRLIssuingPoint ip = (ICRLIssuingPoint) eIPs.nextElement();
@@ -2096,8 +2097,8 @@ class serviceUnCert4Crl implements IServant {
             try {
                 mCA.getCertificateRepository().deleteCertificateRecord(oldSerialNo[i]);
                 // inform all CRLIssuingPoints about unrevoked certificate
-                Hashtable hips = mService.getCRLIssuingPoints();
-                Enumeration eIPs = hips.elements();
+                Hashtable<String, ICRLIssuingPoint> hips = mService.getCRLIssuingPoints();
+                Enumeration<ICRLIssuingPoint> eIPs = hips.elements();
 
                 while (eIPs.hasMoreElements()) {
                     ICRLIssuingPoint ip = (ICRLIssuingPoint) eIPs.nextElement();
diff --git a/pki/base/ca/src/com/netscape/ca/CMSCRLExtensions.java b/pki/base/ca/src/com/netscape/ca/CMSCRLExtensions.java
index 51d0341798523e88255374191f7020cfd047d61a..8024cd33b19151b31d694a8755d6752400a9bfeb 100644
--- a/pki/base/ca/src/com/netscape/ca/CMSCRLExtensions.java
+++ b/pki/base/ca/src/com/netscape/ca/CMSCRLExtensions.java
@@ -90,75 +90,75 @@ public class CMSCRLExtensions implements ICMSCRLExtensions {
     static {
 
         /* Default CRL Extensions */
-        mDefaultCRLExtensionNames.addElement(AuthorityKeyIdentifierExtension.NAME);
-        mDefaultCRLExtensionNames.addElement(IssuerAlternativeNameExtension.NAME);
-        mDefaultCRLExtensionNames.addElement(CRLNumberExtension.NAME);
-        mDefaultCRLExtensionNames.addElement(DeltaCRLIndicatorExtension.NAME);
-        mDefaultCRLExtensionNames.addElement(IssuingDistributionPointExtension.NAME);
-        mDefaultCRLExtensionNames.addElement(FreshestCRLExtension.NAME);
-        mDefaultCRLExtensionNames.addElement(AuthInfoAccessExtension.NAME2);
+        mDefaultCRLExtensionNames.addElement(AuthorityKeyIdentifierExtension.class.getSimpleName());
+        mDefaultCRLExtensionNames.addElement(IssuerAlternativeNameExtension.class.getSimpleName());
+        mDefaultCRLExtensionNames.addElement(CRLNumberExtension.class.getSimpleName());
+        mDefaultCRLExtensionNames.addElement(DeltaCRLIndicatorExtension.class.getSimpleName());
+        mDefaultCRLExtensionNames.addElement(IssuingDistributionPointExtension.class.getSimpleName());
+        mDefaultCRLExtensionNames.addElement(FreshestCRLExtension.class.getSimpleName());
+        mDefaultCRLExtensionNames.addElement(AuthInfoAccessExtension.class.getSimpleName());
 
         /* Default CRL Entry Extensions */
-        mDefaultCRLEntryExtensionNames.addElement(CRLReasonExtension.NAME);
+        mDefaultCRLEntryExtensionNames.addElement(CRLReasonExtension.class.getSimpleName());
         //mDefaultCRLEntryExtensionNames.addElement(HoldInstructionExtension.NAME);
-        mDefaultCRLEntryExtensionNames.addElement(InvalidityDateExtension.NAME);
+        mDefaultCRLEntryExtensionNames.addElement(InvalidityDateExtension.class.getSimpleName());
         //mDefaultCRLEntryExtensionNames.addElement(CertificateIssuerExtension.NAME);
 
         /* Default Enabled CRL Extensions */
-        mDefaultEnabledCRLExtensions.addElement(CRLNumberExtension.NAME);
+        mDefaultEnabledCRLExtensions.addElement(CRLNumberExtension.class.getSimpleName());
         //mDefaultEnabledCRLExtensions.addElement(DeltaCRLIndicatorExtension.NAME);
-        mDefaultEnabledCRLExtensions.addElement(CRLReasonExtension.NAME);
-        mDefaultEnabledCRLExtensions.addElement(InvalidityDateExtension.NAME);
+        mDefaultEnabledCRLExtensions.addElement(CRLReasonExtension.class.getSimpleName());
+        mDefaultEnabledCRLExtensions.addElement(InvalidityDateExtension.class.getSimpleName());
 
         /* Default Critical CRL Extensions */
-        mDefaultCriticalCRLExtensions.addElement(DeltaCRLIndicatorExtension.NAME);
-        mDefaultCriticalCRLExtensions.addElement(IssuingDistributionPointExtension.NAME);
+        mDefaultCriticalCRLExtensions.addElement(DeltaCRLIndicatorExtension.class.getSimpleName());
+        mDefaultCriticalCRLExtensions.addElement(IssuingDistributionPointExtension.class.getSimpleName());
         //mDefaultCriticalCRLExtensions.addElement(CertificateIssuerExtension.NAME);
 
         /* CRL extension IDs */
         mDefaultCRLExtensionIDs.put(PKIXExtensions.AuthorityKey_Id.toString(),
-            AuthorityKeyIdentifierExtension.NAME);
+            AuthorityKeyIdentifierExtension.class.getSimpleName());
         mDefaultCRLExtensionIDs.put(PKIXExtensions.IssuerAlternativeName_Id.toString(),
-            IssuerAlternativeNameExtension.NAME);
+            IssuerAlternativeNameExtension.class.getSimpleName());
         mDefaultCRLExtensionIDs.put(PKIXExtensions.CRLNumber_Id.toString(),
-            CRLNumberExtension.NAME);
+            CRLNumberExtension.class.getSimpleName());
         mDefaultCRLExtensionIDs.put(PKIXExtensions.DeltaCRLIndicator_Id.toString(),
-            DeltaCRLIndicatorExtension.NAME);
+            DeltaCRLIndicatorExtension.class.getSimpleName());
         mDefaultCRLExtensionIDs.put(PKIXExtensions.IssuingDistributionPoint_Id.toString(),
-            IssuingDistributionPointExtension.NAME);
+            IssuingDistributionPointExtension.class.getSimpleName());
         mDefaultCRLExtensionIDs.put(PKIXExtensions.ReasonCode_Id.toString(),
-            CRLReasonExtension.NAME);
+            CRLReasonExtension.class.getSimpleName());
         mDefaultCRLExtensionIDs.put(PKIXExtensions.HoldInstructionCode_Id.toString(),
-            HoldInstructionExtension.NAME);
+            HoldInstructionExtension.class.getSimpleName());
         mDefaultCRLExtensionIDs.put(PKIXExtensions.InvalidityDate_Id.toString(),
-            InvalidityDateExtension.NAME);
+            InvalidityDateExtension.class.getSimpleName());
         //mDefaultCRLExtensionIDs.put(PKIXExtensions.CertificateIssuer_Id.toString(),
         //                     CertificateIssuerExtension.NAME);
         mDefaultCRLExtensionIDs.put(PKIXExtensions.FreshestCRL_Id.toString(),
-            FreshestCRLExtension.NAME);
+            FreshestCRLExtension.class.getSimpleName());
         mDefaultCRLExtensionIDs.put(AuthInfoAccessExtension.ID.toString(),
             AuthInfoAccessExtension.NAME2);
 
         /* Class names */
-        mDefaultCRLExtensionClassNames.put(AuthorityKeyIdentifierExtension.NAME,
+        mDefaultCRLExtensionClassNames.put(AuthorityKeyIdentifierExtension.class.getSimpleName(),
             "com.netscape.cms.crl.CMSAuthorityKeyIdentifierExtension");
-        mDefaultCRLExtensionClassNames.put(IssuerAlternativeNameExtension.NAME,
+        mDefaultCRLExtensionClassNames.put(IssuerAlternativeNameExtension.class.getSimpleName(),
             "com.netscape.cms.crl.CMSIssuerAlternativeNameExtension");
-        mDefaultCRLExtensionClassNames.put(CRLNumberExtension.NAME,
+        mDefaultCRLExtensionClassNames.put(CRLNumberExtension.class.getSimpleName(),
             "com.netscape.cms.crl.CMSCRLNumberExtension");
-        mDefaultCRLExtensionClassNames.put(DeltaCRLIndicatorExtension.NAME,
+        mDefaultCRLExtensionClassNames.put(DeltaCRLIndicatorExtension.class.getSimpleName(),
             "com.netscape.cms.crl.CMSDeltaCRLIndicatorExtension");
-        mDefaultCRLExtensionClassNames.put(IssuingDistributionPointExtension.NAME,
+        mDefaultCRLExtensionClassNames.put(IssuingDistributionPointExtension.class.getSimpleName(),
             "com.netscape.cms.crl.CMSIssuingDistributionPointExtension");
-        mDefaultCRLExtensionClassNames.put(CRLReasonExtension.NAME,
+        mDefaultCRLExtensionClassNames.put(CRLReasonExtension.class.getSimpleName(),
             "com.netscape.cms.crl.CMSCRLReasonExtension");
-        mDefaultCRLExtensionClassNames.put(HoldInstructionExtension.NAME,
+        mDefaultCRLExtensionClassNames.put(HoldInstructionExtension.class.getSimpleName(),
             "com.netscape.cms.crl.CMSHoldInstructionExtension");
-        mDefaultCRLExtensionClassNames.put(InvalidityDateExtension.NAME,
+        mDefaultCRLExtensionClassNames.put(InvalidityDateExtension.class.getSimpleName(),
             "com.netscape.cms.crl.CMSInvalidityDateExtension");
         //mDefaultCRLExtensionClassNames.put(CertificateIssuerExtension.NAME,
         //        "com.netscape.cms.crl.CMSCertificateIssuerExtension");
-        mDefaultCRLExtensionClassNames.put(FreshestCRLExtension.NAME,
+        mDefaultCRLExtensionClassNames.put(FreshestCRLExtension.class.getSimpleName(),
             "com.netscape.cms.crl.CMSFreshestCRLExtension");
         mDefaultCRLExtensionClassNames.put(AuthInfoAccessExtension.NAME2,
             "com.netscape.cms.crl.CMSAuthInfoAccessExtension");
@@ -166,25 +166,25 @@ public class CMSCRLExtensions implements ICMSCRLExtensions {
         try {
             OIDMap.addAttribute(DeltaCRLIndicatorExtension.class.getName(),
                 DeltaCRLIndicatorExtension.OID,
-                DeltaCRLIndicatorExtension.NAME);
+                DeltaCRLIndicatorExtension.class.getSimpleName());
         } catch (CertificateException e) {
         }
         try {
             OIDMap.addAttribute(HoldInstructionExtension.class.getName(),
                 HoldInstructionExtension.OID,
-                HoldInstructionExtension.NAME);
+                HoldInstructionExtension.class.getSimpleName());
         } catch (CertificateException e) {
         }
         try {
             OIDMap.addAttribute(InvalidityDateExtension.class.getName(),
                 InvalidityDateExtension.OID,
-                InvalidityDateExtension.NAME);
+                InvalidityDateExtension.class.getSimpleName());
         } catch (CertificateException e) {
         }
         try {
             OIDMap.addAttribute(FreshestCRLExtension.class.getName(),
                 FreshestCRLExtension.OID,
-                FreshestCRLExtension.NAME);
+                FreshestCRLExtension.class.getSimpleName());
         } catch (CertificateException e) {
         }
     }
@@ -605,7 +605,7 @@ public class CMSCRLExtensions implements ICMSCRLExtensions {
 
                 CMSCRLExtensions cmsCRLExtensions = (CMSCRLExtensions) ip.getCRLExtensions();
                 if(cmsCRLExtensions != null) {
-                    issuingDistPointExtEnabled =  cmsCRLExtensions.isCRLExtensionEnabled(IssuingDistributionPointExtension.NAME); 
+                    issuingDistPointExtEnabled =  cmsCRLExtensions.isCRLExtensionEnabled(IssuingDistributionPointExtension.class.getSimpleName()); 
                 }
 
                 CMS.debug("issuingDistPointExtEnabled = " + issuingDistPointExtEnabled);
diff --git a/pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java b/pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java
index ef0e949ab2dde521c32a6178458f844848fb1349..5b98c62e92fcd85fb90d850f49557ab26c270f2d 100644
--- a/pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java
+++ b/pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java
@@ -22,7 +22,6 @@ import java.io.IOException;
 import java.math.BigInteger;
 import java.security.NoSuchAlgorithmException;
 import java.security.cert.CRLException;
-import java.util.Collection;
 import java.util.Date;
 import java.util.Enumeration;
 import java.util.Hashtable;
@@ -1122,7 +1121,7 @@ public class CRLIssuingPoint implements ICRLIssuingPoint, Runnable {
                 }
 
                 if (name.equals(Constants.PR_CA_CERTS_ONLY)) {
-                    Extension distExt = getCRLExtension(IssuingDistributionPointExtension.NAME);
+                    Extension distExt = getCRLExtension(IssuingDistributionPointExtension.class.getSimpleName());
                     IssuingDistributionPointExtension iExt = (IssuingDistributionPointExtension) distExt;
                     IssuingDistributionPoint issuingDistributionPoint =  null;
                    if(iExt != null)
@@ -1147,7 +1146,7 @@ public class CRLIssuingPoint implements ICRLIssuingPoint, Runnable {
                             IConfigStore crlSubStore = crlsSubStore.getSubStore(mId);
                             IConfigStore crlExtsSubStore =
                                 crlSubStore.getSubStore(ICertificateAuthority.PROP_CRLEXT_SUBSTORE);
-                            crlExtsSubStore = crlExtsSubStore.getSubStore(IssuingDistributionPointExtension.NAME);
+                            crlExtsSubStore = crlExtsSubStore.getSubStore(IssuingDistributionPointExtension.class.getSimpleName());
 
                             if(crlExtsSubStore != null) {
                                 String val = "";
@@ -2202,9 +2201,9 @@ public class CRLIssuingPoint implements ICRLIssuingPoint, Runnable {
 
     public boolean isDeltaCRLEnabled() {
         return (mAllowExtensions && mEnableCRLCache &&
-                mCMSCRLExtensions.isCRLExtensionEnabled(DeltaCRLIndicatorExtension.NAME) &&
-                mCMSCRLExtensions.isCRLExtensionEnabled(CRLNumberExtension.NAME) &&
-                mCMSCRLExtensions.isCRLExtensionEnabled(CRLReasonExtension.NAME));
+                mCMSCRLExtensions.isCRLExtensionEnabled(DeltaCRLIndicatorExtension.class.getSimpleName()) &&
+                mCMSCRLExtensions.isCRLExtensionEnabled(CRLNumberExtension.class.getSimpleName()) &&
+                mCMSCRLExtensions.isCRLExtensionEnabled(CRLReasonExtension.class.getSimpleName()));
     }
 
     public boolean isThisCurrentDeltaCRL(X509CRLImpl deltaCRL) {
@@ -2435,7 +2434,7 @@ public class CRLIssuingPoint implements ICRLIssuingPoint, Runnable {
                     String extName = extNames.elementAt(i);
 
                     if (mCMSCRLExtensions.isCRLExtensionEnabled(extName) &&
-                        (!extName.equals(FreshestCRLExtension.NAME))) {
+                        (!extName.equals(FreshestCRLExtension.class.getSimpleName()))) {
                         mCMSCRLExtensions.addToCRLExtensions(ext, extName, null);
                     }
                 }
@@ -2596,7 +2595,7 @@ public class CRLIssuingPoint implements ICRLIssuingPoint, Runnable {
                     String extName = extNames.elementAt(i);
 
                     if (mCMSCRLExtensions.isCRLExtensionEnabled(extName) &&
-                        (!extName.equals(DeltaCRLIndicatorExtension.NAME))) {
+                        (!extName.equals(DeltaCRLIndicatorExtension.class.getSimpleName()))) {
                         mCMSCRLExtensions.addToCRLExtensions(ext, extName, null);
                     }
                 }
@@ -2774,8 +2773,7 @@ public class CRLIssuingPoint implements ICRLIssuingPoint, Runnable {
      *  Suppress the warnings generated by adding to the session context   
      *   
      */
-    @SuppressWarnings("unchecked")
-	protected void publishCRL(X509CRLImpl x509crl, boolean isDeltaCRL) 
+    protected void publishCRL(X509CRLImpl x509crl, boolean isDeltaCRL) 
         throws EBaseException {
         SessionContext sc = SessionContext.getContext();
 
@@ -2971,7 +2969,7 @@ class CertRecProcessor implements IElementProcessor {
           return result;
        }
        boolean isIssuingDistPointExtEnabled =  false;
-        isIssuingDistPointExtEnabled =  exts.isCRLExtensionEnabled(IssuingDistributionPointExtension.NAME);
+        isIssuingDistPointExtEnabled =  exts.isCRLExtensionEnabled(IssuingDistributionPointExtension.class.getSimpleName());
         if(isIssuingDistPointExtEnabled == false) {
             mIssuingDistPointEnabled = false;
             return false;
@@ -2984,13 +2982,13 @@ class CertRecProcessor implements IElementProcessor {
         Vector<String> extNames = exts.getCRLExtensionNames();
             for (int i = 0; i < extNames.size(); i++) {
                 String extName = extNames.elementAt(i);
-                if (extName.equals(IssuingDistributionPointExtension.NAME)) {
+                if (extName.equals(IssuingDistributionPointExtension.class.getSimpleName())) {
                    exts.addToCRLExtensions(ext, extName, null);
                 }
             }
             Extension issuingDistExt = null;
             try {
-                issuingDistExt = ext.get(IssuingDistributionPointExtension.NAME);
+                issuingDistExt = ext.get(IssuingDistributionPointExtension.class.getSimpleName());
             } catch (Exception e) {
             }
 
@@ -3031,7 +3029,7 @@ class CertRecProcessor implements IElementProcessor {
 
         Extension crlReasonExt = null;
         try {
-                 crlReasonExt = entryExts.get(CRLReasonExtension.NAME);
+                 crlReasonExt = entryExts.get(CRLReasonExtension.class.getSimpleName());
         } catch (Exception e) {
             return includeCert;
         }
diff --git a/pki/base/ca/src/com/netscape/ca/CertificateAuthority.java b/pki/base/ca/src/com/netscape/ca/CertificateAuthority.java
index a81ae362a4f5bc5006c28c4b229fb15be66931cf..5019c9fd356f5f65895e865fc1e89d20cbf7f49c 100644
--- a/pki/base/ca/src/com/netscape/ca/CertificateAuthority.java
+++ b/pki/base/ca/src/com/netscape/ca/CertificateAuthority.java
@@ -134,7 +134,7 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
     protected ISubsystem mOwner = null;
     protected IConfigStore mConfig = null;
     protected ILogger mLogger = CMS.getLogger();
-    protected Hashtable<String, CRLIssuingPoint> mCRLIssuePoints = new Hashtable<String, CRLIssuingPoint>(); 
+    protected Hashtable<String, ICRLIssuingPoint> mCRLIssuePoints = new Hashtable<String, ICRLIssuingPoint>(); 
     protected CRLIssuingPoint mMasterCRLIssuePoint = null; // the complete crl. 
     protected SigningUnit mSigningUnit;
     protected SigningUnit mOCSPSigningUnit;
@@ -209,7 +209,7 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
     private ResponderID mResponderIDByName = null;
     private ResponderID mResponderIDByHash = null;
 
-    protected Hashtable mListenerPlugins = null;
+    protected Hashtable<String, ListenerPlugin> mListenerPlugins = null;
 
     /**
      * Internal constants
@@ -355,10 +355,10 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
 
             if (publisherClass != null) {
                 try {
-                    Class pc = Class.forName(publisherClass);
+                    @SuppressWarnings("unchecked")
+					Class<ICRLPublisher> pc = (Class<ICRLPublisher>) Class.forName(publisherClass);
 
-                    mCRLPublisher = (ICRLPublisher)
-                            pc.newInstance();
+                    mCRLPublisher = pc.newInstance();
                     mCRLPublisher.init(this, cpStore);
                 } catch (ClassNotFoundException ee) {
                     log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_CA_CA_NO_PUBLISHER", ee.toString()));
@@ -457,7 +457,7 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
         return mPNotify.getListener(name);
     }
 
-    public Enumeration getRequestListenerNames() {
+    public Enumeration<String> getRequestListenerNames() {
         return mNotify.getListenerNames();
     }
 
@@ -522,7 +522,7 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
      * <P>
      */
     public void shutdown() {
-        Enumeration enums = mCRLIssuePoints.elements();
+        Enumeration<ICRLIssuingPoint> enums = mCRLIssuePoints.elements();
         while (enums.hasMoreElements()) {
             CRLIssuingPoint point = (CRLIssuingPoint)enums.nextElement();
             point.shutdown();
@@ -668,7 +668,7 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
      * <P>
      * @return security service
      */
-    public Enumeration getCRLIssuingPoints() {
+    public Enumeration<ICRLIssuingPoint> getCRLIssuingPoints() {
         return mCRLIssuePoints.elements();
     }
 
@@ -679,7 +679,8 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
     /**
      * Adds CRL issuing point with the given identifier and description.
      */
-    public boolean addCRLIssuingPoint(IConfigStore crlSubStore, String id,
+    @SuppressWarnings("unchecked")
+	public boolean addCRLIssuingPoint(IConfigStore crlSubStore, String id,
                                       boolean enable, String description) {
         crlSubStore.makeSubStore(id);
         IConfigStore c = crlSubStore.getSubStore(id);
@@ -801,12 +802,12 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
             c.putString("extension.FreshestCRL.pointName0", "");
 
             String issuingPointClassName = null;
-            Class issuingPointClass = null;
+            Class<CRLIssuingPoint> issuingPointClass = null;
             CRLIssuingPoint issuingPoint = null;
 
             try {
                 issuingPointClassName = c.getString(PROP_CLASS);
-                issuingPointClass = Class.forName(issuingPointClassName);
+                issuingPointClass = (Class<CRLIssuingPoint>)Class.forName(issuingPointClassName);
                 issuingPoint = (CRLIssuingPoint) issuingPointClass.newInstance();
                 issuingPoint.init(this, id, c);
                 mCRLIssuePoints.put(id, issuingPoint);
@@ -1476,14 +1477,14 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
         IConfigStore implc = null;
         IConfigStore instc = null;
 
-        mListenerPlugins = new Hashtable();
+        mListenerPlugins = new Hashtable<String, ListenerPlugin>();
         try {
             // Get list of listener implementations
             lc = mConfig.getSubStore(PROP_LISTENER_SUBSTORE);
             if (lc != null) {
 
                 implc = lc.getSubStore(PROP_IMPL);
-                Enumeration names = implc.getSubStoreNames();
+                Enumeration<String> names = implc.getSubStoreNames();
 
                 while (names.hasMoreElements()) {
                     String id = (String) names.nextElement();
@@ -1498,7 +1499,7 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
                 }
 
                 instc = lc.getSubStore(PROP_INSTANCE);
-                Enumeration instances = instc.getSubStoreNames();
+                Enumeration<String> instances = instc.getSubStoreNames();
 
                 while (instances.hasMoreElements()) {
                     String id = (String) instances.nextElement();
@@ -1661,7 +1662,8 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
     /**
      * initialize CRL 
      */
-    private void initCRL()
+    
+	private void initCRL()
         throws EBaseException {
         IConfigStore crlConfig = mConfig.getSubStore(PROP_CRL_SUBSTORE);
 
@@ -1687,14 +1689,15 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
                 "initializing crl issue point " + issuePointId);
             IConfigStore issuePointConfig = null;
             String issuePointClassName = null;
-            Class issuePointClass = null;
+            @SuppressWarnings("unchecked")
+            Class<CRLIssuingPoint> issuePointClass = null;
             CRLIssuingPoint issuePoint = null;
 
             try {
                 issuePointConfig = crlConfig.getSubStore(issuePointId);
                 issuePointClassName = issuePointConfig.getString(PROP_CLASS);
-                issuePointClass = Class.forName(issuePointClassName);
-                issuePoint = (CRLIssuingPoint) issuePointClass.newInstance();
+                issuePointClass = (Class<CRLIssuingPoint>) Class.forName(issuePointClassName);
+                issuePoint = issuePointClass.newInstance();
                 issuePoint.init(this, issuePointId, issuePointConfig);
                 mCRLIssuePoints.put(issuePointId, issuePoint);
                 if (mMasterCRLIssuePoint == null && 
@@ -1803,7 +1806,7 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
 
             // (3) look into database to check the
             //     certificate's status
-            Vector singleResponses = new Vector();
+            Vector<SingleResponse> singleResponses = new Vector<SingleResponse>();
             if (statsSub != null) {
               statsSub.startTiming("lookup");
             }
diff --git a/pki/base/common/src/com/netscape/certsrv/apps/CMS.java b/pki/base/common/src/com/netscape/certsrv/apps/CMS.java
index 137a609f1a305723d9ebb1bb7277c629ab99ccae..f093bb74b5b3a2a8e5f81298fb3271fcfa115859 100644
--- a/pki/base/common/src/com/netscape/certsrv/apps/CMS.java
+++ b/pki/base/common/src/com/netscape/certsrv/apps/CMS.java
@@ -468,7 +468,7 @@ public final class CMS {
      *
      * @return a list of string-based subsystem names
      */
-    public static Enumeration getSubsystemNames() {
+    public static Enumeration<String> getSubsystemNames() {
         return _engine.getSubsystemNames();
     }
 
@@ -481,7 +481,7 @@ public final class CMS {
      *
      * @return a list of ISubsystem-based subsystems
      */
-    public static Enumeration getSubsystems() {
+    public static Enumeration<ISubsystem> getSubsystems() {
         return _engine.getSubsystems();
     }
 
@@ -1042,7 +1042,7 @@ public final class CMS {
      * @param params configuration parameters
      */
     public static void getSubjAltNameConfigDefaultParams(String name, 
-        Vector params) {
+        Vector<String> params) {
         _engine.getSubjAltNameConfigDefaultParams(name, params);
     }
 
@@ -1053,7 +1053,7 @@ public final class CMS {
      * @param params configuration parameters
      */
     public static void getSubjAltNameConfigExtendedPluginInfo(String name, 
-        Vector params) {
+        Vector<String> params) {
         _engine.getSubjAltNameConfigExtendedPluginInfo(name, params);
     }
 
@@ -1079,7 +1079,7 @@ public final class CMS {
      * @exception EBaseException failed to create subject alt name configuration
      */
     public static void getGeneralNameConfigDefaultParams(String name,
-        boolean isValueConfigured, Vector params) {
+        boolean isValueConfigured, Vector<String> params) {
         _engine.getGeneralNameConfigDefaultParams(name,
             isValueConfigured, params);
     }
@@ -1093,7 +1093,7 @@ public final class CMS {
      * @exception EBaseException failed to create subject alt name configuration
      */
     public static void getGeneralNamesConfigDefaultParams(String name,
-        boolean isValueConfigured, Vector params) {
+        boolean isValueConfigured, Vector<String> params) {
         _engine.getGeneralNamesConfigDefaultParams(name,
             isValueConfigured, params);
     }
@@ -1107,7 +1107,7 @@ public final class CMS {
      * @exception EBaseException failed to create subject alt name configuration
      */
     public static void getGeneralNameConfigExtendedPluginInfo(String name,
-        boolean isValueConfigured, Vector info) {
+        boolean isValueConfigured, Vector<String> info) {
         _engine.getGeneralNameConfigExtendedPluginInfo(name,
             isValueConfigured, info);
     }
@@ -1121,7 +1121,7 @@ public final class CMS {
      * @exception EBaseException failed to create subject alt name configuration
      */
     public static void getGeneralNamesConfigExtendedPluginInfo(String name,
-        boolean isValueConfigured, Vector info) {
+        boolean isValueConfigured, Vector<String> info) {
         _engine.getGeneralNamesConfigExtendedPluginInfo(name,
             isValueConfigured, info);
     }
@@ -1594,11 +1594,11 @@ public final class CMS {
         return _engine.createArgBlock();
     }
 
-    public static IArgBlock createArgBlock(String realm, Hashtable httpReq) {
+    public static IArgBlock createArgBlock(String realm, Hashtable<String, String> httpReq) {
         return _engine.createArgBlock(realm, httpReq);
     }
 
-    public static IArgBlock createArgBlock(Hashtable httpReq) {
+    public static IArgBlock createArgBlock(Hashtable<String, String> httpReq) {
         return _engine.createArgBlock(httpReq);
     }
 
diff --git a/pki/base/common/src/com/netscape/certsrv/apps/ICMSEngine.java b/pki/base/common/src/com/netscape/certsrv/apps/ICMSEngine.java
index 506a5e33f635da404e6d4a55a3476bf3a99b933d..7f5e46055ea85bdcff69bb68cbabddbc9fa60cec 100644
--- a/pki/base/common/src/com/netscape/certsrv/apps/ICMSEngine.java
+++ b/pki/base/common/src/com/netscape/certsrv/apps/ICMSEngine.java
@@ -158,14 +158,14 @@ public interface ICMSEngine extends ISubsystem {
      *
      * @return a list of string-based subsystem names
      */
-    public Enumeration getSubsystemNames();
+    public Enumeration<String> getSubsystemNames();
 
     /**
      * Returns all the registered subsystems.
      *
      * @return a list of ISubsystem-based subsystems
      */
-    public Enumeration getSubsystems();
+    public Enumeration<ISubsystem> getSubsystems();
 
     /**
      * Retrieves the registered subsytem with the given name.
@@ -890,7 +890,7 @@ public interface ICMSEngine extends ISubsystem {
      * @exception EBaseException failed to create subject alt name configuration
      */
     public  void getGeneralNameConfigDefaultParams(String name,
-        boolean isValueConfigured, Vector params);
+        boolean isValueConfigured, Vector<String> params);
 
     /**
      * Retrieves default general names configuration.
@@ -901,7 +901,7 @@ public interface ICMSEngine extends ISubsystem {
      * @exception EBaseException failed to create subject alt name configuration
      */
     public  void getGeneralNamesConfigDefaultParams(String name,
-        boolean isValueConfigured, Vector params);
+        boolean isValueConfigured, Vector<String> params);
 
     /**
      * Retrieves extended plugin info for general name configuration.
@@ -912,7 +912,7 @@ public interface ICMSEngine extends ISubsystem {
      * @exception EBaseException failed to create subject alt name configuration
      */
     public  void getGeneralNameConfigExtendedPluginInfo(String name,
-        boolean isValueConfigured, Vector info);
+        boolean isValueConfigured, Vector<String> info);
 
     /**
      * Retrieves extended plugin info for general name configuration.
@@ -923,7 +923,7 @@ public interface ICMSEngine extends ISubsystem {
      * @exception EBaseException failed to create subject alt name configuration
      */
     public  void getGeneralNamesConfigExtendedPluginInfo(String name,
-        boolean isValueConfigured, Vector info);
+        boolean isValueConfigured, Vector<String> info);
 
     /**
      * Created general names configuration.
@@ -968,7 +968,7 @@ public interface ICMSEngine extends ISubsystem {
      * @param name configuration name
      * @param params configuration parameters
      */
-    public  void getSubjAltNameConfigDefaultParams(String name, Vector params);
+    public  void getSubjAltNameConfigDefaultParams(String name, Vector<String> params);
 
     /**
      * Get extended plugin info for subject alt name configuration.
@@ -976,7 +976,7 @@ public interface ICMSEngine extends ISubsystem {
      * @param name configuration name
      * @param params configuration parameters
      */
-    public  void getSubjAltNameConfigExtendedPluginInfo(String name, Vector params);
+    public  void getSubjAltNameConfigExtendedPluginInfo(String name, Vector<String> params);
 
     /**
      * Creates subject alt name configuration.
@@ -1064,12 +1064,12 @@ public interface ICMSEngine extends ISubsystem {
     /**
      * Creates argument block.
      */
-    public IArgBlock createArgBlock(String realm, Hashtable httpReq);
+    public IArgBlock createArgBlock(String realm, Hashtable<String, String> httpReq);
 
     /**
      * Creates argument block.
      */
-    public IArgBlock createArgBlock(Hashtable httpReq);
+    public IArgBlock createArgBlock(Hashtable<String, String> httpReq);
 
     /**
      * Checks against the local certificate repository to see 
diff --git a/pki/base/common/src/com/netscape/certsrv/authentication/AuthToken.java b/pki/base/common/src/com/netscape/certsrv/authentication/AuthToken.java
index 7d2d5eb9da4d7239cb9524a5452680943812d7a2..eae282c0291fe0dd64fa9b29a887f5f8f112e597 100644
--- a/pki/base/common/src/com/netscape/certsrv/authentication/AuthToken.java
+++ b/pki/base/common/src/com/netscape/certsrv/authentication/AuthToken.java
@@ -48,7 +48,7 @@ import com.netscape.certsrv.usrgrp.Certificates;
  * @version $Revision$, $Date$
  */
 public class AuthToken implements IAuthToken {
-    protected Hashtable mAttrs = null;
+    protected Hashtable<String, Object> mAttrs = null;
 
     /* Subject name of the certificate in the authenticating entry */
     public static final String TOKEN_CERT_SUBJECT = "tokenCertSubject";
@@ -101,7 +101,7 @@ public class AuthToken implements IAuthToken {
      * @param authMgr The authentication manager that created this Token.
      */
     public AuthToken(IAuthManager authMgr) {
-        mAttrs = new Hashtable();
+        mAttrs = new Hashtable<String, Object>();
         if (authMgr != null) {
           set(TOKEN_AUTHMGR_INST_NAME, authMgr.getName());
           set(TOKEN_AUTHMGR_IMPL_NAME, authMgr.getImplName());
@@ -133,7 +133,7 @@ public class AuthToken implements IAuthToken {
      * Enumerate all attribute names in the AuthToken.
      * @return Enumeration of all attribute names in this AuthToken.
      */
-    public Enumeration getElements() {
+    public Enumeration<String> getElements() {
         return (mAttrs.keys());
     }
 
@@ -408,7 +408,7 @@ public class AuthToken implements IAuthToken {
      * Enumerate all attribute values in the AuthToken.
      * @return Enumeration of all attribute names in this AuthToken.
      */
-    public Enumeration getVals() {
+    public Enumeration<Object> getVals() {
         return (mAttrs.elements());
     }
 
diff --git a/pki/base/common/src/com/netscape/certsrv/authentication/IAuthToken.java b/pki/base/common/src/com/netscape/certsrv/authentication/IAuthToken.java
index a8462108ee77364250958643c5b26a7f180109a4..942793633d8fc42e7ef38d31652f7a201e55f52d 100644
--- a/pki/base/common/src/com/netscape/certsrv/authentication/IAuthToken.java
+++ b/pki/base/common/src/com/netscape/certsrv/authentication/IAuthToken.java
@@ -61,7 +61,7 @@ public interface IAuthToken {
      *
      * @return an enumeration of the attribute names.
      */
-    public Enumeration getElements();
+    public Enumeration<String> getElements();
 
     /************
      * Helpers for non-string sets and gets.
diff --git a/pki/base/common/src/com/netscape/certsrv/base/MetaInfo.java b/pki/base/common/src/com/netscape/certsrv/base/MetaInfo.java
index 1922e74c6b06a09cb408f505a85ccc150b877003..65e40174347af0e02f27dcf3945f86f8cfa03217 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/MetaInfo.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/MetaInfo.java
@@ -39,7 +39,7 @@ public class MetaInfo implements IAttrSet {
     public static final String REQUEST_ID = "requestId";
     public static final String IN_LDAP_PUBLISH_DIR = "inLdapPublishDir";
 
-    private Hashtable content = new Hashtable();
+    private Hashtable<String, Object> content = new Hashtable<String, Object>();
 
     /**	
      * Constructs a meta information.
@@ -59,7 +59,7 @@ public class MetaInfo implements IAttrSet {
 
         sb.append("[\n");
         sb.append("  Meta information:\n");
-        Enumeration enum1 = content.keys();
+        Enumeration<String> enum1 = content.keys();
 
         while (enum1.hasMoreElements()) {
             String key = (String) enum1.nextElement();
@@ -111,7 +111,7 @@ public class MetaInfo implements IAttrSet {
      * 
      * @return an enumeration of the attribute names.
      */
-    public Enumeration getElements() {
+    public Enumeration<String> getElements() {
         return content.keys();
     }
 }
diff --git a/pki/base/common/src/com/netscape/certsrv/ca/ICRLIssuingPoint.java b/pki/base/common/src/com/netscape/certsrv/ca/ICRLIssuingPoint.java
index 82e0961c11485bc472e32845cfe2217946b99d96..dab45fdb1facababa3ced898ec0666fb6a5e3ee7 100644
--- a/pki/base/common/src/com/netscape/certsrv/ca/ICRLIssuingPoint.java
+++ b/pki/base/common/src/com/netscape/certsrv/ca/ICRLIssuingPoint.java
@@ -25,6 +25,7 @@ import java.util.Vector;
 
 import netscape.security.x509.CRLExtensions;
 import netscape.security.x509.RevokedCertImpl;
+import netscape.security.x509.RevokedCertificate;
 import netscape.security.x509.X509CRLImpl;
 
 import com.netscape.certsrv.base.EBaseException;
@@ -295,7 +296,7 @@ public interface ICRLIssuingPoint {
      * @param end next after last requested CRL entry
      * @return set of all the revoked certificates or null if there are none.
      */
-    public Set getRevokedCertificates(int start, int end);
+    public Set<RevokedCertificate> getRevokedCertificates(int start, int end);
 
     /**
      * Returns certificate authority.
@@ -373,7 +374,7 @@ public interface ICRLIssuingPoint {
      *
      * @return split times from CRL generation in milliseconds
      */
-    public Vector getSplitTimes();
+    public Vector<Long> getSplitTimes();
 
     /**
      * Generates CRL now based on cache or local directory if cache
diff --git a/pki/base/common/src/com/netscape/certsrv/logging/ILogEventListener.java b/pki/base/common/src/com/netscape/certsrv/logging/ILogEventListener.java
index 12c09b0bcc9a83fa4870e91153ebf9e1e9eadf3b..80953ead6d06cc209530a2b07b20c594b976348c 100644
--- a/pki/base/common/src/com/netscape/certsrv/logging/ILogEventListener.java
+++ b/pki/base/common/src/com/netscape/certsrv/logging/ILogEventListener.java
@@ -95,14 +95,14 @@ public interface ILogEventListener extends EventListener {
          * @exception IOException For input/output problems.
          * @exception EBaseException For other problems.
      */
-    public NameValuePairs retrieveLogContent(Hashtable req) throws ServletException,
+    public NameValuePairs retrieveLogContent(Hashtable<String, String> req) throws ServletException,
             IOException, EBaseException;
 
     /**
     * Retrieve list of log files.
     *
     */
-    public NameValuePairs retrieveLogList(Hashtable req) throws ServletException,
+    public NameValuePairs retrieveLogList(Hashtable<String, String> req) throws ServletException,
             IOException, EBaseException;
 
     /**
@@ -121,11 +121,11 @@ public interface ILogEventListener extends EventListener {
     * Return list of default config parameters for this log event listener.
     * @return Vector of default parameters.
     */
-    public Vector getDefaultParams();
+    public Vector<String> getDefaultParams();
 
     /**
     * Return list of instance config parameters for this log event listener.
     * @return Vector of instance parameters.
     */
-    public Vector getInstanceParams();
+    public Vector<String> getInstanceParams();
 }
diff --git a/pki/base/common/src/com/netscape/certsrv/request/IRequest.java b/pki/base/common/src/com/netscape/certsrv/request/IRequest.java
index c509e2966cd1dbcdf8e4e18289ae1a4041f7ce56..1174778a1ee91b39fe8ed12777b297f92e137650 100644
--- a/pki/base/common/src/com/netscape/certsrv/request/IRequest.java
+++ b/pki/base/common/src/com/netscape/certsrv/request/IRequest.java
@@ -357,7 +357,7 @@ public interface IRequest {
      * the Hashtable contains an illegal key.
      * @return false if the key or hashtable keys are invalid
      */
-    public boolean setExtData(String key, Hashtable value);
+    public boolean setExtData(String key, Hashtable<String, ?> value);
 
     /**
      * Checks whether the key is storing a simple String value, or a complex
@@ -391,13 +391,14 @@ public interface IRequest {
      * @return The hashtable value associated with the key.  null if not found
      *         or if the key is associated with a string-value.
      */
-    public Hashtable getExtDataInHashtable(String key);
+    public <V> Hashtable<String, V> getExtDataInHashtable(String key);
+
 
     /**
      * Returns all the keys stored in ExtData
      * @return Enumeration of all the keys.
      */
-    public Enumeration getExtDataKeys();
+    public Enumeration<String> getExtDataKeys();
 
     /**
      * Stores an array of Strings in ExtData.
@@ -632,7 +633,7 @@ public interface IRequest {
      * @param data A vector of Strings to store
      * @return  False on key error or invalid data.
      */
-    public boolean setExtData(String key, Vector data);
+    public boolean setExtData(String key, Vector<?> data);
 
     /**
      * Returns a vector of strings for the key.
@@ -643,7 +644,7 @@ public interface IRequest {
      * @param key  The extdata key
      * @return  A Vector of strings, or null on error.
      */
-    public Vector getExtDataInStringVector(String key);
+    public Vector<String> getExtDataInStringVector(String key);
 
     /**
      * Gets boolean value for given type or default value
diff --git a/pki/base/common/src/com/netscape/cms/authentication/DirBasedAuthentication.java b/pki/base/common/src/com/netscape/cms/authentication/DirBasedAuthentication.java
index 3260af6e7b7274ee05247d99889db8ed31d53ef0..c9b64fcaf70a1517fc1278e588fbd18e672f7c0a 100644
--- a/pki/base/common/src/com/netscape/cms/authentication/DirBasedAuthentication.java
+++ b/pki/base/common/src/com/netscape/cms/authentication/DirBasedAuthentication.java
@@ -121,10 +121,10 @@ public abstract class DirBasedAuthentication
         "E=$attr.mail, CN=$attr.cn, O=$dn.o, C=$dn.c";
 
     /* Vector of extendedPluginInfo strings */
-    protected static Vector mExtendedPluginInfo = null;
+    protected static Vector<String> mExtendedPluginInfo = null;
 
     static {
-        mExtendedPluginInfo = new Vector();
+        mExtendedPluginInfo = new Vector<String>();
         mExtendedPluginInfo.add(PROP_DNPATTERN + ";string;Template for cert" +
             " Subject Name. ($dn.xxx - get value from user's LDAP " +
             "DN.  $attr.yyy - get value from LDAP attributes in " +
@@ -563,8 +563,9 @@ public abstract class DirBasedAuthentication
 
         if (values == null) return;
 
-        Vector v = new Vector();
-        Enumeration e = values.getStringValues();
+        Vector<String> v = new Vector<String>();
+        @SuppressWarnings("unchecked")
+		Enumeration<String> e = values.getStringValues();
 
         while (e.hasMoreElements()) {
             v.addElement(e.nextElement());
@@ -583,8 +584,9 @@ public abstract class DirBasedAuthentication
 
         if (values == null) return;
 
-        Vector v = new Vector();
-        Enumeration e = values.getByteValues();
+        Vector<byte[]> v = new Vector<byte[]>();
+        @SuppressWarnings("unchecked")
+		Enumeration<byte[]> e = values.getByteValues();
 
         while (e.hasMoreElements()) {
             v.addElement(e.nextElement());
diff --git a/pki/base/common/src/com/netscape/cms/authentication/SSLclientCertAuthentication.java b/pki/base/common/src/com/netscape/cms/authentication/SSLclientCertAuthentication.java
index 3092d00a1055e8a02df1e6e55b2bd720d4886717..e73a112ce811a1b47d01d2ee6619eb937bacbc23 100644
--- a/pki/base/common/src/com/netscape/cms/authentication/SSLclientCertAuthentication.java
+++ b/pki/base/common/src/com/netscape/cms/authentication/SSLclientCertAuthentication.java
@@ -331,7 +331,7 @@ public class SSLclientCertAuthentication implements IAuthManager,
     /**
      * Retrieves a list of names of the value parameter.
      */
-    public Enumeration getValueNames() {
+    public Enumeration<String> getValueNames() {
         return null;
     }
 
diff --git a/pki/base/common/src/com/netscape/cms/ocsp/DefStore.java b/pki/base/common/src/com/netscape/cms/ocsp/DefStore.java
index cfa6ff577cbe382fea9fb0fdea172f6ec557805e..0468e13fc822a5150a96cdd41c1a2ccf82e0eb6c 100644
--- a/pki/base/common/src/com/netscape/cms/ocsp/DefStore.java
+++ b/pki/base/common/src/com/netscape/cms/ocsp/DefStore.java
@@ -103,12 +103,12 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
     private final static String PROP_INCLUDE_NEXT_UPDATE =
         "includeNextUpdate";
 
-    protected Hashtable mReqCounts = new Hashtable();
+    protected Hashtable<String, Long> mReqCounts = new Hashtable<String, Long>();
     protected boolean mNotFoundGood = true;
     protected boolean mUseCache = true;
     protected boolean mByName = true;
     protected boolean mIncludeNextUpdate = false;
-    protected Hashtable mCacheCRLIssuingPoints = new Hashtable();
+    protected Hashtable<String, CRLIPContainer> mCacheCRLIssuingPoints = new Hashtable<String, CRLIPContainer>();
     private IOCSPAuthority mOCSPAuthority = null;
     private IConfigStore mConfig = null;
     private String mId = null;
@@ -124,7 +124,7 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
     }
 
     public String[] getExtendedPluginInfo(Locale locale) { 
-        Vector v = new Vector(); 
+        Vector<String> v = new Vector<String>(); 
 
         v.addElement(PROP_NOT_FOUND_GOOD + ";boolean; " + CMS.getUserMessage(locale, "CMS_OCSP_DEFSTORE_PROP_NOT_FOUND_GOOD"));
         v.addElement(PROP_BY_NAME + ";boolean; " + CMS.getUserMessage(locale, "CMS_OCSP_DEFSTORE_PROP_BY_NAME"));
@@ -226,7 +226,7 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
      * new one is totally committed.
      */
     public void deleteOldCRLs() throws EBaseException {
-        Enumeration recs = searchCRLIssuingPointRecord(
+        Enumeration<ICRLIssuingPointRecord> recs = searchCRLIssuingPointRecord(
                 "objectclass=" +
                 CMS.getCRLIssuingPointRecordName(),
                 100);
@@ -234,7 +234,7 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
         ICRLIssuingPointRecord theRec = null;
 
         while (recs.hasMoreElements()) {
-            ICRLIssuingPointRecord rec = (ICRLIssuingPointRecord)
+            ICRLIssuingPointRecord rec = 
                 recs.nextElement();
 
             deleteOldCRLsInCA(rec.getId());
@@ -254,15 +254,14 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
                 return; // nothing to do
             String thisUpdate = Long.toString(
                     cp.getThisUpdate().getTime());
-            Enumeration e = searchRepository(
+            Enumeration<IRepositoryRecord> e = searchRepository(
                     caName,
                     "(!" + IRepositoryRecord.ATTR_SERIALNO + "=" +
                     thisUpdate + ")");
 
             while (e != null && e.hasMoreElements()) {
-                IRepositoryRecord r = (IRepositoryRecord)
-                    e.nextElement();
-                Enumeration recs = 
+                IRepositoryRecord r = e.nextElement();
+                Enumeration<ICertRecord> recs = 
                     searchCertRecord(caName,
                         r.getSerialNumber().toString(),
                         ICertRecord.ATTR_ID + "=*");
@@ -276,7 +275,7 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
                     getBaseDN();
 
                 while (recs != null && recs.hasMoreElements()) {
-                    ICertRecord rec = (ICertRecord) recs.nextElement();
+                    ICertRecord rec =  recs.nextElement();
                     String cert_dn = "cn=" + 
                         rec.getSerialNumber().toString() + "," + rep_dn;
 
@@ -338,7 +337,7 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
 
             // (3) look into database to check the
             //     certificate's status
-            Vector singleResponses = new Vector();
+            Vector<SingleResponse> singleResponses = new Vector<SingleResponse>();
             if (statsSub != null) {
               statsSub.startTiming("lookup");
             }
@@ -439,7 +438,7 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
                 mCacheCRLIssuingPoints.get(new String(keyhsh));
 
             if (matched == null) {
-                Enumeration recs = searchCRLIssuingPointRecord(
+                Enumeration<ICRLIssuingPointRecord> recs = searchCRLIssuingPointRecord(
                         "objectclass=" +
                         CMS.getCRLIssuingPointRecordName(),
                         100);
@@ -523,7 +522,7 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
                     // if crl is not available, we can try crl cache
                     if (theRec != null) {
                         CMS.debug("DefStore: evaluating crl cache");
-                        Hashtable cache = theRec.getCRLCacheNoClone();
+                        Hashtable<BigInteger, RevokedCertificate> cache = theRec.getCRLCacheNoClone();
                         if (cache != null) {
                              RevokedCertificate rc = (RevokedCertificate)
                                   cache.get(new BigInteger(serialNo.toString()));
@@ -581,7 +580,7 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
         return mDBService.getBaseDN();
     }
 
-    public Enumeration searchAllCRLIssuingPointRecord(int maxSize)
+    public Enumeration<ICRLIssuingPointRecord > searchAllCRLIssuingPointRecord(int maxSize)
         throws EBaseException {
         return searchCRLIssuingPointRecord(
                 "objectclass=" +
@@ -589,11 +588,11 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
                 maxSize);
     }
 
-    public Enumeration searchCRLIssuingPointRecord(String filter,
+    public Enumeration<ICRLIssuingPointRecord> searchCRLIssuingPointRecord(String filter,
         int maxSize)
         throws EBaseException {
         IDBSSession s = mDBService.createSession();
-        Enumeration e = null;
+        Enumeration<ICRLIssuingPointRecord> e = null;
 
         try {
             e = s.search(getBaseDN(), filter, maxSize);
@@ -683,10 +682,10 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
         }
     }
 
-    public Enumeration searchRepository(String name, String filter)
+    public Enumeration<IRepositoryRecord> searchRepository(String name, String filter)
         throws EBaseException {
         IDBSSession s = mDBService.createSession();
-        Enumeration e = null;
+        Enumeration<IRepositoryRecord> e = null;
 
         try {
             e = s.search("cn=" + transformDN(name) + "," + getBaseDN(),
@@ -732,10 +731,10 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
         }
     }
 
-    public Enumeration searchCertRecord(String name, String thisUpdate,
+    public Enumeration<ICertRecord> searchCertRecord(String name, String thisUpdate,
         String filter) throws EBaseException {
         IDBSSession s = mDBService.createSession();
-        Enumeration e = null;
+        Enumeration<ICertRecord> e = null;
 
         try {
             e = s.search("ou=" + thisUpdate + ",cn=" +
@@ -806,7 +805,7 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
 
     public void setConfigParameters(NameValuePairs pairs) 
         throws EBaseException { 
-        Enumeration k = pairs.getNames();
+        Enumeration<String> k = pairs.getNames();
 
         while (k.hasMoreElements()) {
             String key = (String) k.nextElement();
@@ -932,10 +931,10 @@ class CRLIPContainer {
 }
 
 class DefStoreCRLUpdater extends Thread {
-    private Hashtable mCache = null;
+    private Hashtable<String, CRLIPContainer> mCache = null;
     private int mSec = 0;
 
-    public DefStoreCRLUpdater(Hashtable cache, int sec) {
+    public DefStoreCRLUpdater(Hashtable<String, CRLIPContainer> cache, int sec) {
         mCache = cache;
         mSec = sec;
     }
diff --git a/pki/base/common/src/com/netscape/cms/policy/constraints/UniqueSubjectNameConstraints.java b/pki/base/common/src/com/netscape/cms/policy/constraints/UniqueSubjectNameConstraints.java
index 4e7cefe7ec1d7494b495055b2f7017d8c4543af1..2cff24d378111304ef4d50090246bf515f20a5cf 100644
--- a/pki/base/common/src/com/netscape/cms/policy/constraints/UniqueSubjectNameConstraints.java
+++ b/pki/base/common/src/com/netscape/cms/policy/constraints/UniqueSubjectNameConstraints.java
@@ -184,11 +184,11 @@ public class UniqueSubjectNameConstraints extends APolicyRule
                 String filter = "x509Cert.subject=" + certSubjectName;
                 // subject name is indexed, so we only use subject name
                 // in the filter
-                Enumeration matched = 
+                Enumeration<ICertRecord> matched = 
                     mCA.getCertificateRepository().findCertRecords(filter);
 
                 while (matched.hasMoreElements()) {
-                    ICertRecord rec = (ICertRecord) matched.nextElement();
+                    ICertRecord rec =  matched.nextElement();
                     String status = rec.getStatus();
 
                     if (status.equals(ICertRecord.STATUS_REVOKED) || status.equals(ICertRecord.STATUS_EXPIRED) || status.equals(ICertRecord.STATUS_REVOKED_EXPIRED)) {
@@ -250,7 +250,7 @@ public class UniqueSubjectNameConstraints extends APolicyRule
         } else {
             try {
                 ext = (KeyUsageExtension) extensions.get(
-                            KeyUsageExtension.NAME);
+                            KeyUsageExtension.class.getSimpleName());
             } catch (IOException e) {
                 // extension isn't there.
             }
@@ -285,8 +285,8 @@ public class UniqueSubjectNameConstraints extends APolicyRule
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() {
-        Vector confParams = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> confParams = new Vector<String>();
 
         confParams.addElement(PROP_PRE_AGENT_APPROVAL_CHECKING +
             "=" + mPreAgentApprovalChecking);
@@ -300,8 +300,8 @@ public class UniqueSubjectNameConstraints extends APolicyRule
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() { 
-        Vector defParams = new Vector();
+    public Vector<String> getDefaultParams() { 
+        Vector<String> defParams = new Vector<String>();
 
         defParams.addElement(PROP_PRE_AGENT_APPROVAL_CHECKING + "=");
         defParams.addElement(PROP_KEY_USAGE_EXTENSION_CHECKING + "=");
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/AuthInfoAccessExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/AuthInfoAccessExt.java
index b641d91ed7e3b746a67b1c7f9fbd397daf576ecb..4f8aaa293ac5389348fdc3441f5f78810bb71fd1 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/AuthInfoAccessExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/AuthInfoAccessExt.java
@@ -19,6 +19,7 @@ package com.netscape.cms.policy.extensions;
 
 
 import java.io.IOException;
+import java.io.Serializable;
 import java.security.cert.CertificateException;
 import java.util.Enumeration;
 import java.util.Locale;
@@ -105,7 +106,7 @@ public class AuthInfoAccessExt extends APolicyRule implements
     }
 
     public String[] getExtendedPluginInfo(Locale locale) {
-        Vector v = new Vector();
+        Vector<String> v = new Vector<String>();
 
         v.addElement(PROP_CRITICAL +
             ";boolean;RFC 2459 recommendation: This extension MUST be non-critical.");
@@ -144,8 +145,8 @@ public class AuthInfoAccessExt extends APolicyRule implements
     /**
      * Returns a sequence of access descriptions.
      */
-    private Enumeration getAccessDescriptions() throws EBaseException {
-        Vector ads = new Vector();
+    private Enumeration<Vector<Serializable>> getAccessDescriptions() throws EBaseException {
+        Vector<Vector<Serializable>> ads = new Vector<Vector<Serializable>>();
 
         //
         // read until there is *NO* ad<NUM>_method
@@ -195,7 +196,7 @@ public class AuthInfoAccessExt extends APolicyRule implements
             if (location == null)
                 break;
             GeneralName gn = CMS.form_GeneralName(location_type, location);
-            Vector e = new Vector(); 
+            Vector<Serializable> e = new Vector<Serializable>(); 
 
             e.addElement(methodOID);
             e.addElement(gn);
@@ -240,7 +241,7 @@ public class AuthInfoAccessExt extends APolicyRule implements
                     certInfo.get(X509CertInfo.EXTENSIONS);
 
                 // add access descriptions
-                Enumeration e = getAccessDescriptions();
+                Enumeration<Vector<Serializable>> e = getAccessDescriptions();
 
                 if (!e.hasMoreElements()) {
                     return res;
@@ -255,8 +256,8 @@ public class AuthInfoAccessExt extends APolicyRule implements
                 } else {
                     // check to see if AIA is already exist
                     try {
-                        extensions.delete(AuthInfoAccessExtension.NAME);
-                        log(ILogger.LL_WARN, "Previous extension deleted: " + AuthInfoAccessExtension.NAME);
+                        extensions.delete(AuthInfoAccessExtension.class.getSimpleName());
+                        log(ILogger.LL_WARN, "Previous extension deleted: " + AuthInfoAccessExtension.class.getSimpleName());
                     } catch (IOException ex) {
                     }
                 }
@@ -267,13 +268,13 @@ public class AuthInfoAccessExt extends APolicyRule implements
                             PROP_CRITICAL, false));
 
                 while (e.hasMoreElements()) {
-                    Vector ad = (Vector) e.nextElement();
+                    Vector<Serializable> ad =  e.nextElement();
                     ObjectIdentifier oid = (ObjectIdentifier) ad.elementAt(0);
                     GeneralName gn = (GeneralName) ad.elementAt(1);
 
                     aiaExt.addAccessDescription(oid, gn);
                 }
-                extensions.set(AuthInfoAccessExtension.NAME, aiaExt);
+                extensions.set(AuthInfoAccessExtension.class.getSimpleName(), aiaExt);
 
             } catch (IOException e) {
                 log(ILogger.LL_FAILURE, CMS.getLogMessage("POLICY_UNEXPECTED_POLICY_ERROR", NAME, e.getMessage()));
@@ -301,8 +302,8 @@ public class AuthInfoAccessExt extends APolicyRule implements
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() { 
-        Vector params = new Vector();
+    public Vector<String> getInstanceParams() { 
+        Vector<String> params = new Vector<String>();
 
         try {
             params.addElement(PROP_CRITICAL + "=" + 
@@ -363,8 +364,8 @@ public class AuthInfoAccessExt extends APolicyRule implements
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() { 
-        Vector defParams = new Vector();
+    public Vector<String> getDefaultParams() { 
+        Vector<String> defParams = new Vector<String>();
 
         defParams.addElement(PROP_CRITICAL + "=false");
         defParams.addElement(PROP_NUM_ADS + "=" + MAX_AD);
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/AuthorityKeyIdentifierExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/AuthorityKeyIdentifierExt.java
index 612d24925ef968fac2bb40d96426c66a0710656a..7ec05fec4624f344880792d49827569f3b19c7bf 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/AuthorityKeyIdentifierExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/AuthorityKeyIdentifierExt.java
@@ -81,10 +81,10 @@ public class AuthorityKeyIdentifierExt extends APolicyRule
     protected AuthorityKeyIdentifierExtension mTheExtension = null;
 
     // instance params for console
-    protected Vector mInstanceParams = new Vector();
+    protected Vector<String> mInstanceParams = new Vector<String>();
 
     // default params for console.
-    protected static Vector mDefaultParams = new Vector();
+    protected static Vector<String> mDefaultParams = new Vector<String>();
     static {
         // form static default params.
         mDefaultParams.addElement(PROP_CRITICAL + "=" + DEF_CRITICAL);
@@ -228,7 +228,7 @@ public class AuthorityKeyIdentifierExt extends APolicyRule
             try {
                 if (extensions != null) {
                     authorityKeyIdExt = (AuthorityKeyIdentifierExtension)
-                            extensions.get(AuthorityKeyIdentifierExtension.NAME);
+                            extensions.get(AuthorityKeyIdentifierExtension.class.getSimpleName());
                 }
             } catch (IOException e) {
                 // extension isn't there. 
@@ -244,7 +244,7 @@ public class AuthorityKeyIdentifierExt extends APolicyRule
                     CMS.debug(
                         "AuthorityKeyIdentifierKeyExt: request id from user " + req.getRequestId() +
                         " had authority key identifier - deleted");
-                    extensions.delete(AuthorityKeyIdentifierExtension.NAME);
+                    extensions.delete(AuthorityKeyIdentifierExtension.class.getSimpleName());
                 }
             }
 
@@ -261,7 +261,7 @@ public class AuthorityKeyIdentifierExt extends APolicyRule
                 certInfo.set(X509CertInfo.EXTENSIONS, extensions);
             }
             extensions.set(
-                AuthorityKeyIdentifierExtension.NAME, mTheExtension);
+                AuthorityKeyIdentifierExtension.class.getSimpleName(), mTheExtension);
             CMS.debug(
                 "AuthorityKeyIdentifierKeyExt: added authority key id ext to request " + req.getRequestId());
             return PolicyResult.ACCEPTED;
@@ -362,7 +362,7 @@ public class AuthorityKeyIdentifierExt extends APolicyRule
 
         try {
             subjKeyIdExt = (SubjectKeyIdentifierExtension)
-                    exts.get(SubjectKeyIdentifierExtension.NAME);
+                    exts.get(SubjectKeyIdentifierExtension.class.getSimpleName());
         } catch (IOException e) {
             // extension isn't there.
             CMS.debug(
@@ -391,7 +391,7 @@ public class AuthorityKeyIdentifierExt extends APolicyRule
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() { 
+    public Vector<String> getInstanceParams() { 
         return mInstanceParams;
     }
 
@@ -400,7 +400,7 @@ public class AuthorityKeyIdentifierExt extends APolicyRule
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() { 
+    public Vector<String> getDefaultParams() { 
         return mDefaultParams;
     }
 
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/BasicConstraintsExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/BasicConstraintsExt.java
index 4c2eb46439feaba0bd94f46c43cb0912c6c2e307..1636902d2331fb815f8e0a40cd372c4aeda667d5 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/BasicConstraintsExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/BasicConstraintsExt.java
@@ -258,7 +258,7 @@ public class BasicConstraintsExt extends APolicyRule
                     certInfo.get(X509CertInfo.EXTENSIONS);
             if (extensions != null) {
                 basicExt = (BasicConstraintsExtension)
-                        extensions.get(BasicConstraintsExtension.NAME);
+                        extensions.get(BasicConstraintsExtension.class.getSimpleName());
             }
         } catch (IOException e) {
             // no extensions or basic constraints extension.
@@ -283,7 +283,7 @@ public class BasicConstraintsExt extends APolicyRule
             }
             if (basicExt != null) {
                 try {
-                    extensions.delete(BasicConstraintsExtension.NAME);
+                    extensions.delete(BasicConstraintsExtension.class.getSimpleName());
                 } catch (IOException e) {
                 }
             }
@@ -302,7 +302,7 @@ public class BasicConstraintsExt extends APolicyRule
             }
  
             try {
-                extensions.set(BasicConstraintsExtension.NAME, critExt);
+                extensions.set(BasicConstraintsExtension.class.getSimpleName(), critExt);
             } catch (IOException e) {
             }
             CMS.debug(
@@ -378,8 +378,8 @@ public class BasicConstraintsExt extends APolicyRule
                             CMS.getUserMessage("CMS_POLICY_BASIC_CONSTRAINTS_ERROR", NAME), "");
                         return PolicyResult.REJECTED; // unrecoverable error.
                     }
-                    extensions.delete(BasicConstraintsExtension.NAME);
-                    extensions.set(BasicConstraintsExtension.NAME, critExt);
+                    extensions.delete(BasicConstraintsExtension.class.getSimpleName());
+                    extensions.set(BasicConstraintsExtension.class.getSimpleName(), critExt);
                 }
             } catch (IOException e) {
                 // not possible in these cases.
@@ -450,7 +450,7 @@ public class BasicConstraintsExt extends APolicyRule
             return PolicyResult.REJECTED; // unrecoverable error.
         }
         try {
-            extensions.set(BasicConstraintsExtension.NAME, newExt);
+            extensions.set(BasicConstraintsExtension.class.getSimpleName(), newExt);
         }catch (IOException e) {
             // doesn't happen.
         }
@@ -465,8 +465,8 @@ public class BasicConstraintsExt extends APolicyRule
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() { 
-        Vector params = new Vector();
+    public Vector<String> getInstanceParams() { 
+        Vector<String> params = new Vector<String>();
 
         // Because of one of the UI bugs 385273, we should leave the empty space
         // as is. Do not convert the space to some definite numbers.
@@ -481,8 +481,8 @@ public class BasicConstraintsExt extends APolicyRule
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() { 
-        Vector defParams = new Vector();
+    public Vector<String> getDefaultParams() { 
+        Vector<String> defParams = new Vector<String>();
 
         defParams.addElement(PROP_IS_CRITICAL + "=true");
         defParams.addElement(PROP_MAXPATHLEN + "=");
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/CRLDistributionPointsExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/CRLDistributionPointsExt.java
index cec8051b8a22dd4204365e4f6dc44863327dde7a..05d4a28e170bd6a76aa2fc5dd683c7c6b69a290e 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/CRLDistributionPointsExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/CRLDistributionPointsExt.java
@@ -76,14 +76,14 @@ class NameType {
         stringRep = s;
     }
 
-    private static Hashtable map = new Hashtable();
+    private static Hashtable<String, NameType> map = new Hashtable<String, NameType>();
 
     /**
      * Looks up a NameType from its string representation.  Returns null
      * if no matching NameType was found.
      */
     public static NameType fromString(String s) {
-        return (NameType) map.get(s);
+        return map.get(s);
     }
 
     public String toString() {
@@ -147,9 +147,9 @@ public class CRLDistributionPointsExt extends APolicyRule
     // PKIX specifies the that the extension SHOULD NOT be critical
     public static final boolean DEFAULT_CRITICALITY = false;
 
-    private Vector defaultParams = new Vector();
+    private Vector<String> defaultParams = new Vector<String>();
 
-    private Vector mParams = new Vector();
+    private Vector<String> mParams = new Vector<String>();
     private String mExtParams[] = null;
     private CRLDistributionPointsExtension mCrldpExt = null;
 
@@ -168,7 +168,7 @@ public class CRLDistributionPointsExt extends APolicyRule
     }
 
     private void setExtendedPluginInfo() {
-        Vector v = new Vector();
+        Vector<String> v = new Vector<String>();
 
         // should replace MAX_POINTS with mNumPoints if bug 385118 is fixed
         for (int i = 0; i < MAX_POINTS; i++) {
@@ -218,7 +218,7 @@ public class CRLDistributionPointsExt extends APolicyRule
             netscape.security.x509.OIDMap.addAttribute(
                 CRLDistributionPointsExtension.class.getName(),
                 CRLDistributionPointsExtension.OID,
-                CRLDistributionPointsExtension.NAME);
+                CRLDistributionPointsExtension.class.getSimpleName());
         } catch (CertificateException e) {
             // ignore, just means it has already been added
         }
@@ -434,12 +434,12 @@ public class CRLDistributionPointsExt extends APolicyRule
             } else {
                 // remove any previously computed version of the extension
                 try {
-                    extensions.delete(CRLDistributionPointsExtension.NAME);
+                    extensions.delete(CRLDistributionPointsExtension.class.getSimpleName());
                 } catch (IOException e) {
                     // extension isn't there
                 }
             }
-            extensions.set(CRLDistributionPointsExtension.NAME, mCrldpExt);
+            extensions.set(CRLDistributionPointsExtension.class.getSimpleName(), mCrldpExt);
 
             return PolicyResult.ACCEPTED;
 
@@ -458,7 +458,7 @@ public class CRLDistributionPointsExt extends APolicyRule
     }
 
     // parameters must be entered in the config file
-    public Vector getDefaultParams() {
+    public Vector<String> getDefaultParams() {
         for (int i = DEFAULT_NUM_BLANK_POINTS; i < mNumPoints; i++) {
             defaultParams.addElement(PROP_POINT_NAME + i + "=");
             defaultParams.addElement(PROP_POINT_TYPE + i + "=");
@@ -474,7 +474,7 @@ public class CRLDistributionPointsExt extends APolicyRule
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() {
+    public Vector<String> getInstanceParams() {
         return mParams;
     }
 }
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/CertificatePoliciesExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/CertificatePoliciesExt.java
index 4490b25eeb481200258c72dc97d53325f27faf47..1e61c4ad2998c26101d1f149a774ff50a98ad955 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/CertificatePoliciesExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/CertificatePoliciesExt.java
@@ -80,7 +80,7 @@ public class CertificatePoliciesExt extends APolicyRule
     protected int mNumCertPolicies = DEF_NUM_CERTPOLICIES;
     protected CertPolicy[] mCertPolicies = null;
 
-    protected Vector mInstanceParams = new Vector();
+    protected Vector<String> mInstanceParams = new Vector<String>();
     protected CertificatePoliciesExtension mCertificatePoliciesExtension = null;
 
     public CertificatePoliciesExt() {
@@ -134,7 +134,7 @@ public class CertificatePoliciesExt extends APolicyRule
         // create instance of certificate policy extension if enabled.
         if (mEnabled) {
             try {
-                Vector CertPolicies = new Vector();
+                Vector<CertificatePolicyInfo> CertPolicies = new Vector<CertificatePolicyInfo>();
 
                 for (int j = 0; j < mNumCertPolicies; j++) {
                     CertPolicies.addElement(
@@ -202,7 +202,7 @@ public class CertificatePoliciesExt extends APolicyRule
             } else {
                 // remove any previously computed version of the extension
                 try {
-                    extensions.delete(CertificatePoliciesExtension.NAME);
+                    extensions.delete(CertificatePoliciesExtension.class.getSimpleName());
                 } catch (IOException e) {
                     // this is the hack: for some reason, the key which is the name
                     // of the policy has been converted into the OID 
@@ -212,7 +212,7 @@ public class CertificatePoliciesExt extends APolicyRule
                     }
                 }
             }
-            extensions.set(CertificatePoliciesExtension.NAME,
+            extensions.set(CertificatePoliciesExtension.class.getSimpleName(),
                 mCertificatePoliciesExtension);
         } catch (IOException e) {
             log(ILogger.LL_FAILURE, CMS.getLogMessage("POLICY_ERROR_CERTIFICATE_POLICIES_1",
@@ -241,7 +241,7 @@ public class CertificatePoliciesExt extends APolicyRule
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() { 
+    public Vector<String> getInstanceParams() { 
         return mInstanceParams;
     }
 
@@ -251,7 +251,7 @@ public class CertificatePoliciesExt extends APolicyRule
      * increase the num to greater than 0 and more configuration params 
      * will show up in the console.
      */
-    private static Vector mDefParams = new Vector();
+    private static Vector<String> mDefParams = new Vector<String>();
     static {
         mDefParams.addElement(PROP_CRITICAL + "=" + DEF_CRITICAL);
         mDefParams.addElement(
@@ -276,12 +276,12 @@ public class CertificatePoliciesExt extends APolicyRule
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() { 
+    public Vector<String> getDefaultParams() { 
         return mDefParams;
     }
 
     public String[] getExtendedPluginInfo(Locale locale) {
-        Vector theparams = new Vector();
+        Vector<String> theparams = new Vector<String>();
 		
         theparams.addElement(PROP_CRITICAL + ";boolean;RFC 3280 recommendation: MUST be non-critical.");
         theparams.addElement(PROP_NUM_CERTPOLICIES + ";number; Number of certificate policies. The value must be greater than or equal to 1");
@@ -445,7 +445,7 @@ class CertPolicy {
                 // should add a method to NoticeReference to take a
                 // Vector...but let's do this for now
 
-                Vector numsVector = new Vector();
+                Vector<String> numsVector = new Vector<String>();
                 StringTokenizer tokens = new StringTokenizer(mNoticeRefNums,
                         ",");
 
@@ -458,7 +458,7 @@ class CertPolicy {
                 nums = new int[numsVector.size()];
 
                 for (int i = 0; i < numsVector.size(); i++) {
-                    Integer ii = new Integer((String) numsVector.elementAt(i));
+                    Integer ii = new Integer(numsVector.elementAt(i));
 
                     nums[i] = ii.intValue();
                 }
@@ -517,7 +517,7 @@ class CertPolicy {
         }
     }
 
-    protected void getInstanceParams(Vector instanceParams) {
+    protected void getInstanceParams(Vector<String> instanceParams) {
         instanceParams.addElement(
             mNameDot + PROP_POLICY_IDENTIFIER + "=" + (mPolicyId == null ? "" :
                 mPolicyId));
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/CertificateRenewalWindowExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/CertificateRenewalWindowExt.java
index c5a24d630c0306bfaf505eb5e06d3674eb2a5464..e3927502327cd3bf1050be63a0ce8d53fc9c424b 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/CertificateRenewalWindowExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/CertificateRenewalWindowExt.java
@@ -136,7 +136,7 @@ public class CertificateRenewalWindowExt extends APolicyRule
         } else {
             // remove any previously computed version of the extension
             try {
-                extensions.delete(CertificateRenewalWindowExtension.NAME);
+                extensions.delete(CertificateRenewalWindowExtension.class.getSimpleName());
 				
             } catch (IOException e) {
                 // this is the hack: for some reason, the key which is the name
@@ -163,7 +163,7 @@ public class CertificateRenewalWindowExt extends APolicyRule
                             getDateValue(now, mBeginTime),
                             getDateValue(now, mEndTime));
             }
-            extensions.set(CertificateRenewalWindowExtension.NAME, 
+            extensions.set(CertificateRenewalWindowExtension.class.getSimpleName(), 
                 crwExt);
         } catch (Exception e) {
             log(ILogger.LL_FAILURE,
@@ -220,8 +220,8 @@ public class CertificateRenewalWindowExt extends APolicyRule
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() { 
-        Vector params = new Vector();
+    public Vector<String> getInstanceParams() { 
+        Vector<String> params = new Vector<String>();
 
         params.addElement(PROP_CRITICAL + "=" + mCritical);
         if (mBeginTime == null) {
@@ -242,8 +242,8 @@ public class CertificateRenewalWindowExt extends APolicyRule
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() { 
-        Vector defParams = new Vector();
+    public Vector<String> getDefaultParams() { 
+        Vector<String> defParams = new Vector<String>();
 
         defParams.addElement(PROP_CRITICAL + "=false");
         defParams.addElement(PROP_BEGIN_TIME + "=");
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/CertificateScopeOfUseExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/CertificateScopeOfUseExt.java
index e6cbddf606cc0c187746f9039a6ddc7d465ea205..14ef4213b29aa6d9b6101f8a18e0f62352c67bce 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/CertificateScopeOfUseExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/CertificateScopeOfUseExt.java
@@ -79,7 +79,7 @@ public class CertificateScopeOfUseExt extends APolicyRule implements
     }
 
     public String[] getExtendedPluginInfo(Locale locale) {
-        Vector v = new Vector();
+        Vector<String> v = new Vector<String>();
 
         v.addElement(PROP_CRITICAL +
             ";boolean; This extension may be either critical or non-critical.");
@@ -116,8 +116,8 @@ public class CertificateScopeOfUseExt extends APolicyRule implements
     /**
      * Returns a sequence of scope entry.
      */
-    private Vector getScopeEntries() throws EBaseException {
-        Vector entries = new Vector();
+    private Vector<CertificateScopeEntry> getScopeEntries() throws EBaseException {
+        Vector<CertificateScopeEntry> entries = new Vector<CertificateScopeEntry>();
 
         //
         // read until there is *NO* ad<NUM>_method
@@ -190,7 +190,7 @@ public class CertificateScopeOfUseExt extends APolicyRule implements
                     certInfo.get(X509CertInfo.EXTENSIONS);
 
                 // add access descriptions
-                Vector entries = getScopeEntries();
+                Vector<CertificateScopeEntry> entries = getScopeEntries();
 
                 if (entries.size() == 0) {
                     return res;
@@ -247,8 +247,8 @@ public class CertificateScopeOfUseExt extends APolicyRule implements
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() { 
-        Vector params = new Vector();
+    public Vector<String> getInstanceParams() { 
+        Vector<String> params = new Vector<String>();
 
         try {
             params.addElement(PROP_CRITICAL + "=" + 
@@ -303,8 +303,8 @@ public class CertificateScopeOfUseExt extends APolicyRule implements
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() { 
-        Vector defParams = new Vector();
+    public Vector<String> getDefaultParams() { 
+        Vector<String> defParams = new Vector<String>();
 
         defParams.addElement(PROP_CRITICAL + "=false");
 
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/ExtendedKeyUsageExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/ExtendedKeyUsageExt.java
index b5c4176d088003f9158c92399697f05e214076ef..94d7d8df06ddabb6af38b1651792bd9fa4b04362 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/ExtendedKeyUsageExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/ExtendedKeyUsageExt.java
@@ -60,7 +60,7 @@ public class ExtendedKeyUsageExt extends APolicyRule
     protected static int MAX_PURPOSE_ID = 10;
     private boolean mCritical = false;
     private IConfigStore mConfig = null;
-    private Vector mUsages = null;
+    private Vector<ObjectIdentifier> mUsages = null;
 
     private String[] mParams = null;
     
@@ -131,13 +131,13 @@ public class ExtendedKeyUsageExt extends APolicyRule
                 certInfo.set(X509CertInfo.EXTENSIONS, extensions);
             } else {
                 try {
-                    extensions.delete(ExtendedKeyUsageExtension.NAME);
+                    extensions.delete(ExtendedKeyUsageExtension.class.getSimpleName());
                 } catch (IOException ex) {
                     // ExtendedKeyUsage extension is not already there
                 }
             }
 
-            extensions.set(ExtendedKeyUsageExtension.NAME, mExtendedKeyUsage);
+            extensions.set(ExtendedKeyUsageExtension.class.getSimpleName(), mExtendedKeyUsage);
 
             return PolicyResult.ACCEPTED;
         } catch (IOException e) {
@@ -157,8 +157,8 @@ public class ExtendedKeyUsageExt extends APolicyRule
     /**
      * Returns instance specific parameters.
      */
-    public Vector getInstanceParams() {
-        Vector params = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> params = new Vector<String>();
 
         params.addElement(PROP_CRITICAL + "=" + mCritical);
         int numIds = MAX_PURPOSE_ID;
@@ -189,7 +189,7 @@ public class ExtendedKeyUsageExt extends APolicyRule
     }
 
     private void setExtendedPluginInfo() {
-        Vector v = new Vector();
+        Vector<String> v = new Vector<String>();
         int mNum = MAX_PURPOSE_ID;
 
         if (mConfig != null) {
@@ -225,8 +225,8 @@ public class ExtendedKeyUsageExt extends APolicyRule
     /**
      * Returns default parameters.
      */
-    public Vector getDefaultParams() {
-        Vector defParams = new Vector();
+    public Vector<String> getDefaultParams() {
+        Vector<String> defParams = new Vector<String>();
 
         defParams.addElement(PROP_CRITICAL + "=false");
         defParams.addElement(PROP_NUM_IDS + "=" + MAX_PURPOSE_ID);
@@ -243,7 +243,7 @@ public class ExtendedKeyUsageExt extends APolicyRule
         
         mCritical = mConfig.getBoolean(PROP_CRITICAL, false);
         if (mUsages == null) {
-            mUsages = new Vector();
+            mUsages = new Vector<ObjectIdentifier>();
         }
         
         int mNum = mConfig.getInteger(PROP_NUM_IDS, MAX_PURPOSE_ID);
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/GenericASN1Ext.java b/pki/base/common/src/com/netscape/cms/policy/extensions/GenericASN1Ext.java
index 47e3de0c083fa4222591fb8ed0b3070558d10da5..bdfdb14aea9f806f4333bf49c7d43017e5a96a76 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/GenericASN1Ext.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/GenericASN1Ext.java
@@ -359,7 +359,7 @@ public class GenericASN1Ext extends APolicyRule implements
                 // Create the extension
                 GenericASN1Extension priExt = mkExtension();
                 
-                extensions.set(GenericASN1Extension.NAME, priExt);
+                extensions.set(priExt.getName(), priExt);
 
             } catch (IOException e) {
                 log(ILogger.LL_FAILURE, CMS.getLogMessage("BASE_IO_ERROR", e.getMessage()));
@@ -400,9 +400,9 @@ public class GenericASN1Ext extends APolicyRule implements
         throws IOException, EBaseException, ParseException {
         GenericASN1Extension ext;
 
-        Hashtable h = new Hashtable();
+        Hashtable<String, String> h = new Hashtable<String, String>();
         // This only show one level, not substores!
-        Enumeration e = mConfig.getPropertyNames();
+        Enumeration<String> e = mConfig.getPropertyNames();
 
         while (e.hasMoreElements()) {
             String n = (String) e.nextElement();
@@ -427,9 +427,9 @@ public class GenericASN1Ext extends APolicyRule implements
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() { 
+    public Vector<String> getInstanceParams() { 
         int idx = 0;
-        Vector params = new Vector();
+        Vector<String> params = new Vector<String>();
 
         try {
             params.addElement(PROP_CRITICAL + "=" + mConfig.getBoolean(PROP_CRITICAL, false));
@@ -458,10 +458,10 @@ public class GenericASN1Ext extends APolicyRule implements
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() { 
+    public Vector<String> getDefaultParams() { 
         int idx = 0;
         
-        Vector defParams = new Vector();
+        Vector<String> defParams = new Vector<String>();
 
         defParams.addElement(PROP_CRITICAL + "=false");
         defParams.addElement(PROP_NAME + "=");
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/IssuerAltNameExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/IssuerAltNameExt.java
index cc2751c036e1f0a575fbc5cc41ab9bb39a384120..9524f6893393fc79edceaf595a6f58b2c4a43acc 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/IssuerAltNameExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/IssuerAltNameExt.java
@@ -63,14 +63,14 @@ public class IssuerAltNameExt extends APolicyRule
     // PKIX specifies the that the extension SHOULD NOT be critical
     public static final boolean DEFAULT_CRITICALITY = false;
 
-    private static Vector defaultParams = new Vector();
+    private static Vector<String> defaultParams = new Vector<String>();
     private static String[] mInfo = null;
 
     static {
         defaultParams.addElement(PROP_CRITICAL + "=" + DEFAULT_CRITICALITY);
         CMS.getGeneralNamesConfigDefaultParams(null, true, defaultParams);
 	
-        Vector info = new Vector();
+        Vector<String> info = new Vector<String>();
 
         info.addElement(PROP_CRITICAL + ";boolean;RFC 2459 recommendation: SHOULD NOT be marked critical.");
         info.addElement(IExtendedPluginInfo.HELP_TOKEN +
@@ -85,7 +85,7 @@ public class IssuerAltNameExt extends APolicyRule
         info.copyInto(mInfo);
     }
 
-    private Vector mParams = new Vector();
+    private Vector<String> mParams = new Vector<String>();
     private IConfigStore mConfig = null;
     private boolean mCritical = DEFAULT_CRITICALITY;
     private boolean mEnabled = false;
@@ -198,7 +198,7 @@ public class IssuerAltNameExt extends APolicyRule
 
             // remove any previously computed version of the extension
             try {
-                extensions.delete(IssuerAlternativeNameExtension.NAME);
+                extensions.delete(IssuerAlternativeNameExtension.class.getSimpleName());
 
             } catch (IOException e) {
                 // this is the hack
@@ -212,7 +212,7 @@ public class IssuerAltNameExt extends APolicyRule
         }
 
         try {
-            extensions.set(IssuerAlternativeNameExtension.NAME, mExtension);
+            extensions.set(IssuerAlternativeNameExtension.class.getSimpleName(), mExtension);
         } catch (Exception e) {
             if (e instanceof RuntimeException) 
                 throw (RuntimeException) e;
@@ -230,7 +230,7 @@ public class IssuerAltNameExt extends APolicyRule
      * @return Empty Vector since this policy has no configuration parameters.
      * for this policy instance.
      */
-    public Vector getInstanceParams() { 
+    public Vector<String> getInstanceParams() { 
         return mParams;
     }
 
@@ -240,7 +240,7 @@ public class IssuerAltNameExt extends APolicyRule
      * @return Empty Vector since this policy implementation has no 
      * configuration parameters.
      */
-    public Vector getDefaultParams() { 
+    public Vector<String> getDefaultParams() { 
         return defaultParams;
     }
 
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/KeyUsageExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/KeyUsageExt.java
index 4f7a72c4dbf4b020beaae63c19ee17ef24685b6a..4e9ef825d9c4c6dfd98c4b317cb9b475b0aeea39 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/KeyUsageExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/KeyUsageExt.java
@@ -190,7 +190,7 @@ public class KeyUsageExt extends APolicyRule
             if (extensions != null) {
                 try {
                     ext = (KeyUsageExtension)
-                            extensions.get(KeyUsageExtension.NAME);
+                            extensions.get(KeyUsageExtension.class.getSimpleName());
                 } catch (IOException e) {
                     // extension isn't there.
                     ext = null;
@@ -265,7 +265,7 @@ public class KeyUsageExt extends APolicyRule
                 mKeyUsage = new KeyUsageExtension(mCritical, bits);
             } catch (IOException e) {
             }
-            extensions.set(KeyUsageExtension.NAME, mKeyUsage);
+            extensions.set(KeyUsageExtension.class.getSimpleName(), mKeyUsage);
             return PolicyResult.ACCEPTED;
         } catch (IOException e) {
             log(ILogger.LL_FAILURE, CMS.getLogMessage("BASE_IO_ERROR", e.getMessage()));
@@ -285,8 +285,8 @@ public class KeyUsageExt extends APolicyRule
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() { 
-        Vector params = new Vector();
+    public Vector<String> getInstanceParams() { 
+        Vector<String> params = new Vector<String>();
 
         params.addElement(PROP_CRITICAL + "=" + mCritical);
         params.addElement(PROP_DIGITAL_SIGNATURE + "=" + mDigitalSignature);
@@ -301,7 +301,7 @@ public class KeyUsageExt extends APolicyRule
         return params;
     }
 
-    private static Vector mDefParams = new Vector();
+    private static Vector<String> mDefParams = new Vector<String>();
     static {
         mDefParams.addElement(PROP_CRITICAL + "=true");
         mDefParams.addElement(PROP_DIGITAL_SIGNATURE + "=");
@@ -342,7 +342,7 @@ public class KeyUsageExt extends APolicyRule
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() { 
+    public Vector<String> getDefaultParams() { 
         return mDefParams;
     }
 
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/NSCCommentExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/NSCCommentExt.java
index 68f5d875b83809302339cff9d0aea3867177f8de..019e3e08137a1edc0747f5390d495c8030fede20 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/NSCCommentExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/NSCCommentExt.java
@@ -72,7 +72,7 @@ public class NSCCommentExt extends APolicyRule
     protected String  mCommentFile;
     protected String  mInputType;
     protected boolean mCritical;
-    private Vector mParams = new Vector();
+    private Vector<String> mParams = new Vector<String>();
 
     protected String  tempCommentFile;
     protected boolean certApplied = false;
@@ -199,7 +199,7 @@ public class NSCCommentExt extends APolicyRule
         } else {
             // remove any previously computed version of the extension
             try {
-                extensions.delete(NSCCommentExtension.NAME);
+                extensions.delete(NSCCommentExtension.class.getSimpleName());
 			
             } catch (IOException e) {
                 // this is the hack: for some reason, the key which is the name
@@ -243,7 +243,7 @@ public class NSCCommentExt extends APolicyRule
             NSCCommentExtension cpExt = 
                 new NSCCommentExtension(mCritical, mUserNoticeDisplayText);
 
-            extensions.set(NSCCommentExtension.NAME, cpExt);
+            extensions.set(NSCCommentExtension.class.getSimpleName(), cpExt);
         } catch (Exception e) {
             log(ILogger.LL_FAILURE,
                 CMS.getLogMessage("POLICY_ERROR_CERTIFICATE_POLICIES_1", NAME));
@@ -279,7 +279,7 @@ public class NSCCommentExt extends APolicyRule
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() { 
+    public Vector<String> getInstanceParams() { 
         return mParams;
     }
 
@@ -288,8 +288,8 @@ public class NSCCommentExt extends APolicyRule
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() { 
-        Vector defParams = new Vector();
+    public Vector<String> getDefaultParams() { 
+        Vector<String> defParams = new Vector<String>();
 
         defParams.addElement(PROP_CRITICAL + "=false");
         defParams.addElement(PROP_INPUT_TYPE + "=" + TEXT);
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/NSCertTypeExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/NSCertTypeExt.java
index 2ececcf9c597fee96d4996fae6161ab850673798..88c57d2ec8fff9e266de5e58de89fa7750f0b190 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/NSCertTypeExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/NSCertTypeExt.java
@@ -194,7 +194,7 @@ public class NSCertTypeExt extends APolicyRule
                 // See if extension is already set and contains correct values.
                 try {
                     nsCertTypeExt = (NSCertTypeExtension)
-                            extensions.get(NSCertTypeExtension.NAME);
+                            extensions.get(NSCertTypeExtension.class.getSimpleName());
                 } catch (IOException e) {
                     // extension isn't there.
                     nsCertTypeExt = null;
@@ -210,7 +210,7 @@ public class NSCertTypeExt extends APolicyRule
                     (certType.equals("ocspResponder"))) {
                     // Fix for #528732 : Always delete
                     // this extension from OCSP signing cert
-                    extensions.delete(NSCertTypeExtension.NAME);
+                    extensions.delete(NSCertTypeExtension.class.getSimpleName());
                     return PolicyResult.ACCEPTED;
                 }
             } else {
@@ -243,7 +243,7 @@ public class NSCertTypeExt extends APolicyRule
             if (nsCertTypeExt != null) {
                 // replace with correct bits to comply to policy.
                 // take all that are true.
-                extensions.delete(NSCertTypeExtension.NAME);
+                extensions.delete(NSCertTypeExtension.class.getSimpleName());
             }
 
             int j;
@@ -260,7 +260,7 @@ public class NSCertTypeExt extends APolicyRule
             }
 
             nsCertTypeExt = new NSCertTypeExtension(mCritical, bits);
-            extensions.set(NSCertTypeExtension.NAME, nsCertTypeExt);
+            extensions.set(NSCertTypeExtension.class.getSimpleName(), nsCertTypeExt);
             return PolicyResult.ACCEPTED;
         } catch (IOException e) {
             log(ILogger.LL_FAILURE, CMS.getLogMessage("BASE_IO_ERROR", e.getMessage()));
@@ -495,8 +495,8 @@ public class NSCertTypeExt extends APolicyRule
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() { 
-        Vector params = new Vector();
+    public Vector<String> getInstanceParams() { 
+        Vector<String> params = new Vector<String>();
 
         params.addElement(PROP_CRITICAL + "=" + mCritical);
         params.addElement(PROP_SET_DEFAULT_BITS + "=" + mSetDefaultBits);
@@ -504,7 +504,7 @@ public class NSCertTypeExt extends APolicyRule
         return params;
     }
 
-    private static Vector mDefParams = new Vector();
+    private static Vector<String> mDefParams = new Vector<String>();
     static {
         mDefParams.addElement(
             PROP_CRITICAL + "=false");
@@ -533,7 +533,7 @@ public class NSCertTypeExt extends APolicyRule
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() { 
+    public Vector<String> getDefaultParams() { 
         return mDefParams;
     }
 }
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/NameConstraintsExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/NameConstraintsExt.java
index 35106de41e456174f32a1f5c50b63f2b7a58e259..8b8001bba1ef43f7d04a98193f93251b3988ca9e 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/NameConstraintsExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/NameConstraintsExt.java
@@ -80,7 +80,7 @@ public class NameConstraintsExt extends APolicyRule
     protected Subtree[] mExcludedSubtrees = null;
     protected NameConstraintsExtension mNameConstraintsExtension = null;
 
-    protected Vector mInstanceParams = new Vector();
+    protected Vector<String> mInstanceParams = new Vector<String>();
 
     public NameConstraintsExt() {
         NAME = "NameConstraintsExt";
@@ -159,13 +159,13 @@ public class NameConstraintsExt extends APolicyRule
         // create instance of name constraints extension if enabled.
         if (mEnabled) {
             try {
-                Vector permittedSubtrees = new Vector();
+                Vector<GeneralSubtree> permittedSubtrees = new Vector<GeneralSubtree>();
 
                 for (int i = 0; i < mNumPermittedSubtrees; i++) {
                     permittedSubtrees.addElement(
                         mPermittedSubtrees[i].mGeneralSubtree);
                 }
-                Vector excludedSubtrees = new Vector();
+                Vector<GeneralSubtree> excludedSubtrees = new Vector<GeneralSubtree>();
 
                 for (int j = 0; j < mNumExcludedSubtrees; j++) {
                     excludedSubtrees.addElement(
@@ -274,7 +274,7 @@ public class NameConstraintsExt extends APolicyRule
             try {
                 if (extensions != null) {
                     nameConstraintsExt = (NameConstraintsExtension)
-                            extensions.get(NameConstraintsExtension.NAME);
+                            extensions.get(NameConstraintsExtension.class.getSimpleName());
                 }
             } catch (IOException e) {
                 // extension isn't there. 
@@ -290,7 +290,7 @@ public class NameConstraintsExt extends APolicyRule
                     CMS.debug(
                         "NameConstraintsExt: request id " + req.getRequestId() + " from user " +
                         " already has name constraints - deleted");
-                    extensions.delete(NameConstraintsExtension.NAME);
+                    extensions.delete(NameConstraintsExtension.class.getSimpleName());
                 }
             }
 
@@ -301,7 +301,7 @@ public class NameConstraintsExt extends APolicyRule
                 certInfo.set(X509CertInfo.EXTENSIONS, extensions);
             }
             extensions.set(
-                NameConstraintsExtension.NAME, mNameConstraintsExtension);
+                NameConstraintsExtension.class.getSimpleName(), mNameConstraintsExtension);
             CMS.debug(
                 "NameConstraintsExt: added Name Constraints Extension to request " +
                 req.getRequestId());
@@ -325,7 +325,7 @@ public class NameConstraintsExt extends APolicyRule
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() { 
+    public Vector<String> getInstanceParams() { 
         return mInstanceParams;
     }
 
@@ -335,7 +335,7 @@ public class NameConstraintsExt extends APolicyRule
      * increase the num to greater than 0 and more configuration params 
      * will show up in the console.
      */
-    private static Vector mDefParams = new Vector();
+    private static Vector<String> mDefParams = new Vector<String>();
     static {
         mDefParams.addElement(PROP_CRITICAL + "=" + DEF_CRITICAL);
         mDefParams.addElement(
@@ -355,12 +355,12 @@ public class NameConstraintsExt extends APolicyRule
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() { 
+    public Vector<String> getDefaultParams() { 
         return mDefParams;
     }
 
     public String[] getExtendedPluginInfo(Locale locale) {
-        Vector theparams = new Vector();
+        Vector<String> theparams = new Vector<String>();
 
         theparams.addElement(PROP_CRITICAL + ";boolean;RFC 2459 recommendation: MUST be critical.");
         theparams.addElement(
@@ -450,13 +450,13 @@ class Subtree {
         }
     }
 
-    void getInstanceParams(Vector instanceParams) {
+    void getInstanceParams(Vector<String> instanceParams) {
         mBase.getInstanceParams(instanceParams);
         instanceParams.addElement(mNameDotMin + "=" + mMin);
         instanceParams.addElement(mNameDotMax + "=" + mMax);
     }
 
-    static void getDefaultParams(String name, Vector params) {
+    static void getDefaultParams(String name, Vector<String> params) {
         String nameDot = "";
 
         if (name != null && name.length() >= 0)
@@ -466,7 +466,7 @@ class Subtree {
         params.addElement(nameDot + PROP_MAX + "=" + DEF_MAX);
     }
 
-    static void getExtendedPluginInfo(String name, Vector info) {
+    static void getExtendedPluginInfo(String name, Vector<String> info) {
         String nameDot = "";
 
         if (name != null && name.length() > 0)
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/OCSPNoCheckExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/OCSPNoCheckExt.java
index e5cbab537f2264d6333a35850f35395bf508813b..9e36ae80031982389504b8d9b8dea5e2fd07ad27 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/OCSPNoCheckExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/OCSPNoCheckExt.java
@@ -143,14 +143,14 @@ public class OCSPNoCheckExt extends APolicyRule
                 certInfo.set(X509CertInfo.EXTENSIONS, extensions);
             } else {
                 try {
-                    extensions.delete(OCSPNoCheckExtension.NAME);
+                    extensions.delete(OCSPNoCheckExtension.class.getSimpleName());
                 } catch (IOException ex) {
                     // OCSPNoCheck extension is not already there
                     //  log(ILogger.LL_FAILURE, "No previous extension: "+OCSPNoCheckExtension.NAME+" "+ex.getMessage());
                 }
             }
 
-            extensions.set(OCSPNoCheckExtension.NAME, mOCSPNoCheck);
+            extensions.set(OCSPNoCheckExtension.class.getSimpleName(), mOCSPNoCheck);
 
             return PolicyResult.ACCEPTED;
 
@@ -170,8 +170,8 @@ public class OCSPNoCheckExt extends APolicyRule
     /**
      * Returns instance parameters.
      */
-    public Vector getInstanceParams() {
-        Vector params = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> params = new Vector<String>();
 
         params.addElement(PROP_CRITICAL + "=" + mCritical);
         return params;
@@ -181,8 +181,8 @@ public class OCSPNoCheckExt extends APolicyRule
     /**
      * Returns default parameters.
      */
-    public Vector getDefaultParams() {
-        Vector defParams = new Vector();
+    public Vector<String> getDefaultParams() {
+        Vector<String> defParams = new Vector<String>();
 
         defParams.addElement(PROP_CRITICAL + "=false");
         return defParams;
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/PolicyConstraintsExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/PolicyConstraintsExt.java
index 717c19f70c7294eda564e27a28664e4c083218a0..849036c7d64b6563d4b7c187eb4016810a60809f 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/PolicyConstraintsExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/PolicyConstraintsExt.java
@@ -74,9 +74,9 @@ public class PolicyConstraintsExt extends APolicyRule
     protected int mInhibitPolicyMapping = DEF_INHIBIT_POLICY_MAPPING;
     protected PolicyConstraintsExtension mPolicyConstraintsExtension = null;
 
-    protected Vector mInstanceParams = new Vector();
+    protected Vector<String> mInstanceParams = new Vector<String>();
 
-    protected static Vector mDefaultParams = new Vector();
+    protected static Vector<String> mDefaultParams = new Vector<String>();
     static {
         mDefaultParams.addElement(PROP_CRITICAL + "=" + DEF_CRITICAL);
         mDefaultParams.addElement(
@@ -211,7 +211,7 @@ public class PolicyConstraintsExt extends APolicyRule
             try {
                 if (extensions != null) {
                     policyConstraintsExt = (PolicyConstraintsExtension)
-                            extensions.get(PolicyConstraintsExtension.NAME);
+                            extensions.get(PolicyConstraintsExtension.class.getSimpleName());
                 }
             } catch (IOException e) {
                 // extension isn't there. 
@@ -221,7 +221,7 @@ public class PolicyConstraintsExt extends APolicyRule
                 if (agentApproved(req)) {
                     return PolicyResult.ACCEPTED;
                 } else {
-                    extensions.delete(PolicyConstraintsExtension.NAME);
+                    extensions.delete(PolicyConstraintsExtension.class.getSimpleName());
                 }
             }
 
@@ -254,7 +254,7 @@ public class PolicyConstraintsExt extends APolicyRule
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() { 
+    public Vector<String> getInstanceParams() { 
         return mInstanceParams;
     }
 
@@ -263,7 +263,7 @@ public class PolicyConstraintsExt extends APolicyRule
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() { 
+    public Vector<String> getDefaultParams() { 
         return mDefaultParams;
     }
 
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/PolicyMappingsExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/PolicyMappingsExt.java
index 452a9a3fab723b87bfbff6eae13f69284a2673d6..1d901d57a7343d179e189f12da718967978e769d 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/PolicyMappingsExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/PolicyMappingsExt.java
@@ -75,7 +75,7 @@ public class PolicyMappingsExt extends APolicyRule
     protected PolicyMap[] mPolicyMaps = null;
     protected PolicyMappingsExtension mPolicyMappingsExtension = null;
 
-    protected Vector mInstanceParams = new Vector();
+    protected Vector<String> mInstanceParams = new Vector<String>();
 
     public PolicyMappingsExt() {
         NAME = "PolicyMappingsExt";
@@ -148,7 +148,7 @@ public class PolicyMappingsExt extends APolicyRule
         // create instance of policy mappings extension if enabled.
         if (mEnabled) {
             try {
-                Vector certPolicyMaps = new Vector();
+                Vector<CertificatePolicyMap> certPolicyMaps = new Vector<CertificatePolicyMap>();
 
                 for (int j = 0; j < mNumPolicyMappings; j++) {
                     certPolicyMaps.addElement(
@@ -220,7 +220,7 @@ public class PolicyMappingsExt extends APolicyRule
             try {
                 if (extensions != null) {
                     policyMappingsExt = (PolicyMappingsExtension)
-                            extensions.get(PolicyMappingsExtension.NAME);
+                            extensions.get(PolicyMappingsExtension.class.getSimpleName());
                 }
             } catch (IOException e) {
                 // extension isn't there. 
@@ -230,7 +230,7 @@ public class PolicyMappingsExt extends APolicyRule
                 if (agentApproved(req)) {
                     return PolicyResult.ACCEPTED;
                 } else {
-                    extensions.delete(PolicyMappingsExtension.NAME);
+                    extensions.delete(PolicyMappingsExtension.class.getSimpleName());
                 }
             }
 
@@ -241,7 +241,7 @@ public class PolicyMappingsExt extends APolicyRule
                 certInfo.set(X509CertInfo.EXTENSIONS, extensions);
             }
             extensions.set(
-                PolicyMappingsExtension.NAME, mPolicyMappingsExtension);
+                PolicyMappingsExtension.class.getSimpleName(), mPolicyMappingsExtension);
             return PolicyResult.ACCEPTED;
         } catch (IOException e) {
             log(ILogger.LL_FAILURE, 
@@ -263,7 +263,7 @@ public class PolicyMappingsExt extends APolicyRule
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() { 
+    public Vector<String> getInstanceParams() { 
         return mInstanceParams;
     }
 
@@ -273,7 +273,7 @@ public class PolicyMappingsExt extends APolicyRule
      * increase the num to greater than 0 and more configuration params 
      * will show up in the console.
      */
-    private static Vector mDefParams = new Vector();
+    private static Vector<String> mDefParams = new Vector<String>();
     static {
         mDefParams.addElement(PROP_CRITICAL + "=" + DEF_CRITICAL);
         mDefParams.addElement(
@@ -291,12 +291,12 @@ public class PolicyMappingsExt extends APolicyRule
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() { 
+    public Vector<String> getDefaultParams() { 
         return mDefParams;
     }
 
     public String[] getExtendedPluginInfo(Locale locale) {
-        Vector theparams = new Vector();
+        Vector<String> theparams = new Vector<String>();
 		
         theparams.addElement(PROP_CRITICAL + ";boolean;RFC 2459 recommendation: MUST be non-critical.");
         theparams.addElement(PROP_NUM_POLICYMAPPINGS + ";number; Number of policy mappings. The value must be greater than or equal to 1");
@@ -415,7 +415,7 @@ class PolicyMap {
         }
     }
 
-    protected void getInstanceParams(Vector instanceParams) {
+    protected void getInstanceParams(Vector<String> instanceParams) {
         instanceParams.addElement(
             mNameDot + PROP_ISSUER_DOMAIN_POLICY + "=" + (mIssuerDomainPolicy == null ? "" :
                 mIssuerDomainPolicy));
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/PresenceExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/PresenceExt.java
index 41f08963a44bfa7ba2ecebc0a80ceea41824e8b5..125555c40d4c7064671d856feae8bac75964a330 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/PresenceExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/PresenceExt.java
@@ -41,7 +41,7 @@ import com.netscape.cms.policy.APolicyRule;
  * @version $Revision$, $Date$
  */
 public class PresenceExt extends APolicyRule {
-    private static Vector mDefParams = new Vector();
+    private static Vector<String> mDefParams = new Vector<String>();
     private IConfigStore mConfig = null;
     private String mOID = null;
     private boolean mCritical;
@@ -106,8 +106,8 @@ public class PresenceExt extends APolicyRule {
         return res;
     }
 
-    public Vector getInstanceParams() { 
-        Vector params = new Vector(); 
+    public Vector<String> getInstanceParams() { 
+        Vector<String> params = new Vector<String>(); 
 
         params.addElement(PROP_IS_CRITICAL + "=" + mCritical); 
         params.addElement(PROP_OID + "=" + mOID);
@@ -151,7 +151,7 @@ public class PresenceExt extends APolicyRule {
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() { 
+    public Vector<String> getDefaultParams() { 
         return mDefParams;
     }
 }
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/PrivateKeyUsagePeriodExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/PrivateKeyUsagePeriodExt.java
index ff0d5749b2530a6461ddb9e1898631285a58c51a..8b3ab40c0055586689766efb4a4e2a0faf4baa19 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/PrivateKeyUsagePeriodExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/PrivateKeyUsagePeriodExt.java
@@ -79,13 +79,13 @@ public class PrivateKeyUsagePeriodExt extends APolicyRule
     protected String mNotAfter;
     protected boolean mCritical;
 
-    private static Vector defaultParams;
+    private static Vector<String> defaultParams;
 
     static {
 
         formatter.setLenient(false);
 
-        defaultParams = new Vector();
+        defaultParams = new Vector<String>();
         defaultParams.addElement(PROP_IS_CRITICAL + "=" + DEFAULT_CRITICALITY);
         defaultParams.addElement(PROP_NOT_BEFORE + "=" + DEFAULT_NOT_BEFORE);
         defaultParams.addElement(PROP_NOT_AFTER + "=" + DEFAULT_NOT_AFTER);
@@ -200,7 +200,7 @@ public class PrivateKeyUsagePeriodExt extends APolicyRule
         } else {
             // remove any previously computed version of the extension
             try {
-                extensions.delete(PrivateKeyUsageExtension.NAME);
+                extensions.delete(PrivateKeyUsageExtension.class.getSimpleName());
 	   
             } catch (IOException e) {
             }
@@ -213,7 +213,7 @@ public class PrivateKeyUsagePeriodExt extends APolicyRule
                         formatter.parse(mNotAfter));
             certInfo.set(X509CertInfo.VERSION,
                 new CertificateVersion(CertificateVersion.V3));
-            extensions.set(PrivateKeyUsageExtension.NAME, ext);
+            extensions.set(PrivateKeyUsageExtension.class.getSimpleName(), ext);
         } catch (Exception e) {
             if (e instanceof RuntimeException) 
                 throw (RuntimeException) e;
@@ -231,8 +231,8 @@ public class PrivateKeyUsagePeriodExt extends APolicyRule
      * @return Empty Vector since this policy has no configuration parameters.
      * for this policy instance.
      */
-    public Vector getInstanceParams() { 
-        Vector params = new Vector();
+    public Vector<String> getInstanceParams() { 
+        Vector<String> params = new Vector<String>();
 
         params.addElement(PROP_IS_CRITICAL + "=" + mCritical);
         params.addElement(PROP_NOT_BEFORE + "=" + mNotBefore);
@@ -246,8 +246,8 @@ public class PrivateKeyUsagePeriodExt extends APolicyRule
      * @return Empty Vector since this policy implementation has no 
      * configuration parameters.
      */
-    public Vector getDefaultParams() { 
-        Vector defParams = new Vector();
+    public Vector<String> getDefaultParams() { 
+        Vector<String> defParams = new Vector<String>();
 
         defParams.addElement(PROP_IS_CRITICAL + "=" + DEFAULT_CRITICALITY);
         defParams.addElement(PROP_NOT_BEFORE + "=" + DEFAULT_NOT_BEFORE);
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/RemoveBasicConstraintsExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/RemoveBasicConstraintsExt.java
index de39cccd62ca4adb1a778cc94e6f69e580a929e1..396afc977b8f6b35ceb4bec399356686b2c5c578 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/RemoveBasicConstraintsExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/RemoveBasicConstraintsExt.java
@@ -95,7 +95,7 @@ public class RemoveBasicConstraintsExt extends APolicyRule
                     certInfo.get(X509CertInfo.EXTENSIONS);
             if (extensions != null) {
                 try {
-                    extensions.delete(BasicConstraintsExtension.NAME);
+                    extensions.delete(BasicConstraintsExtension.class.getSimpleName());
                     CMS.debug("PolicyRule RemoveBasicConstraintsExt: removed the extension from request " + req.getRequestId().toString());
                 } catch (IOException e) {
                 }
@@ -113,8 +113,8 @@ public class RemoveBasicConstraintsExt extends APolicyRule
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() { 
-        Vector params = new Vector();
+    public Vector<String> getInstanceParams() { 
+        Vector<String> params = new Vector<String>();
 
         return params;
     }
@@ -124,8 +124,8 @@ public class RemoveBasicConstraintsExt extends APolicyRule
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() { 
-        Vector defParams = new Vector();
+    public Vector<String> getDefaultParams() { 
+        Vector<String> defParams = new Vector<String>();
 
         return defParams;
     }
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/SubjAltNameExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/SubjAltNameExt.java
index c9ce68f651cfab96acb37b8155fcf3285bc5ec7b..aab88ff3b168998f96beae74f85ac7c9fee87ca9 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/SubjAltNameExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/SubjAltNameExt.java
@@ -186,7 +186,7 @@ public class SubjAltNameExt extends APolicyRule
                 // Remove any previously computed version of the extension
                 //
                 try {
-                    extensions.delete(SubjectAlternativeNameExtension.NAME);
+                    extensions.delete(SubjectAlternativeNameExtension.class.getSimpleName());
                 } catch (IOException e) {
                     // extension isn't there
                 }
@@ -214,7 +214,7 @@ public class SubjAltNameExt extends APolicyRule
 
             if (tok == null) break apply;
 
-            Vector emails = getEmailList(tok);
+            Vector<String> emails = getEmailList(tok);
 
             if (emails == null) break apply;
 
@@ -224,7 +224,7 @@ public class SubjAltNameExt extends APolicyRule
             if (extensions == null)
                 extensions = createCertificateExtensions(certInfo);
 
-            extensions.set(SubjectAlternativeNameExtension.NAME,
+            extensions.set(SubjectAlternativeNameExtension.class.getSimpleName(),
                 subjAltNameExt);
 
         } catch (IOException e) {
@@ -256,10 +256,10 @@ public class SubjAltNameExt extends APolicyRule
      * Generate a String Vector containing all the email addresses
      * found in this Authentication token
      */
-    protected Vector /* of String */
+    protected Vector /* of String */<String>
     getEmailList(IAuthToken tok) {
 
-        Vector v = new Vector();
+        Vector<String> v = new Vector<String>();
 
         addValues(tok, "mail", v);
         addValues(tok, "mailalternateaddress", v);
@@ -273,7 +273,7 @@ public class SubjAltNameExt extends APolicyRule
      * Add attribute values from an LDAP attribute to a vector
      */
     protected void
-    addValues(IAuthToken tok, String attrName, Vector v) {
+    addValues(IAuthToken tok, String attrName, Vector<String> v) {
         String attr[] = tok.getInStringArray(attrName);
 
         if (attr == null) return;
@@ -287,13 +287,13 @@ public class SubjAltNameExt extends APolicyRule
      * Make a Subject name extension given a list of email addresses
      */
     protected SubjectAlternativeNameExtension
-    mkExt(Vector emails)
+    mkExt(Vector<String> emails)
         throws IOException {
         SubjectAlternativeNameExtension sa;
         GeneralNames gns = new GeneralNames();
 
         for (int i = 0; i < emails.size(); i++) {
-            String email = (String) emails.elementAt(i);
+            String email = emails.elementAt(i);
 
             gns.addElement(new RFC822Name(email));
         }
@@ -329,8 +329,8 @@ public class SubjAltNameExt extends APolicyRule
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() { 
-        Vector params = new Vector();
+    public Vector<String> getInstanceParams() { 
+        Vector<String> params = new Vector<String>();
 
         //params.addElement("PROP_AGENT_OVERR = " + mAllowAgentOverride);
         //params.addElement("PROP_EE_OVERR = " + mAllowEEOverride);
@@ -345,8 +345,8 @@ public class SubjAltNameExt extends APolicyRule
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() { 
-        Vector defParams = new Vector();
+    public Vector<String>  getDefaultParams() { 
+        Vector<String>  defParams = new Vector<String> ();
 
         //defParams.addElement("PROP_AGENT_OVERR = " + DEF_AGENT_OVERR);
         //defParams.addElement("PROP_EE_OVERR = " + DEF_EE_OVERR);
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectAltNameExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectAltNameExt.java
index 7ff1a6c970d5cec51de124e208df71e24371427f..b9bc6059263d9272d0041e462d117e504beba1a6 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectAltNameExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectAltNameExt.java
@@ -81,10 +81,10 @@ public class SubjectAltNameExt extends APolicyRule
     protected int mNumGNs = 0;
     protected ISubjAltNameConfig[] mGNs = null;
 
-    Vector mInstanceParams = new Vector();
+    Vector<String> mInstanceParams = new Vector<String>();
 
     // init default params and extended plugin info.
-    private static Vector mDefParams = new Vector();
+    private static Vector<String> mDefParams = new Vector<String>();
     static {
         // default params.
         mDefParams.addElement(PROP_CRITICAL + "=" + DEF_CRITICAL);
@@ -197,7 +197,7 @@ public class SubjectAltNameExt extends APolicyRule
                 if (sourceId != null && sourceId.length() > 0) 
                     return res; // accepted
                 try {
-                    extensions.delete(SubjectAlternativeNameExtension.NAME);
+                    extensions.delete(SubjectAlternativeNameExtension.class.getSimpleName());
                 } catch (IOException e) {
                     // extension isn't there
                 }
@@ -213,12 +213,12 @@ public class SubjectAltNameExt extends APolicyRule
                 if (value == null) {
                     continue;
                 }
-                Vector gn = mGNs[i].formGeneralNames(value);
+                Vector<GeneralName> gn = mGNs[i].formGeneralNames(value);
 
                 if (gn.size() == 0)
                     continue;
-                for (Enumeration n = gn.elements(); n.hasMoreElements();) {
-                    gns.addElement((GeneralName) n.nextElement());
+                for (Enumeration<GeneralName> n = gn.elements(); n.hasMoreElements();) {
+                    gns.addElement(n.nextElement());
                 }
             }
 
@@ -242,7 +242,7 @@ public class SubjectAltNameExt extends APolicyRule
             if (extensions == null)
                 extensions = createCertificateExtensions(certInfo);
 
-            extensions.set(SubjectAlternativeNameExtension.NAME, sa);
+            extensions.set(SubjectAlternativeNameExtension.class.getSimpleName(), sa);
 
             return res; // accepted.
 
@@ -291,7 +291,7 @@ public class SubjectAltNameExt extends APolicyRule
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() { 
+    public Vector<String> getInstanceParams() { 
         return mInstanceParams;
     }
 
@@ -300,14 +300,14 @@ public class SubjectAltNameExt extends APolicyRule
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() { 
+    public Vector<String> getDefaultParams() { 
         return mDefParams;
     }
 
     public String[] getExtendedPluginInfo(Locale locale) {
 
         // extended plugin info.
-        Vector info = new Vector();
+        Vector<String> info = new Vector<String>();
 
         info.addElement(PROP_CRITICAL + ";boolean;RFC2459 recommendation: If the certificate subject field contains an empty sequence, the extension MUST be marked critical.");
         info.addElement(IGeneralNameUtil.PROP_NUM_GENERALNAMES_INFO);
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectDirectoryAttributesExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectDirectoryAttributesExt.java
index be858c9f0965c4a7a8928985634d35e286009979..34821fab1fce19caab5e283deadc40d291b29684 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectDirectoryAttributesExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectDirectoryAttributesExt.java
@@ -74,9 +74,9 @@ public class SubjectDirectoryAttributesExt extends APolicyRule
     protected IConfigStore mConfig;
     protected SubjectDirAttributesExtension mExt = null;
 
-    protected Vector mParams = new Vector();
+    protected Vector<String> mParams = new Vector<String>();
     private String[] mEPI = null;  			// extended plugin info
-    protected static Vector mDefParams = new Vector();
+    protected static Vector<String> mDefParams = new Vector<String>();
 
     static {
         setDefaultParams();
@@ -157,7 +157,7 @@ public class SubjectDirectoryAttributesExt extends APolicyRule
                 certInfo.set(X509CertInfo.EXTENSIONS, extensions);
             } else {
                 try {
-                    extensions.delete(SubjectDirAttributesExtension.NAME);
+                    extensions.delete(SubjectDirAttributesExtension.class.getSimpleName());
                 } catch (IOException ee) {
                     // if name is not found, try deleting the extension using the OID
                     try {
@@ -169,12 +169,12 @@ public class SubjectDirectoryAttributesExt extends APolicyRule
 
             // form extension and set.
             if (mExt != null) {
-                extensions.set(SubjectDirAttributesExtension.NAME, mExt);
+                extensions.set(SubjectDirAttributesExtension.class.getSimpleName(), mExt);
             } else {
                 SubjectDirAttributesExtension ext = formExt(req);
 
                 if (ext != null) 
-                    extensions.set(SubjectDirAttributesExtension.NAME, formExt(req));
+                    extensions.set(SubjectDirAttributesExtension.class.getSimpleName(), formExt(req));
             }
             return PolicyResult.ACCEPTED;
         } catch (CertificateException e) {
@@ -191,11 +191,12 @@ public class SubjectDirectoryAttributesExt extends APolicyRule
         } 
     }
 
-    public Vector getInstanceParams() {
+
+    public Vector<String> getInstanceParams() {
         return mParams; // inited in init()
     }
 
-    public Vector getDefaultParams() {
+    public Vector<String> getDefaultParams() {
         return mDefParams;
     }
 
@@ -224,7 +225,7 @@ public class SubjectDirectoryAttributesExt extends APolicyRule
     }
 
     private void setExtendedPluginInfo() {
-        Vector v = new Vector();
+        Vector<String> v = new Vector<String>();
 
         v.addElement(PROP_CRITICAL + ";boolean;" +
             "RFC 2459 recommendation: MUST be non-critical.");
@@ -245,7 +246,7 @@ public class SubjectDirectoryAttributesExt extends APolicyRule
 
     private SubjectDirAttributesExtension formExt(IRequest req) 
         throws IOException {
-        Vector attrs = new Vector();
+        Vector<Attribute> attrs = new Vector<Attribute>();
 
         // if we're called from init and one attribute is from request attribute
         // the ext can't be formed yet.
@@ -371,7 +372,7 @@ class AttributeConfig {
         }
     }
 
-    public static void getDefaultParams(String name, Vector v) {
+    public static void getDefaultParams(String name, Vector<String> v) {
         String nameDot = name + ".";
 
         v.addElement(nameDot + PROP_ATTRIBUTE_NAME + "=");
@@ -379,7 +380,7 @@ class AttributeConfig {
         v.addElement(nameDot + PROP_VALUE + "=");
     }
 
-    public static void getExtendedPluginInfo(String name, Vector v) {
+    public static void getExtendedPluginInfo(String name, Vector<String> v) {
         String nameDot = name + ".";
         String attrChoices = getAllNames();
 
@@ -389,7 +390,7 @@ class AttributeConfig {
         v.addElement(nameDot + VALUE_INFO);
     }
 
-    public void getInstanceParams(Vector v) {
+    public void getInstanceParams(Vector<String> v) {
         String nameDot = mName + ".";
 
         v.addElement(nameDot + PROP_ATTRIBUTE_NAME + "=" + mAttributeName);
@@ -409,9 +410,9 @@ class AttributeConfig {
     }
 
     static private String getAllNames() {
-        Enumeration n = X500NameAttrMap.getDefault().getAllNames();
+        Enumeration<String> n = X500NameAttrMap.getDefault().getAllNames();
         StringBuffer sb = new StringBuffer();
-        sb.append((String) n.nextElement());
+        sb.append( n.nextElement());
 
         while (n.hasMoreElements()) {
             sb.append(",");
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectKeyIdentifierExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectKeyIdentifierExt.java
index 0c763b8aac387e2ab3a9a77044dd095dd73b11ec..717a648282b051b3efcc667a6191ac2759c1e24d 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectKeyIdentifierExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectKeyIdentifierExt.java
@@ -81,9 +81,9 @@ public class SubjectKeyIdentifierExt extends APolicyRule
     protected String mKeyIdType = DEF_KEYID_TYPE;;
     protected String mReqAttrName = DEF_REQATTR_NAME;
 
-    protected Vector mInstanceParams = new Vector();
+    protected Vector<String> mInstanceParams = new Vector<String>();
 
-    protected static Vector mDefaultParams = new Vector();
+    protected static Vector<String> mDefaultParams = new Vector<String>();
     static {
         // form static default params.
         mDefaultParams.addElement(PROP_CRITICAL + "=" + DEF_CRITICAL);
@@ -194,7 +194,7 @@ public class SubjectKeyIdentifierExt extends APolicyRule
             try {
                 if (extensions != null) {
                     subjectKeyIdExt = (SubjectKeyIdentifierExtension)
-                            extensions.get(SubjectKeyIdentifierExtension.NAME);
+                            extensions.get(SubjectKeyIdentifierExtension.class.getSimpleName());
                 }
             } catch (IOException e) {
                 // extension isn't there. 
@@ -210,7 +210,7 @@ public class SubjectKeyIdentifierExt extends APolicyRule
                     CMS.debug(
                         "SubjectKeyIdentifierExt: request id from user " + req.getRequestId() +
                         " had subject key identifier - deleted to be replaced");
-                    extensions.delete(SubjectKeyIdentifierExtension.NAME);
+                    extensions.delete(SubjectKeyIdentifierExtension.class.getSimpleName());
                 }
             }
 
@@ -235,7 +235,7 @@ public class SubjectKeyIdentifierExt extends APolicyRule
                 certInfo.set(X509CertInfo.EXTENSIONS, extensions);
             }
             extensions.set(
-                SubjectKeyIdentifierExtension.NAME, subjectKeyIdExt);
+                SubjectKeyIdentifierExtension.class.getSimpleName(), subjectKeyIdExt);
             CMS.debug(
                 "SubjectKeyIdentifierExt: added subject key id ext to request " + req.getRequestId());
             return PolicyResult.ACCEPTED;
@@ -343,7 +343,7 @@ public class SubjectKeyIdentifierExt extends APolicyRule
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() { 
+    public Vector<String> getInstanceParams() { 
         return mInstanceParams;
     }
 
@@ -352,7 +352,7 @@ public class SubjectKeyIdentifierExt extends APolicyRule
      *
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() { 
+    public Vector<String> getDefaultParams() { 
         return mDefaultParams;
     }
 
diff --git a/pki/base/common/src/com/netscape/cms/profile/common/EnrollProfile.java b/pki/base/common/src/com/netscape/cms/profile/common/EnrollProfile.java
index 95c360f8ceabd459c10f4ee65296a0673311f538..8bc6f190374d7484d8d00a8545bd157fc005e1be 100644
--- a/pki/base/common/src/com/netscape/cms/profile/common/EnrollProfile.java
+++ b/pki/base/common/src/com/netscape/cms/profile/common/EnrollProfile.java
@@ -28,7 +28,6 @@ import java.security.NoSuchAlgorithmException;
 import java.security.cert.CertificateException;
 import java.util.Date;
 import java.util.Enumeration;
-import java.util.Hashtable;
 import java.util.Locale;
 import java.util.StringTokenizer;
 
@@ -281,7 +280,7 @@ public abstract class EnrollProfile extends BasicProfile
         int seq_no = seq.intValue(); // start from 0
 
         int count = 0;
-        Enumeration setIds = getProfilePolicySetIds();
+        Enumeration<String> setIds = getProfilePolicySetIds();
 
         while (setIds.hasMoreElements()) {
             String setId = (String) setIds.nextElement();
@@ -369,7 +368,6 @@ public abstract class EnrollProfile extends BasicProfile
         }
         CMS.debug("EnrollProfile: Start parseCMC(): " + certreq);
 
-        Hashtable t1 = new Hashtable();
         TaggedRequest msgs[] = null;
 
         String creq = normalizeCertReq(certreq);
diff --git a/pki/base/common/src/com/netscape/cms/profile/constraint/EnrollConstraint.java b/pki/base/common/src/com/netscape/cms/profile/constraint/EnrollConstraint.java
index 0723a72c382918c64f05fc5f13e1d64722e58aa0..a03eadcd57b550a7edc796fa0da0689058462ba7 100644
--- a/pki/base/common/src/com/netscape/cms/profile/constraint/EnrollConstraint.java
+++ b/pki/base/common/src/com/netscape/cms/profile/constraint/EnrollConstraint.java
@@ -49,12 +49,12 @@ public abstract class EnrollConstraint implements IPolicyConstraint {
     public static final String CONFIG_NAME = "name";
 
     protected IConfigStore mConfig = null;
-    protected Vector mConfigNames = new Vector();
+    protected Vector<String> mConfigNames = new Vector<String>();
 
     public EnrollConstraint() {
     }
 
-    public Enumeration getConfigNames() {
+    public Enumeration<String> getConfigNames() {
         return mConfigNames.elements();
     }
 
@@ -175,10 +175,10 @@ public abstract class EnrollConstraint implements IPolicyConstraint {
         }
         if (exts == null)
             return null;
-        Enumeration e = exts.getElements();
+        Enumeration<Extension> e = exts.getAttributes();
 
         while (e.hasMoreElements()) {
-            Extension ext = (Extension) e.nextElement();
+            Extension ext = e.nextElement();
 
             if (ext.getExtensionId().toString().equals(name)) {
                 return ext;
diff --git a/pki/base/common/src/com/netscape/cms/profile/constraint/UniqueSubjectNameConstraint.java b/pki/base/common/src/com/netscape/cms/profile/constraint/UniqueSubjectNameConstraint.java
index 89b8d460261653a0e76afd7883ef9eebcc39b647..72498d39b600895cbef59996c97e2d3daeaa3f3f 100644
--- a/pki/base/common/src/com/netscape/cms/profile/constraint/UniqueSubjectNameConstraint.java
+++ b/pki/base/common/src/com/netscape/cms/profile/constraint/UniqueSubjectNameConstraint.java
@@ -110,7 +110,7 @@ public class UniqueSubjectNameConstraint extends EnrollConstraint {
         } else {
             try {
                 ext = (KeyUsageExtension) extensions.get(
-                    KeyUsageExtension.NAME);
+                    KeyUsageExtension.class.getSimpleName());
             } catch (IOException e) {
             // extension isn't there.
             }
@@ -180,14 +180,14 @@ public class UniqueSubjectNameConstraint extends EnrollConstraint {
         else {
             certsubjectname = sn.toString();
             String filter = "x509Cert.subject=" + certsubjectname;
-            Enumeration sameSubjRecords = null;
+            Enumeration<ICertRecord> sameSubjRecords = null;
             try {
                 sameSubjRecords = certdb.findCertRecords(filter);
             } catch (EBaseException e) {
                 CMS.debug("UniqueSubjectNameConstraint exception: "+e.toString());
             }
             while (sameSubjRecords != null && sameSubjRecords.hasMoreElements()) {
-                ICertRecord rec = (ICertRecord) sameSubjRecords.nextElement();
+                ICertRecord rec =  sameSubjRecords.nextElement();
                 String status = rec.getStatus();
 
                 IRevocationInfo revocationInfo = rec.getRevocationInfo();
@@ -197,10 +197,10 @@ public class UniqueSubjectNameConstraint extends EnrollConstraint {
                     CRLExtensions crlExts = revocationInfo.getCRLEntryExtensions();
 
                     if (crlExts != null) {
-                        Enumeration enumx = crlExts.getElements();
+                        Enumeration<Extension> enumx = crlExts.getElements();
 
                         while (enumx.hasMoreElements()) {
-                            Extension ext = (Extension) enumx.nextElement();
+                            Extension ext =  enumx.nextElement();
 
                             if (ext instanceof CRLReasonExtension) {
                                 reason = ((CRLReasonExtension) ext).getReason();
diff --git a/pki/base/common/src/com/netscape/cms/profile/def/CRLDistributionPointsExtDefault.java b/pki/base/common/src/com/netscape/cms/profile/def/CRLDistributionPointsExtDefault.java
index 6dfb24c135b7e67baaa5d0dd178764ad73a15878..5a551033c0d143de88d970227c0e21aaf06ba832 100644
--- a/pki/base/common/src/com/netscape/cms/profile/def/CRLDistributionPointsExtDefault.java
+++ b/pki/base/common/src/com/netscape/cms/profile/def/CRLDistributionPointsExtDefault.java
@@ -110,7 +110,7 @@ public class CRLDistributionPointsExtDefault extends EnrollExtDefault {
     }
 
 
-    public Enumeration getConfigNames() {
+    public Enumeration<String> getConfigNames() {
         refreshConfigAndValueNames();
         return super.getConfigNames();
     }
@@ -245,7 +245,7 @@ public class CRLDistributionPointsExtDefault extends EnrollExtDefault {
                 {
                     return;
                 }
-                Vector v = parseRecords(value);
+                Vector<NameValuePairs> v = parseRecords(value);
                 int size = v.size();
               
                 boolean critical = ext.isCritical();
@@ -253,7 +253,7 @@ public class CRLDistributionPointsExtDefault extends EnrollExtDefault {
 
                 for (; i < size; i++) {
                     NameValuePairs nvps = (NameValuePairs) v.elementAt(i);
-                    Enumeration names = nvps.getNames();
+                    Enumeration<String> names = nvps.getNames();
                     String pointType = null;
                     String pointValue = null;
                     String issuerType = null;
@@ -444,7 +444,7 @@ public class CRLDistributionPointsExtDefault extends EnrollExtDefault {
 
             StringBuffer sb = new StringBuffer();
 
-            Vector recs = new Vector();
+            Vector<NameValuePairs> recs = new Vector<NameValuePairs>();
             int num = getNumPoints();
 
             for (int i = 0; i < num; i++) {
diff --git a/pki/base/common/src/com/netscape/cms/profile/def/CertificatePoliciesExtDefault.java b/pki/base/common/src/com/netscape/cms/profile/def/CertificatePoliciesExtDefault.java
index 14eec785ed5e5c39be98154f33ba994120654cc0..63a4d303b7bd45ed1ce8f07ea73e0a5158231114 100644
--- a/pki/base/common/src/com/netscape/cms/profile/def/CertificatePoliciesExtDefault.java
+++ b/pki/base/common/src/com/netscape/cms/profile/def/CertificatePoliciesExtDefault.java
@@ -149,7 +149,7 @@ public class CertificatePoliciesExtDefault extends EnrollExtDefault {
     }
 
 
-    public Enumeration getConfigNames() {
+    public Enumeration<String> getConfigNames() {
         refreshConfigAndValueNames();
         return super.getConfigNames();
     }
@@ -245,9 +245,9 @@ public class CertificatePoliciesExtDefault extends EnrollExtDefault {
         return null;
     }
 
-    private Hashtable buildRecords(String value) throws EPropertyException {
+    private Hashtable<String, String> buildRecords(String value) throws EPropertyException {
         StringTokenizer st = new StringTokenizer(value, "\r\n");
-        Hashtable table = new Hashtable();
+        Hashtable<String, String> table = new Hashtable<String, String>();
         while (st.hasMoreTokens()) {
             String token = (String) st.nextToken();
             int index = token.indexOf(":");
@@ -287,12 +287,12 @@ public class CertificatePoliciesExtDefault extends EnrollExtDefault {
                         getExtension(PKIXExtensions.CertificatePolicies_Id.toString(), 
                             info);
                 
-                Hashtable h = buildRecords(value);
+                Hashtable<String, String> h = buildRecords(value);
 
                 String numStr = (String)h.get(CONFIG_POLICY_NUM);
                 int size = Integer.parseInt(numStr);
 
-                Vector certificatePolicies = new Vector();
+                Vector<CertificatePolicyInfo> certificatePolicies = new Vector<CertificatePolicyInfo>();
                 for (int i = 0; i < size; i++) {
                     String enable = (String)h.get(CONFIG_PREFIX+i+SEPARATOR+CONFIG_POLICY_ENABLE);
                     CertificatePolicyInfo cinfo = null;
@@ -359,7 +359,7 @@ public class CertificatePoliciesExtDefault extends EnrollExtDefault {
         }
     }
 
-    public String getValue(String name, Locale locale,
+	public String getValue(String name, Locale locale,
         X509CertInfo info)
         throws EPropertyException {
         CertificatePoliciesExtension ext = null;
@@ -392,17 +392,19 @@ public class CertificatePoliciesExtDefault extends EnrollExtDefault {
 
             StringBuffer sb = new StringBuffer();
             int num_policies = getNumPolicies();
-            int num_qualifiers = DEF_NUM_QUALIFIERS;
             sb.append(CONFIG_POLICY_NUM);
             sb.append(":");
             sb.append(num_policies);
             sb.append("\n");
-            Vector infos = null;
+            
+            Vector<CertificatePolicyInfo> infos ;
             try {
-                infos = (Vector)(ext.get(CertificatePoliciesExtension.INFOS)); 
+                @SuppressWarnings("unchecked")
+                Vector<CertificatePolicyInfo> certPolicyInfos = (Vector<CertificatePolicyInfo>)ext.get(CertificatePoliciesExtension.INFOS); 
+                infos = certPolicyInfos;
             } catch (IOException ee) {
+                infos  =null;
             }
-            Enumeration policies = ext.getElements();
 
             for (int i = 0; i < num_policies; i++) {
                 int qSize = 0;
@@ -411,7 +413,7 @@ public class CertificatePoliciesExtDefault extends EnrollExtDefault {
                 PolicyQualifiers qualifiers = null;
                 if (infos.size() > 0) { 
                     CertificatePolicyInfo cinfo = 
-                        (CertificatePolicyInfo) infos.elementAt(0);
+                         infos.elementAt(0);
                 
                     CertificatePolicyId id1 = cinfo.getPolicyIdentifier();               
                     policyId = id1.getIdentifier().toString();
@@ -539,7 +541,6 @@ public class CertificatePoliciesExtDefault extends EnrollExtDefault {
 
     public String getText(Locale locale) {
         StringBuffer sb = new StringBuffer();
-        String numPolicies = getConfig(CONFIG_POLICY_NUM);
         int num = getNumPolicies();
         int num1 = getNumQualifiers();
 
@@ -622,7 +623,7 @@ public class CertificatePoliciesExtDefault extends EnrollExtDefault {
 
         try {
             boolean critical = getConfigBoolean(CONFIG_CRITICAL);
-            Vector certificatePolicies = new Vector();
+            Vector<CertificatePolicyInfo> certificatePolicies = new Vector<CertificatePolicyInfo>();
             int num = getNumPolicies();
             CMS.debug("CertificatePoliciesExtension: createExtension: number of policies="+num);
             IConfigStore config = getConfigStore();
@@ -731,7 +732,7 @@ public class CertificatePoliciesExtDefault extends EnrollExtDefault {
 
         int nums[] = null;
         if (noticeNums != null && noticeNums.length() > 0) {
-            Vector numsVector = new Vector();
+            Vector<String> numsVector = new Vector<String>();
             StringTokenizer tokens = new StringTokenizer(noticeNums, ";");
             while (tokens.hasMoreTokens()) {
                 String num = tokens.nextToken().trim();
diff --git a/pki/base/common/src/com/netscape/cms/profile/def/EnrollDefault.java b/pki/base/common/src/com/netscape/cms/profile/def/EnrollDefault.java
index b5afc1c79e39049eaaad7e3cea22bd02a685255f..239765abbee464e97c137e0f66ec54600dba5a4f 100644
--- a/pki/base/common/src/com/netscape/cms/profile/def/EnrollDefault.java
+++ b/pki/base/common/src/com/netscape/cms/profile/def/EnrollDefault.java
@@ -80,13 +80,13 @@ public abstract class EnrollDefault implements IPolicyDefault, ICertInfoPolicyDe
     public static final String GN_OID_NAME = "OIDName";
 
     protected IConfigStore mConfig = null;
-    protected Vector mConfigNames = new Vector();
-    protected Vector mValueNames = new Vector();
+    protected Vector<String> mConfigNames = new Vector<String>();
+    protected Vector<String> mValueNames = new Vector<String>();
 
     public EnrollDefault() {
     }
 
-    public Enumeration getConfigNames() {
+    public Enumeration<String> getConfigNames() {
         return mConfigNames.elements();
     }
 
@@ -212,7 +212,7 @@ public abstract class EnrollDefault implements IPolicyDefault, ICertInfoPolicyDe
         mValueNames.addElement(name);
     }
 
-    public Enumeration getValueNames() {
+    public Enumeration<String> getValueNames() {
         return mValueNames.elements();
     }
 
@@ -291,10 +291,10 @@ public abstract class EnrollDefault implements IPolicyDefault, ICertInfoPolicyDe
                     info.get(X509CertInfo.EXTENSIONS);
             if (exts == null)
                 return;
-            Enumeration e = exts.getNames();
+            Enumeration<String> e = exts.getNames();
 
             while (e.hasMoreElements()) {
-                String n = (String) e.nextElement();
+                String n =  e.nextElement();
                 Extension ext = (Extension) exts.get(n);
 
                 if (ext.getExtensionId().toString().equals(name)) {
@@ -323,10 +323,10 @@ public abstract class EnrollDefault implements IPolicyDefault, ICertInfoPolicyDe
     protected Extension getExtension(String name, CertificateExtensions exts) {
         if (exts == null)
             return null;
-        Enumeration e = exts.getElements();
+        Enumeration<Extension> e = exts.getAttributes();
 
         while (e.hasMoreElements()) {
-            Extension ext = (Extension) e.nextElement();
+            Extension ext = e.nextElement();
 
             if (ext.getExtensionId().toString().equals(name)) {
                 return ext;
@@ -515,7 +515,7 @@ public abstract class EnrollDefault implements IPolicyDefault, ICertInfoPolicyDe
               String realm = nameValue.substring(pos0 + 1, pos1).trim();
               String name_type = nameValue.substring(pos1 + 1, pos2).trim();
               String name_strings = nameValue.substring(pos2 + 1).trim();
-              Vector strings = new Vector();
+              Vector<String> strings = new Vector<String>();
               StringTokenizer st = new StringTokenizer(name_strings, ",");
               while (st.hasMoreTokens()) {
                      strings.addElement(st.nextToken());
@@ -637,19 +637,19 @@ public abstract class EnrollDefault implements IPolicyDefault, ICertInfoPolicyDe
         return true;
     }
 
-    protected String buildRecords(Vector recs) throws EPropertyException {
+    protected String buildRecords(Vector<NameValuePairs> recs) throws EPropertyException {
         StringBuffer sb = new StringBuffer();
 
         for (int i = 0; i < recs.size(); i++) {
-            NameValuePairs pairs = (NameValuePairs) recs.elementAt(i);
+            NameValuePairs pairs =  recs.elementAt(i);
 
             sb.append("Record #");
             sb.append(i);
             sb.append("\r\n");
-            Enumeration e = pairs.getNames();
+            Enumeration<String> e = pairs.getNames();
 
             while (e.hasMoreElements()) {
-                String key = (String) e.nextElement();
+                String key = e.nextElement();
                 String val = pairs.getValue(key);
 
                 sb.append(key);
@@ -663,21 +663,21 @@ public abstract class EnrollDefault implements IPolicyDefault, ICertInfoPolicyDe
         return sb.toString();
     }
 
-    protected Vector parseRecords(String value) throws EPropertyException {
+    protected Vector<NameValuePairs> parseRecords(String value) throws EPropertyException {
         StringTokenizer st = new StringTokenizer(value, "\r\n");
         int num = 0;
-        Vector v = new Vector();
+        Vector<NameValuePairs> v = new Vector<NameValuePairs>();
         NameValuePairs nvps = null;
 
         while (st.hasMoreTokens()) {
-            String token = (String) st.nextToken();
+            String token =  st.nextToken();
 
             if (token.equals("Record #" + num)) {
                 CMS.debug("parseRecords: Record" + num);
                 nvps = new NameValuePairs();
                 v.addElement(nvps);
                 try {
-                    token = (String) st.nextToken();
+                    token =  st.nextToken();
                 } catch (NoSuchElementException e) { 
                     v.removeElementAt(num);
                     CMS.debug(e.toString());
@@ -761,7 +761,7 @@ public abstract class EnrollDefault implements IPolicyDefault, ICertInfoPolicyDe
         return locale;
     }
 
-    public String toGeneralNameString(GeneralName gn) {
+    public String toGeneralNameString(GeneralNameInterface gn) {
         int type = gn.getType(); 
         // Sun's General Name is not consistent, so we need
         // to do a special case for directory string
diff --git a/pki/base/common/src/com/netscape/cms/profile/def/FreshestCRLExtDefault.java b/pki/base/common/src/com/netscape/cms/profile/def/FreshestCRLExtDefault.java
index 7b9bcd5259b2737db9af00a3d45d4684c74411a9..13af0426e7e5736a48aa5310e63dac80a06a704c 100644
--- a/pki/base/common/src/com/netscape/cms/profile/def/FreshestCRLExtDefault.java
+++ b/pki/base/common/src/com/netscape/cms/profile/def/FreshestCRLExtDefault.java
@@ -123,7 +123,7 @@ public class FreshestCRLExtDefault extends EnrollExtDefault {
     }
 
 
-    public Enumeration getConfigNames() {
+    public Enumeration<String> getConfigNames() {
         refreshConfigAndValueNames();
         return super.getConfigNames();
     }
@@ -228,7 +228,7 @@ public class FreshestCRLExtDefault extends EnrollExtDefault {
                         getExtension(FreshestCRLExtension.OID, 
                             info);
 
-                Vector v = parseRecords(value);
+                Vector<NameValuePairs> v = parseRecords(value);
                 int size = v.size();
               
                 boolean critical = ext.isCritical();
@@ -236,7 +236,7 @@ public class FreshestCRLExtDefault extends EnrollExtDefault {
 
                 for (; i < size; i++) {
                     NameValuePairs nvps = (NameValuePairs) v.elementAt(i);
-                    Enumeration names = nvps.getNames();
+                    Enumeration<String> names = nvps.getNames();
                     String pointType = null;
                     String pointValue = null;
                     String issuerType = null;
@@ -389,7 +389,7 @@ public class FreshestCRLExtDefault extends EnrollExtDefault {
 
             StringBuffer sb = new StringBuffer();
 
-            Vector recs = new Vector();
+            Vector<NameValuePairs> recs = new Vector<NameValuePairs>();
             int num = getNumPoints();
             for (int i = 0; i < num; i++) {
                 NameValuePairs pairs = null;
diff --git a/pki/base/common/src/com/netscape/cms/profile/def/IssuerAltNameExtDefault.java b/pki/base/common/src/com/netscape/cms/profile/def/IssuerAltNameExtDefault.java
index 8f8837ebdfb33888285e3905385ed18d68817a3e..40bd48766362037641f25bf4c88a98dc27557078 100644
--- a/pki/base/common/src/com/netscape/cms/profile/def/IssuerAltNameExtDefault.java
+++ b/pki/base/common/src/com/netscape/cms/profile/def/IssuerAltNameExtDefault.java
@@ -239,7 +239,7 @@ public class IssuerAltNameExtDefault extends EnrollExtDefault {
                 GeneralNames names = (GeneralNames)
                     ext.get(IssuerAlternativeNameExtension.ISSUER_NAME);
                 StringBuffer sb = new StringBuffer();
-                Enumeration e = names.elements();
+                Enumeration<GeneralNameInterface> e = names.elements();
 
                 while (e.hasMoreElements()) {
                     GeneralName gn = (GeneralName) e.nextElement();
diff --git a/pki/base/common/src/com/netscape/cms/profile/def/NameConstraintsExtDefault.java b/pki/base/common/src/com/netscape/cms/profile/def/NameConstraintsExtDefault.java
index f6ddd91536a2f18dc5341c98dbad19e9ac97e390..7776238af57e8d10f3e9c5b5edcc24d62d88e329 100644
--- a/pki/base/common/src/com/netscape/cms/profile/def/NameConstraintsExtDefault.java
+++ b/pki/base/common/src/com/netscape/cms/profile/def/NameConstraintsExtDefault.java
@@ -163,7 +163,7 @@ public class NameConstraintsExtDefault extends EnrollExtDefault {
     }
 
 
-    public Enumeration getConfigNames() {
+    public Enumeration<String> getConfigNames() {
         refreshConfigAndValueNames();
         return super.getConfigNames();
     }
@@ -319,9 +319,9 @@ public class NameConstraintsExtDefault extends EnrollExtDefault {
                     return;
                 }
 
-                Vector v = parseRecords(value);
+                Vector<NameValuePairs> v = parseRecords(value);
 
-                Vector permittedSubtrees = createSubtrees(locale, v);
+                Vector<GeneralSubtree> permittedSubtrees = createSubtrees(locale, v);
 
                 ext.set(NameConstraintsExtension.PERMITTED_SUBTREES, 
                     new GeneralSubtrees(permittedSubtrees));
@@ -337,9 +337,9 @@ public class NameConstraintsExtDefault extends EnrollExtDefault {
                               "blank value for excluded subtrees ... returning");
                     return;
                 }
-                Vector v = parseRecords(value);
+                Vector<NameValuePairs> v = parseRecords(value);
 
-                Vector excludedSubtrees = createSubtrees(locale, v);
+                Vector<GeneralSubtree> excludedSubtrees = createSubtrees(locale, v);
 
                 ext.set(NameConstraintsExtension.EXCLUDED_SUBTREES, 
                     new GeneralSubtrees(excludedSubtrees));
@@ -360,18 +360,18 @@ public class NameConstraintsExtDefault extends EnrollExtDefault {
         }
     }
 
-    private Vector createSubtrees(Locale locale, Vector v) throws EPropertyException {
+    private Vector<GeneralSubtree> createSubtrees(Locale locale, Vector<NameValuePairs> v) throws EPropertyException {
         int size = v.size();
         String choice = null;
         String val = "";
         String minS = null;
         String maxS = null;
 
-        Vector subtrees = new Vector();
+        Vector<GeneralSubtree> subtrees = new Vector<GeneralSubtree>();
 
         for (int i = 0; i < size; i++) {
             NameValuePairs nvps = (NameValuePairs) v.elementAt(i);
-            Enumeration names = nvps.getNames();
+            Enumeration<String> names = nvps.getNames();
 
             while (names.hasMoreElements()) {
                 String name1 = (String) names.nextElement();
@@ -517,10 +517,10 @@ public class NameConstraintsExtDefault extends EnrollExtDefault {
 
     private String getSubtreesInfo(NameConstraintsExtension ext, 
         GeneralSubtrees subtrees) throws EPropertyException {
-        Vector trees = subtrees.getSubtrees();
+        Vector<GeneralSubtree> trees = subtrees.getSubtrees();
         int size = trees.size();
 
-        Vector recs = new Vector();
+        Vector<NameValuePairs> recs = new Vector<NameValuePairs>();
 
         for (int i = 0; i < size; i++) {
             GeneralSubtree tree = (GeneralSubtree) trees.elementAt(i);
@@ -606,7 +606,7 @@ public class NameConstraintsExtDefault extends EnrollExtDefault {
 
             boolean critical = getConfigBoolean(CONFIG_CRITICAL);
 
-            Vector v = new Vector();
+            Vector<GeneralSubtree> v = new Vector<GeneralSubtree>();
 
             for (int i = 0; i < num; i++) {
                 String enable = getConfig(CONFIG_PERMITTED_ENABLE + i);
@@ -621,7 +621,7 @@ public class NameConstraintsExtDefault extends EnrollExtDefault {
                 }
             }
 
-            Vector v1 = new Vector();
+            Vector<GeneralSubtree> v1 = new Vector<GeneralSubtree>();
 
             num = getNumExcluded();
             for (int i = 0; i < num; i++) {
diff --git a/pki/base/common/src/com/netscape/cms/profile/def/PolicyMappingsExtDefault.java b/pki/base/common/src/com/netscape/cms/profile/def/PolicyMappingsExtDefault.java
index 19bfb361517317005b2ab8751728fe6adbd85ffa..05899e2c02203a78009d6d8deb20779366111006 100644
--- a/pki/base/common/src/com/netscape/cms/profile/def/PolicyMappingsExtDefault.java
+++ b/pki/base/common/src/com/netscape/cms/profile/def/PolicyMappingsExtDefault.java
@@ -110,7 +110,7 @@ public class PolicyMappingsExtDefault extends EnrollExtDefault {
         super.setConfig(name, value);
     }
 
-    public Enumeration getConfigNames() {
+    public Enumeration<String> getConfigNames() {
         refreshConfigAndValueNames();
         return super.getConfigNames();
     }
@@ -209,17 +209,17 @@ public class PolicyMappingsExtDefault extends EnrollExtDefault {
                 if(ext == null)  {
                     return;
                 } 
-                Vector v = parseRecords(value);
+                Vector<NameValuePairs> v = parseRecords(value);
                 int size = v.size();
 
                 String issuerPolicyId = null;
                 String subjectPolicyId = null;
                 String enable = null;
-                Vector policyMaps = new Vector();
+                Vector<CertificatePolicyMap> policyMaps = new Vector<CertificatePolicyMap>();
 
                 for (int i = 0; i < size; i++) {
                     NameValuePairs nvps = (NameValuePairs) v.elementAt(i);
-                    Enumeration names = nvps.getNames();
+                    Enumeration<String> names = nvps.getNames();
 
                     while (names.hasMoreElements()) {
                         String name1 = (String) names.nextElement();
@@ -313,12 +313,12 @@ public class PolicyMappingsExtDefault extends EnrollExtDefault {
 
             int num_mappings = getNumMappings();
 
-            Enumeration maps = ext.getMappings();
+            Enumeration<CertificatePolicyMap> maps = ext.getMappings();
          
             int num = 0;
             StringBuffer sb = new StringBuffer();
 
-            Vector recs = new Vector();
+            Vector<NameValuePairs> recs = new Vector<NameValuePairs>();
 
             for (int i = 0; i < num_mappings; i++) {
                 NameValuePairs pairs = new NameValuePairs();
@@ -391,7 +391,7 @@ public class PolicyMappingsExtDefault extends EnrollExtDefault {
 
         try {
             boolean critical = getConfigBoolean(CONFIG_CRITICAL);
-            Vector policyMaps = new Vector();
+            Vector<CertificatePolicyMap> policyMaps = new Vector<CertificatePolicyMap>();
             int num = getNumMappings();
 
             for (int i = 0; i < num; i++) { 
diff --git a/pki/base/common/src/com/netscape/cms/profile/def/SubjectAltNameExtDefault.java b/pki/base/common/src/com/netscape/cms/profile/def/SubjectAltNameExtDefault.java
index 64d822e8ff94b01e017ea8d50878e0d2e0c92b80..8adc94dc61f46aad0d169e379c0406bd6ba9e0a9 100644
--- a/pki/base/common/src/com/netscape/cms/profile/def/SubjectAltNameExtDefault.java
+++ b/pki/base/common/src/com/netscape/cms/profile/def/SubjectAltNameExtDefault.java
@@ -24,7 +24,6 @@ import java.util.Locale;
 import java.util.StringTokenizer;
 import java.util.UUID;
 
-import netscape.security.x509.GeneralName;
 import netscape.security.x509.GeneralNameInterface;
 import netscape.security.x509.GeneralNames;
 import netscape.security.x509.PKIXExtensions;
@@ -159,7 +158,7 @@ public class SubjectAltNameExtDefault extends EnrollExtDefault {
         super.setConfig(name, value);
     }
 
-    public Enumeration getConfigNames() {
+    public Enumeration<String> getConfigNames() {
         refreshConfigAndValueNames();
         return super.getConfigNames();
     }
@@ -357,13 +356,10 @@ public class SubjectAltNameExtDefault extends EnrollExtDefault {
                 GeneralNames names = (GeneralNames)
                     ext.get(SubjectAlternativeNameExtension.SUBJECT_NAME);
                 StringBuffer sb = new StringBuffer();
-                Enumeration e = names.elements();
+                Enumeration<GeneralNameInterface> e = names.elements();
 
                 while (e.hasMoreElements()) {
-                    Object o = (Object) e.nextElement();
-                    if (!(o instanceof GeneralName))
-                            continue;
-                    GeneralName gn = (GeneralName) o;
+                    GeneralNameInterface gn = e.nextElement();
 
                     if (!sb.toString().equals("")) {
                         sb.append("\r\n");
diff --git a/pki/base/common/src/com/netscape/cms/profile/def/SubjectDirAttributesExtDefault.java b/pki/base/common/src/com/netscape/cms/profile/def/SubjectDirAttributesExtDefault.java
index 0259fb36e15c2038b335738451c140962dc13610..04ae8da3326c3f58e0fb9fdcd1ebe121f1f9b4da 100644
--- a/pki/base/common/src/com/netscape/cms/profile/def/SubjectDirAttributesExtDefault.java
+++ b/pki/base/common/src/com/netscape/cms/profile/def/SubjectDirAttributesExtDefault.java
@@ -115,7 +115,7 @@ public class SubjectDirAttributesExtDefault extends EnrollExtDefault {
     }
 
 
-    public Enumeration getConfigNames() {
+    public Enumeration<String> getConfigNames() {
         refreshConfigAndValueNames();
         return super.getConfigNames();
     }
@@ -215,21 +215,21 @@ public class SubjectDirAttributesExtDefault extends EnrollExtDefault {
                 {
                     return;
                 }
-                Vector v = parseRecords(value);
+                Vector<NameValuePairs> v = parseRecords(value);
                 int size = v.size();
               
                 boolean critical = ext.isCritical();
 
                 X500NameAttrMap map = X500NameAttrMap.getDefault();
-                Vector attrV = new Vector();
+                Vector<Attribute> attrV = new Vector<Attribute>();
                 for (int i=0; i < size; i++) {
-                    NameValuePairs nvps = (NameValuePairs) v.elementAt(i);
-                    Enumeration names = nvps.getNames();
+                    NameValuePairs nvps = v.elementAt(i);
+                    Enumeration<String> names = nvps.getNames();
                     String attrName = null;
                     String attrValue = null;
                     String enable = "false";
                     while (names.hasMoreElements()) {
-                        String name1 = (String) names.nextElement();
+                        String name1 =  names.nextElement();
 
                         if (name1.equals(ATTR_NAME)) {
                             attrName = nvps.getValue(name1);
@@ -312,16 +312,16 @@ public class SubjectDirAttributesExtDefault extends EnrollExtDefault {
 
             X500NameAttrMap map = X500NameAttrMap.getDefault();
 
-            Vector recs = new Vector();
+            Vector<NameValuePairs> recs = new Vector<NameValuePairs>();
             int num = getNumAttrs();
-            Enumeration e = ext.getAttributesList();
+            Enumeration<Attribute> e = ext.getAttributesList();
             CMS.debug("SubjectDirAttributesExtDefault: getValue: attributesList="+e);
             int i=0;
 
             while (e.hasMoreElements()) {
                 NameValuePairs pairs = new NameValuePairs();
                 pairs.add(ENABLE, "true");
-                Attribute attr = (Attribute)(e.nextElement());
+                Attribute attr = e.nextElement();
                 CMS.debug("SubjectDirAttributesExtDefault: getValue: attribute="+attr);
                 ObjectIdentifier oid = attr.getOid();
                 CMS.debug("SubjectDirAttributesExtDefault: getValue: oid="+oid);
@@ -332,7 +332,7 @@ public class SubjectDirAttributesExtDefault extends EnrollExtDefault {
                     pairs.add(ATTR_NAME, vv);
                 else
                     pairs.add(ATTR_NAME, oid.toString());
-                Enumeration v = attr.getValues();
+                Enumeration<String> v = attr.getValues();
                 
                 // just support single value for now
                 StringBuffer ss = new StringBuffer();
@@ -413,7 +413,7 @@ public class SubjectDirAttributesExtDefault extends EnrollExtDefault {
         num = getNumAttrs();
          
         AttributeConfig attributeConfig = null;
-        Vector attrs = new Vector();
+        Vector<Attribute> attrs = new Vector<Attribute>();
         for (int i = 0; i < num; i++) {
             String enable = getConfig(CONFIG_ENABLE + i); 
             if (enable != null && enable.equals("true")) {
@@ -521,9 +521,9 @@ class AttributeConfig {
         return;
     }
 
-    private Vector str2MultiValues(String attrValue) {
+    private Vector<String> str2MultiValues(String attrValue) {
         StringTokenizer tokenizer = new StringTokenizer(attrValue, ",");
-        Vector v = new Vector();
+        Vector<String> v = new Vector<String>();
         while (tokenizer.hasMoreTokens()) {
             v.addElement(tokenizer.nextToken());
         }
diff --git a/pki/base/common/src/com/netscape/cms/publish/mappers/AVAPattern.java b/pki/base/common/src/com/netscape/cms/publish/mappers/AVAPattern.java
index 9f337cbb435d6540976aa5b4105d1fa8d30391cb..aea489e3d1421c6486ab14da34682740d9678cff 100644
--- a/pki/base/common/src/com/netscape/cms/publish/mappers/AVAPattern.java
+++ b/pki/base/common/src/com/netscape/cms/publish/mappers/AVAPattern.java
@@ -37,6 +37,7 @@ import netscape.ldap.LDAPDN;
 import netscape.security.x509.CertificateExtensions;
 import netscape.security.x509.Extension;
 import netscape.security.x509.GeneralName;
+import netscape.security.x509.GeneralNameInterface;
 import netscape.security.x509.GeneralNames;
 import netscape.security.x509.LdapV3DNStrConverter;
 import netscape.security.x509.OIDMap;
@@ -446,7 +447,7 @@ class AVAPattern {
                         // For now, just give subjectAltName
                         // as an example.
                         if (mValue.equalsIgnoreCase(
-                                SubjectAlternativeNameExtension.NAME)) {
+                                SubjectAlternativeNameExtension.class.getSimpleName())) {
                             try {
                                 GeneralNames subjectNames = (GeneralNames)
                                     ((SubjectAlternativeNameExtension)
@@ -459,7 +460,7 @@ class AVAPattern {
 
                                 int j = 0;
 
-                                for (Enumeration n =
+                                for (Enumeration<GeneralNameInterface> n =
                                         subjectNames.elements();
                                     n.hasMoreElements();) {
 
@@ -561,7 +562,7 @@ class AVAPattern {
             return new String[] { rdn };
         }
 
-        Vector avas = new Vector();
+        Vector<String> avas = new Vector<String>();
 
         StringTokenizer token = new StringTokenizer(rdn, "+");
 
diff --git a/pki/base/common/src/com/netscape/cms/publish/mappers/LdapCaSimpleMap.java b/pki/base/common/src/com/netscape/cms/publish/mappers/LdapCaSimpleMap.java
index 9f605678e00770663bfd046b0315266d36a30259..3cf1bca82a446de11e1ea53557a0048e8496af18 100644
--- a/pki/base/common/src/com/netscape/cms/publish/mappers/LdapCaSimpleMap.java
+++ b/pki/base/common/src/com/netscape/cms/publish/mappers/LdapCaSimpleMap.java
@@ -348,16 +348,16 @@ public class LdapCaSimpleMap implements ILdapMapper, IExtendedPluginInfo {
         return "LdapCaSimpleMap";
     }
 
-    public Vector getDefaultParams() {
-        Vector v = new Vector();
+    public Vector<String> getDefaultParams() {
+        Vector<String> v = new Vector<String>();
 
         v.addElement(PROP_DNPATTERN + "=");
         v.addElement(PROP_CREATECA + "=true");
         return v;
     }
 
-    public Vector getInstanceParams() {
-        Vector v = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> v = new Vector<String>();
 
         try {
             if (mDnPattern == null) {
diff --git a/pki/base/common/src/com/netscape/cms/publish/mappers/LdapEnhancedMap.java b/pki/base/common/src/com/netscape/cms/publish/mappers/LdapEnhancedMap.java
index c3c269515eecfd316551560bd95a8410edb96f8d..e3c2fa1baca0877485b247ec883c31f93a6a575f 100644
--- a/pki/base/common/src/com/netscape/cms/publish/mappers/LdapEnhancedMap.java
+++ b/pki/base/common/src/com/netscape/cms/publish/mappers/LdapEnhancedMap.java
@@ -124,7 +124,7 @@ public class LdapEnhancedMap
      * for instances of this implementation can be configured through the
      * console.
      */
-    private static Vector defaultParams = new Vector();
+    private static Vector<String> defaultParams = new Vector<String>();
 
     static {
         defaultParams.addElement(PROP_DNPATTERN + "=");
@@ -397,12 +397,12 @@ public class LdapEnhancedMap
         return "LdapEnhancedMap";
     }
 
-    public Vector getDefaultParams() {
+    public Vector<String> getDefaultParams() {
         return defaultParams;
     }
 
-    public Vector getInstanceParams() {
-        Vector v = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> v = new Vector<String>();
 
         try {
             if (mDnPattern == null) {
@@ -588,7 +588,7 @@ public class LdapEnhancedMap
     /////////////////////////////////
 
     public String[] getExtendedPluginInfo(Locale locale) {
-        Vector v = new Vector();
+        Vector<String> v = new Vector<String>();
 
         v.addElement(PROP_DNPATTERN +
             ";string;Describes how to form the Ldap " +
diff --git a/pki/base/common/src/com/netscape/cms/publish/mappers/LdapSimpleMap.java b/pki/base/common/src/com/netscape/cms/publish/mappers/LdapSimpleMap.java
index c08ec849330ef98f3629704dd19e0cb218b5e15e..192b1d30972f9e31fdc9a6c7fed834791e54de4a 100644
--- a/pki/base/common/src/com/netscape/cms/publish/mappers/LdapSimpleMap.java
+++ b/pki/base/common/src/com/netscape/cms/publish/mappers/LdapSimpleMap.java
@@ -302,15 +302,15 @@ public class LdapSimpleMap implements ILdapMapper, IExtendedPluginInfo {
         return "LdapSimpleMap";
     }
 
-    public Vector getDefaultParams() {
-        Vector v = new Vector();
+    public Vector<String> getDefaultParams() {
+        Vector<String> v = new Vector<String>();
 
         v.addElement(PROP_DNPATTERN + "=");
         return v;
     }
 
-    public Vector getInstanceParams() {
-        Vector v = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> v = new Vector<String>();
 
         try {
             if (mDnPattern == null) {
diff --git a/pki/base/common/src/com/netscape/cms/publish/mappers/MapAVAPattern.java b/pki/base/common/src/com/netscape/cms/publish/mappers/MapAVAPattern.java
index 26503040148a10eb8b7d5a49ddb0d7f3351f0dd5..667a7c5af7931282e1d4cbaeba03aa93ebc2b941 100644
--- a/pki/base/common/src/com/netscape/cms/publish/mappers/MapAVAPattern.java
+++ b/pki/base/common/src/com/netscape/cms/publish/mappers/MapAVAPattern.java
@@ -30,6 +30,7 @@ import netscape.security.x509.AVA;
 import netscape.security.x509.CertificateExtensions;
 import netscape.security.x509.Extension;
 import netscape.security.x509.GeneralName;
+import netscape.security.x509.GeneralNameInterface;
 import netscape.security.x509.GeneralNames;
 import netscape.security.x509.LdapV3DNStrConverter;
 import netscape.security.x509.OIDMap;
@@ -526,7 +527,7 @@ class MapAVAPattern {
                         // Check the extensions one by one.
                         // For now, just give subjectAltName as an example.
                         if
-                        (mValue.equalsIgnoreCase(SubjectAlternativeNameExtension.NAME)) {
+                        (mValue.equalsIgnoreCase(SubjectAlternativeNameExtension.class.getSimpleName())) {
                             try {
                                 GeneralNames subjectNames = (GeneralNames)
                                     ((SubjectAlternativeNameExtension) ext).get(SubjectAlternativeNameExtension.SUBJECT_NAME);
@@ -535,7 +536,7 @@ class MapAVAPattern {
                                     break;
                                 int j = 0;
 
-                                for (Enumeration n = subjectNames.elements(); n.hasMoreElements();) {
+                                for (Enumeration<GeneralNameInterface> n = subjectNames.elements(); n.hasMoreElements();) {
                                     GeneralName gn = (GeneralName) n.nextElement();
                                     String gname = gn.toString();
 
@@ -617,7 +618,7 @@ class MapAVAPattern {
 
         if (plus == -1) 
             return new String[] { rdn };
-        Vector avas = new Vector();
+        Vector<String> avas = new Vector<String>();
         StringTokenizer token = new StringTokenizer(rdn, "+");
 
         while (token.hasMoreTokens()) 
diff --git a/pki/base/common/src/com/netscape/cms/publish/mappers/MapDNPattern.java b/pki/base/common/src/com/netscape/cms/publish/mappers/MapDNPattern.java
index 547e370ad470dfb5c8167d00d80c2d72d7dae8c3..5de5e3dd99e59fa5f407f2aac18af3711aedf285 100644
--- a/pki/base/common/src/com/netscape/cms/publish/mappers/MapDNPattern.java
+++ b/pki/base/common/src/com/netscape/cms/publish/mappers/MapDNPattern.java
@@ -120,7 +120,7 @@ public class MapDNPattern {
 
     private void parse(PushbackReader in)
         throws ELdapException {
-        Vector rdnPatterns = new Vector();
+        Vector<MapRDNPattern> rdnPatterns = new Vector<MapRDNPattern>();
         MapRDNPattern rdnPattern = null;
         int lastChar = -1;
 
@@ -139,7 +139,7 @@ public class MapDNPattern {
         mRDNPatterns = new MapRDNPattern[rdnPatterns.size()];
         rdnPatterns.copyInto(mRDNPatterns);
 
-        Vector reqAttrs = new Vector();
+        Vector<String> reqAttrs = new Vector<String>();
 
         for (int i = 0; i < mRDNPatterns.length; i++) {
             String[] rdnAttrs = mRDNPatterns[i].getReqAttrs();
@@ -151,7 +151,7 @@ public class MapDNPattern {
         mReqAttrs = new String[reqAttrs.size()];
         reqAttrs.copyInto(mReqAttrs);
 
-        Vector certAttrs = new Vector();
+        Vector<String> certAttrs = new Vector<String>();
 
         for (int i = 0; i < mRDNPatterns.length; i++) {
             String[] rdnAttrs = mRDNPatterns[i].getCertAttrs();
diff --git a/pki/base/common/src/com/netscape/cms/publish/mappers/MapRDNPattern.java b/pki/base/common/src/com/netscape/cms/publish/mappers/MapRDNPattern.java
index 3720d02ddfd8ce3843042ad3edb5fb8dedb79768..65091000cd0c0343cf2289c73ea4146f38b3e604 100644
--- a/pki/base/common/src/com/netscape/cms/publish/mappers/MapRDNPattern.java
+++ b/pki/base/common/src/com/netscape/cms/publish/mappers/MapRDNPattern.java
@@ -123,7 +123,7 @@ class MapRDNPattern {
     private void parse(PushbackReader in)
         throws ELdapException {
         //System.out.println("_________ begin rdn _________");
-        Vector avaPatterns = new Vector();
+        Vector<MapAVAPattern> avaPatterns = new Vector<MapAVAPattern>();
         MapAVAPattern avaPattern = null;
         int lastChar;
 
@@ -156,7 +156,7 @@ class MapRDNPattern {
         mAVAPatterns = new MapAVAPattern[avaPatterns.size()];
         avaPatterns.copyInto(mAVAPatterns);
 
-        Vector reqAttrs = new Vector();
+        Vector<String> reqAttrs = new Vector<String>();
 
         for (int i = 0; i < mAVAPatterns.length; i++) {
             String avaAttr = mAVAPatterns[i].getReqAttr();
@@ -168,7 +168,7 @@ class MapRDNPattern {
         mReqAttrs = new String[reqAttrs.size()];
         reqAttrs.copyInto(mReqAttrs);
 
-        Vector certAttrs = new Vector();
+        Vector<String> certAttrs = new Vector<String>();
 
         for (int i = 0; i < mAVAPatterns.length; i++) {
             String avaAttr = mAVAPatterns[i].getCertAttr();
diff --git a/pki/base/common/src/com/netscape/cms/publish/publishers/LdapEncryptCertPublisher.java b/pki/base/common/src/com/netscape/cms/publish/publishers/LdapEncryptCertPublisher.java
index 902763b48d8cf4e39c7f979d28bd828241b7bc2d..f4dcbb3c0d0a3ed44e05603a03f8ed19b2ae6403 100644
--- a/pki/base/common/src/com/netscape/cms/publish/publishers/LdapEncryptCertPublisher.java
+++ b/pki/base/common/src/com/netscape/cms/publish/publishers/LdapEncryptCertPublisher.java
@@ -91,15 +91,15 @@ public class LdapEncryptCertPublisher implements ILdapPublisher, IExtendedPlugin
 
     }
 
-    public Vector getInstanceParams() {
-        Vector v = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> v = new Vector<String>();
 
         v.addElement("certAttr=" + mCertAttr);
         return v;
     }
 
-    public Vector getDefaultParams() {
-        Vector v = new Vector();
+    public Vector<String> getDefaultParams() {
+        Vector<String> v = new Vector<String>();
 
         v.addElement("certAttr=" + mCertAttr);
         return v;
@@ -247,11 +247,12 @@ public class LdapEncryptCertPublisher implements ILdapPublisher, IExtendedPlugin
             return at;
         }
 
-        Enumeration vals = attr.getByteValues();
+        @SuppressWarnings("unchecked")
+		Enumeration<byte[]> vals = attr.getByteValues();
         byte[] val = null;
 
         while (vals.hasMoreElements()) {
-            val = (byte[]) vals.nextElement();
+            val = vals.nextElement();
             try {
                 X509CertImpl cert = new X509CertImpl(val);
 
@@ -283,7 +284,7 @@ public class LdapEncryptCertPublisher implements ILdapPublisher, IExtendedPlugin
         CRLExtensions crlentryexts = new CRLExtensions();
 
         try {
-            crlentryexts.set(CRLReasonExtension.NAME, reasonExt);
+            crlentryexts.set(CRLReasonExtension.class.getSimpleName(), reasonExt);
         } catch (IOException e) {
             log(ILogger.LL_FAILURE, CMS.getLogMessage("PUBLISH_SET_CRL_REASON", reason.toString(), e.toString()));
 
@@ -322,7 +323,8 @@ public class LdapEncryptCertPublisher implements ILdapPublisher, IExtendedPlugin
         if (attr == null) {
             return false;
         }
-        Enumeration vals = attr.getByteValues();
+        @SuppressWarnings("unchecked")
+		Enumeration<byte[]> vals = attr.getByteValues();
         byte[] val = null;
 
         while (vals.hasMoreElements()) {
@@ -341,11 +343,12 @@ public class LdapEncryptCertPublisher implements ILdapPublisher, IExtendedPlugin
         if (attr == null) {
             return false;
         }
-        Enumeration vals = attr.getStringValues();
+        @SuppressWarnings("unchecked")
+		Enumeration<String> vals = attr.getStringValues();
         String val = null;
 
         while (vals.hasMoreElements()) {
-            val = (String) vals.nextElement();
+            val = vals.nextElement();
             if (val.equalsIgnoreCase(sval)) {
                 return true;
             }
diff --git a/pki/base/common/src/com/netscape/cms/servlet/admin/CMSAdminServlet.java b/pki/base/common/src/com/netscape/cms/servlet/admin/CMSAdminServlet.java
index 84290ea61821665c298f803cffdb9fc224784300..3251e46bf7800cbd7dae3eddeda99a902b5aeda0 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/admin/CMSAdminServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/admin/CMSAdminServlet.java
@@ -355,7 +355,7 @@ public final class CMSAdminServlet extends AdminServlet {
     }
 
     private boolean isSubsystemInstalled(String subsystem) {
-        Enumeration e = CMS.getSubsystems();
+        Enumeration<ISubsystem> e = CMS.getSubsystems();
 
         while (e.hasMoreElements()) {
             String type = "";
@@ -383,7 +383,7 @@ public final class CMSAdminServlet extends AdminServlet {
         HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
 
-        Enumeration e = CMS.getSubsystems();
+        Enumeration<ISubsystem> e = CMS.getSubsystems();
         boolean isCAInstalled = false;
         boolean isRAInstalled = false;
         boolean isKRAInstalled = false;
@@ -536,13 +536,14 @@ public final class CMSAdminServlet extends AdminServlet {
         // ensure that any low-level exceptions are reported
         // to the signed audit log and stored as failures
         try {
-            Enumeration enum1 = req.getParameterNames();
+            @SuppressWarnings("unchecked")
+			Enumeration<String> enum1 = req.getParameterNames();
             NameValuePairs params = new NameValuePairs();
             ICryptoSubsystem jssSubSystem = (ICryptoSubsystem)
                 CMS.getSubsystem(CMS.SUBSYSTEM_CRYPTO);
 
             jssSubSystem.getInternalTokenName();
-            Enumeration e = CMS.getSubsystems();
+            Enumeration<ISubsystem> e = CMS.getSubsystems();
             boolean isCAInstalled = false;
             boolean isRAInstalled = false;
             boolean isKRAInstalled = false;
@@ -797,7 +798,7 @@ public final class CMSAdminServlet extends AdminServlet {
         HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
         NameValuePairs params = new NameValuePairs();
-        Enumeration e = CMS.getSubsystems();
+        Enumeration<ISubsystem> e = CMS.getSubsystems();
         StringBuffer buff = new StringBuffer();
 
         while (e.hasMoreElements()) {
@@ -863,7 +864,8 @@ public final class CMSAdminServlet extends AdminServlet {
             IOException, EBaseException {
 
         IConfigStore dbConfig = mConfig.getSubStore(PROP_INTERNAL_DB);
-        Enumeration enum1 = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+		Enumeration<String> enum1 = req.getParameterNames();
 
         while (enum1.hasMoreElements()) {
             String key = (String) enum1.nextElement();
@@ -889,7 +891,8 @@ private void 	createMasterKey(HttpServletRequest req,
             IOException, EBaseException {
 
         NameValuePairs params = new NameValuePairs();
-        Enumeration e = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+		Enumeration<String> e = req.getParameterNames();
 		String newKeyName = null, selectedToken = null;
         while (e.hasMoreElements()) {
             String name = (String) e.nextElement();
@@ -926,7 +929,8 @@ private void 	createMasterKey(HttpServletRequest req,
             IOException, EBaseException {
 
         NameValuePairs params = new NameValuePairs();
-        Enumeration e = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+		Enumeration<String> e = req.getParameterNames();
 
         while (e.hasMoreElements()) {
             String name = (String) e.nextElement();
@@ -980,7 +984,8 @@ private void 	createMasterKey(HttpServletRequest req,
         IConfigStore dbConfig = mConfig.getSubStore(PROP_DB);
         IConfigStore ldapConfig = dbConfig.getSubStore("ldap");
         NameValuePairs params = new NameValuePairs();
-        Enumeration e = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+		Enumeration<String> e = req.getParameterNames();
        
         while (e.hasMoreElements()) {
             String name = (String) e.nextElement();
@@ -1042,7 +1047,8 @@ private void 	createMasterKey(HttpServletRequest req,
     private void loggedInToken(HttpServletRequest req,
         HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
-        Enumeration enum1 = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+		Enumeration<String> enum1 = req.getParameterNames();
         String tokenName = "";
         String pwd = "";
 
@@ -1070,7 +1076,8 @@ private void 	createMasterKey(HttpServletRequest req,
     private void checkTokenStatus(HttpServletRequest req,
         HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
-        Enumeration enum1 = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+		Enumeration<String> enum1 = req.getParameterNames();
         String key = "";
         String value = "";
 
@@ -1116,7 +1123,8 @@ private void 	createMasterKey(HttpServletRequest req,
         // to the signed audit log and stored as failures
         try {
             NameValuePairs params = new NameValuePairs();
-            Enumeration enum1 = req.getParameterNames();
+            @SuppressWarnings("unchecked")
+			Enumeration<String> enum1 = req.getParameterNames();
             String tokenName = Constants.PR_INTERNAL_TOKEN_NAME;
             String keyType = "";
             int keyLength = 512;
@@ -1492,7 +1500,8 @@ private void 	createMasterKey(HttpServletRequest req,
         // ensure that any low-level exceptions are reported
         // to the signed audit log and stored as failures
         try {
-            Enumeration enum1 = req.getParameterNames();
+            @SuppressWarnings("unchecked")
+			Enumeration<String> enum1 = req.getParameterNames();
             String pkcs = "";
             String type = "";
             String tokenName = Constants.PR_INTERNAL_TOKEN_NAME;
@@ -1744,7 +1753,7 @@ private void 	createMasterKey(HttpServletRequest req,
                     if (extensions != null) {
                         BasicConstraintsExtension basic =
                             (BasicConstraintsExtension)
-                            extensions.get(BasicConstraintsExtension.NAME);
+                            extensions.get(BasicConstraintsExtension.class.getSimpleName());
 
                         if (basic == null)
                             log(CMS.getLogMessage("ADMIN_SRVLT_BASIC_CONSTRAIN_NULL"));
@@ -1930,7 +1939,8 @@ private void 	createMasterKey(HttpServletRequest req,
             String serverRoot = "";
             String serverID = "";
             String certpath = "";
-            Enumeration enum1 = req.getParameterNames();
+            @SuppressWarnings("unchecked")
+			Enumeration<String> enum1 = req.getParameterNames();
 
             while (enum1.hasMoreElements()) {
                 String key = (String) enum1.nextElement();
@@ -2152,7 +2162,7 @@ private void 	createMasterKey(HttpServletRequest req,
                     if (extensions != null) {
                         BasicConstraintsExtension basic =
                             (BasicConstraintsExtension)
-                            extensions.get(BasicConstraintsExtension.NAME);
+                            extensions.get(BasicConstraintsExtension.class.getSimpleName());
 
                         if (basic == null)
                             log(CMS.getLogMessage("ADMIN_SRVLT_BASIC_CONSTRAIN_NULL"));
@@ -2344,7 +2354,8 @@ private void 	createMasterKey(HttpServletRequest req,
             String serverRoot = "";
             String serverID = "";
             String certpath = "";
-            Enumeration enum1 = req.getParameterNames();
+            @SuppressWarnings("unchecked")
+			Enumeration<String> enum1 = req.getParameterNames();
             NameValuePairs results = new NameValuePairs();
 
             while (enum1.hasMoreElements()) {
@@ -2571,7 +2582,8 @@ private void 	createMasterKey(HttpServletRequest req,
     private void getCertInfo(HttpServletRequest req,
         HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
-        Enumeration enum1 = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+		Enumeration<String> enum1 = req.getParameterNames();
         NameValuePairs results = new NameValuePairs();
         String pkcs = "";
         String path = "";
@@ -2668,7 +2680,8 @@ private void 	createMasterKey(HttpServletRequest req,
     private void getCertPrettyPrint(HttpServletRequest req,
         HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
-        Enumeration enum1 = req.getParameterNames();
+    	@SuppressWarnings("unchecked")
+        Enumeration<String> enum1 = req.getParameterNames();
         ICryptoSubsystem jssSubSystem = (ICryptoSubsystem)
             CMS.getSubsystem(CMS.SUBSYSTEM_CRYPTO);
         String nickname = "";
@@ -2711,7 +2724,8 @@ private void 	createMasterKey(HttpServletRequest req,
     private void getRootCertTrustBit(HttpServletRequest req,
         HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
-        Enumeration enum1 = req.getParameterNames();
+    	@SuppressWarnings("unchecked")
+        Enumeration<String> enum1 = req.getParameterNames();
         ICryptoSubsystem jssSubSystem = (ICryptoSubsystem)
             CMS.getSubsystem(CMS.SUBSYSTEM_CRYPTO);
         String nickname = "";
@@ -2827,7 +2841,8 @@ private void 	createMasterKey(HttpServletRequest req,
     private void deleteCerts(HttpServletRequest req,
         HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
-        Enumeration enum1 = req.getParameterNames();
+    	@SuppressWarnings("unchecked")
+        Enumeration<String> enum1 = req.getParameterNames();
         ICryptoSubsystem jssSubSystem = (ICryptoSubsystem)
             CMS.getSubsystem(CMS.SUBSYSTEM_CRYPTO);
         String nickname = "";
@@ -2859,8 +2874,8 @@ private void 	createMasterKey(HttpServletRequest req,
     private void validateSubjectName(HttpServletRequest req,
         HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
-
-        Enumeration enum1 = req.getParameterNames();
+    	@SuppressWarnings("unchecked")
+        Enumeration<String> enum1 = req.getParameterNames();
 
         while (enum1.hasMoreElements()) {
             String key = (String) enum1.nextElement();
@@ -2880,7 +2895,8 @@ private void 	createMasterKey(HttpServletRequest req,
     private void validateKeyLength(HttpServletRequest req,
         HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
-        Enumeration enum1 = req.getParameterNames();
+    	@SuppressWarnings("unchecked")
+        Enumeration<String> enum1 = req.getParameterNames();
         String keyType = "RSA";
         String keyLen = "512";
         String certType = "";
@@ -2910,7 +2926,8 @@ private void 	createMasterKey(HttpServletRequest req,
     private void validateCurveName(HttpServletRequest req,
         HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
-        Enumeration enum1 = req.getParameterNames();
+    	@SuppressWarnings("unchecked")
+        Enumeration<String> enum1 = req.getParameterNames();
         String curveName = null;
 
         while (enum1.hasMoreElements()) {
@@ -2940,7 +2957,8 @@ private void 	createMasterKey(HttpServletRequest req,
     private void validateCertExtension(HttpServletRequest req,
         HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
-        Enumeration enum1 = req.getParameterNames();
+    	@SuppressWarnings("unchecked")
+        Enumeration<String> enum1 = req.getParameterNames();
         String certExt = "";
 
         while (enum1.hasMoreElements()) {
@@ -2964,7 +2982,8 @@ private void 	createMasterKey(HttpServletRequest req,
         HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
         NameValuePairs params = new NameValuePairs();
-        Enumeration enum1 = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> enum1 = req.getParameterNames();
  
         String nickname = "";
         String keyType = "RSA";
@@ -2995,7 +3014,8 @@ private void 	createMasterKey(HttpServletRequest req,
         HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
         NameValuePairs params = new NameValuePairs();
-        Enumeration enum1 = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> enum1 = req.getParameterNames();
 
         String nickname = "";
         String keyType = "RSA";
@@ -3084,7 +3104,8 @@ private void 	createMasterKey(HttpServletRequest req,
         // ensure that any low-level exceptions are reported
         // to the signed audit log and stored as failures
         try {
-            Enumeration enum1 = req.getParameterNames();
+        	@SuppressWarnings("unchecked")
+            Enumeration<String> enum1 = req.getParameterNames();
             ICryptoSubsystem jssSubSystem = (ICryptoSubsystem)
                 CMS.getSubsystem(CMS.SUBSYSTEM_CRYPTO);
             String trust = "";
@@ -3184,8 +3205,8 @@ private void 	createMasterKey(HttpServletRequest req,
                 CMS.debug("CMSAdminServlet::runSelfTestsOnDemand():"
                     + "  ENTERING . . .");
             }
-
-            Enumeration enum1 = req.getParameterNames();
+            @SuppressWarnings("unchecked")
+            Enumeration<String> enum1 = req.getParameterNames();
             String request = "";
             NameValuePairs results = new NameValuePairs();
             String content = "";
diff --git a/pki/base/common/src/com/netscape/cms/servlet/base/CMSServlet.java b/pki/base/common/src/com/netscape/cms/servlet/base/CMSServlet.java
index f5f06becbf58c8e7377a57f5aa90019e920d8820..696b091eec6d399679b4f8e1e3893e4009d92687 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/base/CMSServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/base/CMSServlet.java
@@ -239,14 +239,14 @@ public abstract class CMSServlet extends HttpServlet {
 
     protected boolean mRenderResult = true;
     protected String mFinalErrorMsg = FINAL_ERROR_MSG;
-    protected Hashtable mTemplates = new Hashtable();
+    protected Hashtable<Integer, CMSLoadTemplate> mTemplates = new Hashtable<Integer, CMSLoadTemplate>();
 
     protected ServletConfig mServletConfig = null;
     protected ServletContext mServletContext = null;
     private   CMSFileLoader mFileLoader = null;
 
-    protected Vector mDontSaveHttpParams = new Vector();
-    protected Vector mSaveHttpHeaders = new Vector();
+    protected Vector<String> mDontSaveHttpParams = new Vector<String>();
+    protected Vector<String> mSaveHttpHeaders = new Vector<String>();
 
     protected String mId = null;
     protected IConfigStore mConfig = null;
@@ -286,9 +286,9 @@ public abstract class CMSServlet extends HttpServlet {
     public CMSServlet() {
     }
 
-    public static Hashtable toHashtable(HttpServletRequest req) {
-        Hashtable httpReqHash = new Hashtable();
-        Enumeration names = req.getParameterNames();
+    public static Hashtable<String, String> toHashtable(HttpServletRequest req) {
+        Hashtable<String, String> httpReqHash = new Hashtable<String, String>();
+        Enumeration<?> names = req.getParameterNames();
 
         while (names.hasMoreElements()) {
             String name = (String) names.nextElement();
@@ -355,7 +355,7 @@ public abstract class CMSServlet extends HttpServlet {
                 mFinalErrorMsg = eMsg;
 
                 // get any configured templates.
-            Enumeration templs = mTemplates.elements();
+            Enumeration<CMSLoadTemplate> templs = mTemplates.elements();
 
             while (templs.hasMoreElements()) {
                 CMSLoadTemplate templ = (CMSLoadTemplate) templs.nextElement();
@@ -419,7 +419,7 @@ public abstract class CMSServlet extends HttpServlet {
     public void outputHttpParameters(HttpServletRequest httpReq)
     {
 	CMS.debug("CMSServlet:service() uri = " + httpReq.getRequestURI());
-        Enumeration paramNames = httpReq.getParameterNames();
+        Enumeration<?> paramNames = httpReq.getParameterNames();
         while (paramNames.hasMoreElements()) {
             String pn = (String)paramNames.nextElement();
             // added this facility so that password can be hidden,
@@ -511,7 +511,7 @@ public abstract class CMSServlet extends HttpServlet {
         ICommandQueue iCommandQueue = CMS.getCommandQueue();
 
         try {
-            if (iCommandQueue.registerProcess((Object) cmsRequest, (Object) this) == false) {
+            if (iCommandQueue.registerProcess(cmsRequest, this) == false) {
                 cmsRequest.setStatus(CMSRequest.ERROR);
                 renderResult(cmsRequest);
                 SessionContext.releaseContext();
@@ -604,7 +604,7 @@ public abstract class CMSServlet extends HttpServlet {
         Node argBlockContainer = xmlObj.createContainer(parent, argBlockName);
 
         if (argBlock != null) {
-            Enumeration names = argBlock.getElements();
+            Enumeration<String> names = argBlock.getElements();
             while (names.hasMoreElements()) {
                 String name = (String) names.nextElement();
                 String val = argBlock.get(name).toString();
@@ -624,7 +624,7 @@ public abstract class CMSServlet extends HttpServlet {
             outputArgBlockAsXML(xmlObj, root, "header", params.getHeader());
             outputArgBlockAsXML(xmlObj, root, "fixed",  params.getFixed());
 
-            Enumeration records = params.queryRecords();
+            Enumeration<IArgBlock> records = params.queryRecords();
             Node recordsNode = xmlObj.createContainer(root, "records");
             if (records != null) {
                 while (records.hasMoreElements()) {
@@ -1023,11 +1023,11 @@ public abstract class CMSServlet extends HttpServlet {
     protected void saveHttpHeaders(
         HttpServletRequest httpReq, IRequest req)
         throws EBaseException {
-        Hashtable headers = new Hashtable();
-        Enumeration hdrs = mSaveHttpHeaders.elements();
+        Hashtable<String, String> headers = new Hashtable<String, String>();
+        Enumeration<String> hdrs = mSaveHttpHeaders.elements();
 
         while (hdrs.hasMoreElements()) {
-            String hdr = (String) hdrs.nextElement();
+            String hdr = hdrs.nextElement();
             String val = httpReq.getHeader(hdr);
 
             if (val != null) {
@@ -1042,17 +1042,17 @@ public abstract class CMSServlet extends HttpServlet {
      */
     protected void saveHttpParams(
         IArgBlock httpParams, IRequest req) {
-        Hashtable saveParams = new Hashtable();
+        Hashtable<String, String> saveParams = new Hashtable<String, String>();
 
-        Enumeration names = httpParams.elements();
+        Enumeration<String> names = httpParams.elements();
 
         while (names.hasMoreElements()) {
             String name = (String) names.nextElement();
-            Enumeration params = mDontSaveHttpParams.elements();
+            Enumeration<String> params = mDontSaveHttpParams.elements();
             boolean dosave = true;
 
             while (params.hasMoreElements()) {
-                String param = (String) params.nextElement();
+                String param = params.nextElement();
 
                 if (name.equalsIgnoreCase(param)) {
                     dosave = false;
@@ -1065,7 +1065,7 @@ public abstract class CMSServlet extends HttpServlet {
                 // retrieves string values.
                 // TODO - when we can use JDK5 features we should typecast
                 // the params until they get here
-                saveParams.put(name, httpParams.get(name));
+                saveParams.put(name, (String) httpParams.get(name));
             }
         }
         req.setExtData(IRequest.HTTP_PARAMS, saveParams);
@@ -1477,7 +1477,7 @@ public abstract class CMSServlet extends HttpServlet {
 
         // # 56230 - expose auth token parameters to the policy predicate
         if (token != null && req != null) {
-            Enumeration e = token.getElements();
+            Enumeration<String> e = token.getElements();
             while (e.hasMoreElements()) {
                 String n = (String) e.nextElement();
                 String[] x1 = token.getInStringArray(n);
@@ -1555,7 +1555,7 @@ public abstract class CMSServlet extends HttpServlet {
         CRLExtensions crlentryexts = new CRLExtensions();
 
         try {
-            crlentryexts.set(CRLReasonExtension.NAME, reasonExt);
+            crlentryexts.set(CRLReasonExtension.class.getSimpleName(), reasonExt);
         } catch (IOException e) {
             log(ILogger.LL_FAILURE, 
                 CMS.getLogMessage("CMSGW_ERR_CRL_REASON", reason.toString(), e.toString()));
@@ -2197,7 +2197,7 @@ public abstract class CMSServlet extends HttpServlet {
             return ILogger.SIGNED_AUDIT_EMPTY_VALUE;
         }
 
-        Enumeration groups = null;
+        Enumeration<IGroup> groups = null;
 
         try {
             groups = mUG.findGroups("*");
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/CMCRevReqServlet.java b/pki/base/common/src/com/netscape/cms/servlet/cert/CMCRevReqServlet.java
index 5431d2cf840b4375b90a52c4563844c04ee726c7..15d069e36bd8d08b5cce647bf1bfe6375f8a9dd1 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/CMCRevReqServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/CMCRevReqServlet.java
@@ -383,8 +383,8 @@ CMS.debug("**** mFormPath = "+mFormPath);
 
         try {
             int count = 0;
-            Vector oldCertsV = new Vector();
-            Vector revCertImplsV = new Vector();
+            Vector<X509CertImpl> oldCertsV = new Vector<X509CertImpl>();
+            Vector<RevokedCertImpl> revCertImplsV = new Vector<RevokedCertImpl>();
 
             // Construct a CRL reason code extension.
             RevocationReason revReason = RevocationReason.fromInt(reason);
@@ -410,7 +410,7 @@ CMS.debug("**** mFormPath = "+mFormPath);
             if (mAuthority instanceof ICertificateAuthority) {
                 ICertRecordList list = (ICertRecordList) mCertDB.findCertRecordsInList(
                         revokeAll, null, totalRecordCount);
-                Enumeration e = list.getCertRecords(0, totalRecordCount - 1);
+                Enumeration<ICertRecord> e = list.getCertRecords(0, totalRecordCount - 1);
 
                 while (e != null && e.hasMoreElements()) {
                     ICertRecord rec = (ICertRecord) e.nextElement();
@@ -443,7 +443,7 @@ CMS.debug("**** mFormPath = "+mFormPath);
 
                 if (mRequestID != null && mRequestID.length() > 0) 
                     reqIdStr = mRequestID;
-                Vector serialNumbers = new Vector();
+                Vector<String> serialNumbers = new Vector<String>();
 
                 if (revokeAll != null && revokeAll.length() > 0) {
                     for (int i = revokeAll.indexOf('=');
@@ -659,7 +659,7 @@ CMS.debug("**** mFormPath = "+mFormPath);
                 }
                 if (mAuthority instanceof ICertificateAuthority) {
                     // let known update and publish status of all crls.
-                    Enumeration otherCRLs =
+                    Enumeration<ICRLIssuingPoint> otherCRLs =
                         ((ICertificateAuthority) mAuthority).getCRLIssuingPoints();
 
                     while (otherCRLs.hasMoreElements()) {
@@ -766,7 +766,7 @@ CMS.debug("**** mFormPath = "+mFormPath);
                 }
 
             } else {
-                Vector errors = revReq.getExtDataInStringVector(IRequest.ERRORS);
+                Vector<String> errors = revReq.getExtDataInStringVector(IRequest.ERRORS);
                 StringBuffer errorStr = new StringBuffer();
 
                 if (errors != null && errors.size() > 0) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/ChallengeRevocationServlet1.java b/pki/base/common/src/com/netscape/cms/servlet/cert/ChallengeRevocationServlet1.java
index 8dff276859abc996d4bb4f0051062abdca35a7f2..181e6e9c55ef338de6450bf0e5efbbc9a76680ff 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/ChallengeRevocationServlet1.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/ChallengeRevocationServlet1.java
@@ -309,8 +309,8 @@ public class ChallengeRevocationServlet1 extends CMSServlet {
         throws EBaseException {
         try {
             int count = 0;
-            Vector oldCertsV = new Vector();
-            Vector revCertImplsV = new Vector();
+            Vector<X509CertImpl> oldCertsV = new Vector<X509CertImpl>();
+            Vector<RevokedCertImpl> revCertImplsV = new Vector<RevokedCertImpl>();
 
             // Construct a CRL reason code extension.
             RevocationReason revReason = RevocationReason.fromInt(reason);
@@ -336,7 +336,7 @@ public class ChallengeRevocationServlet1 extends CMSServlet {
             if (mAuthority instanceof ICertificateAuthority) {
                 ICertRecordList list = (ICertRecordList) mCertDB.findCertRecordsInList(
                         revokeAll, null, totalRecordCount);
-                Enumeration e = list.getCertRecords(0, totalRecordCount - 1);
+                Enumeration<ICertRecord> e = list.getCertRecords(0, totalRecordCount - 1);
 
                 while (e != null && e.hasMoreElements()) {
                     ICertRecord rec = (ICertRecord) e.nextElement();
@@ -369,7 +369,7 @@ public class ChallengeRevocationServlet1 extends CMSServlet {
 
                 if (mRequestID != null && mRequestID.length() > 0) 
                     reqIdStr = mRequestID;
-                Vector serialNumbers = new Vector();
+                Vector<String> serialNumbers = new Vector<String>();
 
                 if (revokeAll != null && revokeAll.length() > 0) {
                     for (int i = revokeAll.indexOf('=');
@@ -565,7 +565,7 @@ public class ChallengeRevocationServlet1 extends CMSServlet {
                 }
                 if (mAuthority instanceof ICertificateAuthority) {
                     // let known update and publish status of all crls.
-                    Enumeration otherCRLs =
+                    Enumeration<ICRLIssuingPoint> otherCRLs =
                         ((ICertificateAuthority) mAuthority).getCRLIssuingPoints();
 
                     while (otherCRLs.hasMoreElements()) {
@@ -672,7 +672,7 @@ public class ChallengeRevocationServlet1 extends CMSServlet {
                 }
 
             } else {
-                Vector errors = revReq.getExtDataInStringVector(IRequest.ERRORS);
+                Vector<String> errors = revReq.getExtDataInStringVector(IRequest.ERRORS);
                 StringBuffer errorStr = new StringBuffer();
 
                 if (errors != null && errors.size() > 0) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayBySerial.java b/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayBySerial.java
index 61cadc4aad2462a49a3d142a841af55683aa9e4c..ea62b9cbe3ae29b37a456f2d74e95fd5e1bdbed8 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayBySerial.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayBySerial.java
@@ -331,7 +331,7 @@ public class DisplayBySerial extends CMSServlet {
                 CRLExtensions crlExts = revocationInfo.getCRLEntryExtensions();
 
                 if (crlExts != null) {
-                    Enumeration enumx = crlExts.getElements();
+                    Enumeration<Extension> enumx = crlExts.getElements();
                     int reason = 0;
 
                     while (enumx.hasMoreElements()) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/DoRevoke.java b/pki/base/common/src/com/netscape/cms/servlet/cert/DoRevoke.java
index b333c78704e238807e01cb67dfd2dcbcb9d86afd..3c562d659006a62ab8b5477d1b9b7fd770fffeda 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/DoRevoke.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/DoRevoke.java
@@ -441,8 +441,8 @@ public class DoRevoke extends CMSServlet {
 
         try {
             int count = 0;
-            Vector oldCertsV = new Vector();
-            Vector revCertImplsV = new Vector();
+            Vector<X509CertImpl> oldCertsV = new Vector<X509CertImpl>();
+            Vector<RevokedCertImpl> revCertImplsV = new Vector<RevokedCertImpl>();
 
             // Construct a CRL reason code extension.
             RevocationReason revReason = RevocationReason.fromInt(reason);
@@ -467,11 +467,11 @@ public class DoRevoke extends CMSServlet {
 
             if (mAuthority instanceof ICertificateAuthority) {
 
-                Enumeration e = mCertDB.searchCertificates(revokeAll,
+                Enumeration<ICertRecord> e = mCertDB.searchCertificates(revokeAll,
                         totalRecordCount, mTimeLimits);
 
                 while (e != null && e.hasMoreElements()) {
-                    ICertRecord rec = (ICertRecord) e.nextElement();
+                    ICertRecord rec = e.nextElement();
 
                     if (rec == null)
                         continue;
@@ -532,7 +532,7 @@ public class DoRevoke extends CMSServlet {
 
             } else if (mAuthority instanceof IRegistrationAuthority) {
                 String reqIdStr = req.getParameter("requestId");
-                Vector serialNumbers = new Vector();
+                Vector<String> serialNumbers = new Vector<String>();
 
                 if (revokeAll != null && revokeAll.length() > 0) {
                     for (int i = revokeAll.indexOf('=');
@@ -833,7 +833,7 @@ public class DoRevoke extends CMSServlet {
 
                 if (mAuthority instanceof ICertificateAuthority) {
                     // let known update and publish status of all crls. 
-                    Enumeration otherCRLs = 
+                    Enumeration<ICRLIssuingPoint> otherCRLs = 
                         ((ICertificateAuthority) mAuthority).getCRLIssuingPoints();
 
                     while (otherCRLs.hasMoreElements()) {
@@ -924,7 +924,7 @@ public class DoRevoke extends CMSServlet {
                 } else {
                     header.addStringValue("revoked", "no");
                 }
-                Vector errors = revReq.getExtDataInStringVector(IRequest.ERRORS);
+                Vector<String> errors = revReq.getExtDataInStringVector(IRequest.ERRORS);
                 if (errors != null) {
                     StringBuffer errInfo = new StringBuffer();
                     for (int i = 0; i < errors.size(); i++) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/DoRevokeTPS.java b/pki/base/common/src/com/netscape/cms/servlet/cert/DoRevokeTPS.java
index ce074a0513b17db3198e0d97e9dfd3897df63d80..1209366133f18352859d1250476d3dc11e55b121 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/DoRevokeTPS.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/DoRevokeTPS.java
@@ -355,8 +355,8 @@ public class DoRevokeTPS extends CMSServlet {
 
         try {
             int count = 0;
-            Vector oldCertsV = new Vector();
-            Vector revCertImplsV = new Vector();
+            Vector<X509CertImpl> oldCertsV = new Vector<X509CertImpl>();
+            Vector<RevokedCertImpl> revCertImplsV = new Vector<RevokedCertImpl>();
 
             // Construct a CRL reason code extension.
             RevocationReason revReason = RevocationReason.fromInt(reason);
@@ -379,7 +379,7 @@ public class DoRevokeTPS extends CMSServlet {
                 entryExtn.set(invalidityDateExtn.getName(), invalidityDateExtn);
             }
 
-            Enumeration e = mCertDB.searchCertificates(revokeAll,
+            Enumeration<ICertRecord> e = mCertDB.searchCertificates(revokeAll,
                     totalRecordCount, mTimeLimits);
 
             boolean alreadyRevokedCertFound = false;
@@ -632,7 +632,7 @@ public class DoRevokeTPS extends CMSServlet {
 
                 if (mAuthority instanceof ICertificateAuthority) {
                     // let known update and publish status of all crls. 
-                    Enumeration otherCRLs = 
+                    Enumeration<ICRLIssuingPoint> otherCRLs = 
                         ((ICertificateAuthority) mAuthority).getCRLIssuingPoints();
 
                     while (otherCRLs.hasMoreElements()) {
@@ -717,7 +717,7 @@ public class DoRevokeTPS extends CMSServlet {
                     o_status = "status=2";
                     errorString = "error=Undefined request status";
                 }
-                Vector errors = revReq.getExtDataInStringVector(IRequest.ERRORS);
+                Vector<String> errors = revReq.getExtDataInStringVector(IRequest.ERRORS);
                 if (errors != null) {
                     StringBuffer errInfo = new StringBuffer();
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/EnrollServlet.java b/pki/base/common/src/com/netscape/cms/servlet/cert/EnrollServlet.java
index 4688406ad67a5d11a1c9ec39d08ef1d44a92ef26..44d0c509778aa063b64aa6aa6fb0fa5f5b1c0821 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/EnrollServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/EnrollServlet.java
@@ -471,7 +471,7 @@ public class EnrollServlet extends CMSServlet {
         ICertRecordList list =
             (ICertRecordList) mCa.getCertificateRepository().findCertRecordsInList(filter, null, 10);
         int size = list.getSize();
-        Enumeration en = list.getCertRecords(0, size - 1);
+        Enumeration<ICertRecord> en = list.getCertRecords(0, size - 1);
         boolean gotEncCert = false;
 
         CMS.debug("EnrollServlet: signing cert filter " + filter);
@@ -573,10 +573,10 @@ public class EnrollServlet extends CMSServlet {
             // audit log the status
             try {
                 if (status == RequestStatus.REJECTED) {
-                    Vector messages = req.getExtDataInStringVector(IRequest.ERRORS);
+                    Vector<String> messages = req.getExtDataInStringVector(IRequest.ERRORS);
 
                     if (messages != null) {
-                        Enumeration msgs = messages.elements();
+                        Enumeration<String> msgs = messages.elements();
                         StringBuffer wholeMsg = new StringBuffer();
 
                         while (msgs.hasMoreElements()) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/HashEnrollServlet.java b/pki/base/common/src/com/netscape/cms/servlet/cert/HashEnrollServlet.java
index 645cb831b322ba7d2a879c665bc57e47fb6ea307..5507cadf264dd0a574e8e272b39507edd4d4d6f8 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/HashEnrollServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/HashEnrollServlet.java
@@ -495,7 +495,7 @@ public class HashEnrollServlet extends CMSServlet {
                     (ICertRecordList) mCa.getCertificateRepository().findCertRecordsInList(filter,
                         null, 10);
                 int size = list.getSize();
-                Enumeration en = list.getCertRecords(0, size - 1);
+                Enumeration<ICertRecord> en = list.getCertRecords(0, size - 1);
                 boolean gotEncCert = false;
 
                 if (!en.hasMoreElements()) {
@@ -658,10 +658,10 @@ public class HashEnrollServlet extends CMSServlet {
             // audit log the status 
             try {
                 if (status == RequestStatus.REJECTED) {
-                    Vector messages = req.getExtDataInStringVector(IRequest.ERRORS);
+                    Vector<String> messages = req.getExtDataInStringVector(IRequest.ERRORS);
 
                     if (messages != null) {
-                        Enumeration msgs = messages.elements();
+                        Enumeration<String> msgs = messages.elements();
                         StringBuffer wholeMsg = new StringBuffer();
 
                         while (msgs.hasMoreElements()) {
@@ -1207,7 +1207,7 @@ public class HashEnrollServlet extends CMSServlet {
                     continue;
                 }
                 KeyUsageExtension ext = (KeyUsageExtension)
-                    exts.get(KeyUsageExtension.NAME);
+                    exts.get(KeyUsageExtension.class.getSimpleName());
 
                 if (ext == null) 
                     // should not happen 
@@ -1239,8 +1239,8 @@ public class HashEnrollServlet extends CMSServlet {
                         new KeyUsageExtension(Boolean.valueOf(true), 
                             (Object) newvalue);
 
-                    exts.delete(KeyUsageExtension.NAME);
-                    exts.set(KeyUsageExtension.NAME, newext);
+                    exts.delete(KeyUsageExtension.class.getSimpleName());
+                    exts.set(KeyUsageExtension.class.getSimpleName(), newext);
                 }
             } catch (IOException e) {
                 // should never happen 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/ListCerts.java b/pki/base/common/src/com/netscape/cms/servlet/cert/ListCerts.java
index f683a83d62496b9e8795f258c93f173bae71090b..a65be25a9b397bc59a6af7f0acd1d2d3da0b2136 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/ListCerts.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/ListCerts.java
@@ -70,10 +70,8 @@ public class ListCerts extends CMSServlet {
      */
     private static final long serialVersionUID = -3568155814023099576L;
     private final static String TPL_FILE = "queryCert.template";
-    private final static String INFO = "ListCerts";
     private final static BigInteger MINUS_ONE = new BigInteger("-1");
 
-    private final static String CURRENT_TIME = "currentTime";
     private final static String USE_CLIENT_FILTER = "useClientFilter";
     private final static String ALLOWED_CLIENT_FILTERS = "allowedClientFilters";
 
@@ -84,7 +82,7 @@ public class ListCerts extends CMSServlet {
     private boolean  mHardJumpTo = false; //jump to the end
     private String mDirection = null;
     private boolean mUseClientFilter = false;
-    private Vector mAllowedClientFilters = new Vector();
+    private Vector<String> mAllowedClientFilters = new Vector<String>();
     private int mMaxReturns = 2000;
 
     /**
@@ -150,7 +148,7 @@ public class ListCerts extends CMSServlet {
 
         if (mUseClientFilter) {
             com.netscape.certsrv.apps.CMS.debug("useClientFilter=true");
-            Enumeration filters = mAllowedClientFilters.elements();
+            Enumeration<String> filters = mAllowedClientFilters.elements();
             // check to see if the filter is allowed
             while (filters.hasMoreElements()) {
                 String filter = (String)filters.nextElement();
@@ -392,7 +390,7 @@ public class ListCerts extends CMSServlet {
 	       pSize);
         // retrive maxCount + 1 entries
 
-        Enumeration e = list.getCertRecords(0, maxCount); 
+        Enumeration<ICertRecord> e = list.getCertRecords(0, maxCount); 
 
         ICertRecordList tolist = null;
         int toCurIndex = 0;
@@ -404,7 +402,7 @@ public class ListCerts extends CMSServlet {
                         filter, 
                         (String[]) null, serialTo, 
                         "serialno", maxCount);
-            Enumeration en = tolist.getCertRecords(0, 0);
+            Enumeration<ICertRecord> en = tolist.getCertRecords(0, 0);
 
             if (en == null || (!en.hasMoreElements())) {
                 toCurIndex = list.getSize() - 1;
@@ -650,7 +648,7 @@ public class ListCerts extends CMSServlet {
                 CRLExtensions crlExts = revocationInfo.getCRLEntryExtensions();
 
                 if (crlExts != null) {
-                    Enumeration enum1 = crlExts.getElements();
+                    Enumeration<Extension> enum1 = crlExts.getElements();
                     int reason = 0;
 
                     while (enum1.hasMoreElements()) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/SrchCerts.java b/pki/base/common/src/com/netscape/cms/servlet/cert/SrchCerts.java
index 84e7e784a27ed2e5e0016e5a477658944a71d67a..17bad7a1ef42cf8d5cb96d6fb5453bba8b21d48f 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/SrchCerts.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/SrchCerts.java
@@ -629,12 +629,12 @@ public class SrchCerts extends CMSServlet {
                 timeLimit = mTimeLimits;
             }
             CMS.debug("Start searching ... " + "filter=" + filter + " maxreturns=" + maxResults + " timelimit=" + timeLimit);
-            Enumeration e = mCertDB.searchCertificates(filter, maxResults, timeLimit);
+            Enumeration<ICertRecord > e = mCertDB.searchCertificates(filter, maxResults, timeLimit);
 
             int count = 0;
 
             while (e != null && e.hasMoreElements()) {
-                ICertRecord rec = (ICertRecord) e.nextElement();
+                ICertRecord rec = e.nextElement();
 
                 if (rec != null) {
                     count++;
@@ -761,11 +761,11 @@ public class SrchCerts extends CMSServlet {
                 CRLExtensions crlExts = revocationInfo.getCRLEntryExtensions();
 
                 if (crlExts != null) {
-                    Enumeration enum1 = crlExts.getElements();
+                    Enumeration<Extension> enum1 = crlExts.getElements();
                     int reason = 0;
 
                     while (enum1.hasMoreElements()) {
-                        Extension ext = (Extension) enum1.nextElement();
+                        Extension ext = enum1.nextElement();
 
                         if (ext instanceof CRLReasonExtension) {
                             reason = ((CRLReasonExtension) ext).getReason().toInt();
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/UpdateCRL.java b/pki/base/common/src/com/netscape/cms/servlet/cert/UpdateCRL.java
index 396f333bcc114d9698cac2f4807f8bfed0d68000..b10086e160f6113e0c6b6242f8e72d272e616074 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/UpdateCRL.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/UpdateCRL.java
@@ -51,6 +51,7 @@ import com.netscape.certsrv.ca.ICertificateAuthority;
 import com.netscape.certsrv.ldap.ELdapException;
 import com.netscape.certsrv.logging.AuditFormat;
 import com.netscape.certsrv.logging.ILogger;
+import com.netscape.certsrv.publish.ILdapRule;
 import com.netscape.certsrv.publish.IPublisherProcessor;
 import com.netscape.certsrv.util.IStatsSubsystem;
 import com.netscape.cms.servlet.base.CMSServlet;
@@ -74,7 +75,7 @@ public class UpdateCRL extends CMSServlet {
     private final static String INFO = "UpdateCRL";
     private final static String TPL_FILE = "updateCRL.template";
 
-    private static Vector mTesting = new Vector();
+    private static Vector<String> mTesting = new Vector<String>();
 
     private String mFormPath = null;
     private ICertificateAuthority mCA = null;
@@ -280,7 +281,7 @@ public class UpdateCRL extends CMSServlet {
         rarg.addStringValue("crlSizes", crlSizes);
 
         StringBuffer crlSplits = new StringBuffer();
-        Vector splits = crlIssuingPoint.getSplitTimes();
+        Vector<Long> splits = crlIssuingPoint.getSplitTimes();
         for (int i = 0; i < splits.size(); i++) {
             crlSplits.append(splits.elementAt(i));
             if (i + 1 < splits.size())
@@ -313,10 +314,10 @@ public class UpdateCRL extends CMSServlet {
         String results = req.getParameter("results");
 
         if (crlIssuingPointId != null) {
-            Enumeration ips = mCA.getCRLIssuingPoints();
+            Enumeration<ICRLIssuingPoint> ips = mCA.getCRLIssuingPoints();
 
             while (ips.hasMoreElements()) {
-                ICRLIssuingPoint ip = (ICRLIssuingPoint) ips.nextElement();
+                ICRLIssuingPoint ip =  ips.nextElement();
 
                 if (crlIssuingPointId.equals(ip.getId())) {
                     break;
@@ -448,7 +449,7 @@ public class UpdateCRL extends CMSServlet {
                         }
 
                         if (lpm != null && lpm.enabled()) {
-                            Enumeration rules = lpm.getRules(IPublisherProcessor.PROP_LOCAL_CRL);
+                            Enumeration<ILdapRule> rules = lpm.getRules(IPublisherProcessor.PROP_LOCAL_CRL);
                             if (rules != null && rules.hasMoreElements()) {
                                 if (publishError != null) {
                                     header.addStringValue("crlPublished", "Failure");
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/scep/CRSEnrollment.java b/pki/base/common/src/com/netscape/cms/servlet/cert/scep/CRSEnrollment.java
index 19714cbfaf52fbac4e8b2accc00a8df8188b9814..f181e1567133f4ed5403afd925a532305c4167d0 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/scep/CRSEnrollment.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/scep/CRSEnrollment.java
@@ -208,9 +208,10 @@ protected IProfileSubsystem     mProfileSubsystem = null;
 
   public CRSEnrollment(){}
 
-  public static Hashtable toHashtable(HttpServletRequest req) {
-       Hashtable httpReqHash = new Hashtable();
-       Enumeration names = req.getParameterNames();
+  public static Hashtable<String, String> toHashtable(HttpServletRequest req) {
+       Hashtable<String, String> httpReqHash = new Hashtable<String, String>();
+       @SuppressWarnings("unchecked")
+	Enumeration<String> names = req.getParameterNames();
        while (names.hasMoreElements()) {
                String name = (String)names.nextElement();
                httpReqHash.put(name, req.getParameter(name));
@@ -431,7 +432,7 @@ protected IProfileSubsystem     mProfileSubsystem = null;
         HttpServletRequest request)  throws EBaseException {
 
         // build credential
-        Enumeration authNames = authenticator.getValueNames();
+        Enumeration<String> authNames = authenticator.getValueNames();
 
         if (authNames != null) {
             while (authNames.hasMoreElements()) {
@@ -554,7 +555,7 @@ protected IProfileSubsystem     mProfileSubsystem = null;
   public String getPasswordFromP10(PKCS10 p10) 
   {
      PKCS10Attributes p10atts = p10.getAttributes();
-     Enumeration e = p10atts.getElements();
+     Enumeration<PKCS10Attribute> e = p10atts.getElements();
               
      try {
        while (e.hasMoreElements()) {
@@ -707,7 +708,7 @@ protected IProfileSubsystem     mProfileSubsystem = null;
 
           String pkcs10Attr = "";
               PKCS10Attributes p10atts = p10.getAttributes();
-              Enumeration e = p10atts.getElements();
+              Enumeration<PKCS10Attribute> e = p10atts.getElements();
               
               while (e.hasMoreElements()) {
                   PKCS10Attribute p10a = (PKCS10Attribute)e.nextElement();
@@ -724,9 +725,9 @@ protected IProfileSubsystem     mProfileSubsystem = null;
                   String extensionsStr = "";
                   if (attr.getName().equals(ExtensionsRequested.NAME)) {
 
-					Enumeration exts = ((ExtensionsRequested)attr).getExtensions().elements();
+					Enumeration<Extension> exts = ((ExtensionsRequested)attr).getExtensions().elements();
 					while (exts.hasMoreElements()) {
-						Extension ext = (Extension) exts.nextElement();
+						Extension ext =  exts.nextElement();
 
 						if (ext.getExtensionId().equals(
 							OIDMap.getOID(SubjectAlternativeNameExtension.IDENT)) ) {
@@ -736,14 +737,15 @@ protected IProfileSubsystem     mProfileSubsystem = null;
 									ext.getExtensionValue());
 
 								
-							Vector v = 
-                              (Vector) sane.get(SubjectAlternativeNameExtension. SUBJECT_NAME);
+							@SuppressWarnings("unchecked")
+							Vector<GeneralNameInterface> v = 
+                              (Vector<GeneralNameInterface>) sane.get(SubjectAlternativeNameExtension. SUBJECT_NAME);
 
-							Enumeration gne = v.elements();
+							Enumeration<GeneralNameInterface> gne = v.elements();
 
                             StringBuffer subjAltNameStr = new StringBuffer();
 							while (gne.hasMoreElements()) {
-								GeneralNameInterface gni = (GeneralNameInterface) gne.nextElement();
+								GeneralNameInterface gni =  gne.nextElement();
 								if (gni instanceof GeneralName) {
 									GeneralName genName = (GeneralName) gni;
 
@@ -1009,12 +1011,12 @@ protected IProfileSubsystem     mProfileSubsystem = null;
       IRequestQueue rq  = ca.getRequestQueue();
       IRequest foundRequest = null;
 
-      Enumeration rids    = rq.findRequestsBySourceId(txid);
+      Enumeration<RequestId> rids    = rq.findRequestsBySourceId(txid);
 	  if (rids == null) { return null; }
 
       int count=0;
       while (rids.hasMoreElements()) {
-			RequestId rid = (RequestId) rids.nextElement();
+			RequestId rid =  rids.nextElement();
 			if (rid == null) {
 				continue;
 			}
@@ -1194,12 +1196,11 @@ private void getDetailFromRequest(CRSPKIMessage req, CRSPKIMessage crsResp)
 
       IRequest issueReq = null;
       X509CertImpl issuedCert=null;
-      Vector extensionsRequested = null;
       SubjectAlternativeNameExtension sane = null;
       CertAttrSet requested_ext = null;
 
       try {
-             PKCS10 p10 = (PKCS10)req.getP10();
+             PKCS10 p10 = req.getP10();
 
              if (p10 == null) {
 			     crsResp.setFailInfo(CRSPKIMessage.mFailInfo_badMessageCheck);
@@ -1228,10 +1229,10 @@ private void getDetailFromRequest(CRSPKIMessage req, CRSPKIMessage crsResp)
               //   one RDN, with many AVA's    to
               //   many RDN's with one AVA in each.
 
-              Enumeration rdne     = p10subject.getRDNs();
-              Vector      rdnv = new Vector();
+              Enumeration<RDN> rdne     = p10subject.getRDNs();
+              Vector<RDN>      rdnv = new Vector<RDN>();
 
-			  Hashtable sanehash = new Hashtable();
+			  Hashtable<String, String> sanehash = new Hashtable<String, String>();
 
               X500NameAttrMap xnap = X500NameAttrMap.getDefault();
               while (rdne.hasMoreElements()) {
@@ -1271,7 +1272,7 @@ private void getDetailFromRequest(CRSPKIMessage req, CRSPKIMessage crsResp)
 
 
               PKCS10Attributes p10atts = p10.getAttributes();
-              Enumeration e = p10atts.getElements();
+              Enumeration<PKCS10Attribute> e = p10atts.getElements();
               
               while (e.hasMoreElements()) {
                   PKCS10Attribute p10a = (PKCS10Attribute)e.nextElement();
@@ -1290,9 +1291,9 @@ private void getDetailFromRequest(CRSPKIMessage req, CRSPKIMessage crsResp)
                   
                   if (attr.getName().equals(ExtensionsRequested.NAME)) {
 
-					Enumeration exts = ((ExtensionsRequested)attr).getExtensions().elements();
+					Enumeration<Extension> exts = ((ExtensionsRequested)attr).getExtensions().elements();
 					while (exts.hasMoreElements()) {
-						Extension ext = (Extension) exts.nextElement();
+						Extension ext = exts.nextElement();
 
 						if (ext.getExtensionId().equals(
 							OIDMap.getOID(KeyUsageExtension.IDENT)) ) {
@@ -1310,10 +1311,11 @@ private void getDetailFromRequest(CRSPKIMessage req, CRSPKIMessage crsResp)
 									ext.getExtensionValue());
 
 								
-							Vector v = 
-                              (Vector) sane.get(SubjectAlternativeNameExtension. SUBJECT_NAME);
+							@SuppressWarnings("unchecked")
+							Vector<GeneralNameInterface> v =
+									(Vector<GeneralNameInterface>) sane.get(SubjectAlternativeNameExtension. SUBJECT_NAME);
 
-							Enumeration gne = v.elements();
+							Enumeration<GeneralNameInterface> gne = v.elements();
 
 							while (gne.hasMoreElements()) {
 								GeneralNameInterface gni = (GeneralNameInterface) gne.nextElement();
@@ -1376,12 +1378,12 @@ private void getDetailFromRequest(CRSPKIMessage req, CRSPKIMessage crsResp)
               CertificateExtensions ext = new CertificateExtensions();
 
               if (kue != null) {
-                  ext.set(KeyUsageExtension.NAME, kue);
+                  ext.set(KeyUsageExtension.class.getSimpleName(), kue);
               }
 
               // add subjectAltName extension, if present
               if (sane != null) {
-                  ext.set(SubjectAlternativeNameExtension.NAME, sane);
+                  ext.set(SubjectAlternativeNameExtension.class.getSimpleName(), sane);
               }
 
               certInfo.set(X509CertInfo.EXTENSIONS,ext);
@@ -1395,7 +1397,7 @@ private void getDetailFromRequest(CRSPKIMessage req, CRSPKIMessage crsResp)
   }
                   
 
-  private SubjectAlternativeNameExtension makeDefaultSubjectAltName(Hashtable ht) {
+  private SubjectAlternativeNameExtension makeDefaultSubjectAltName(Hashtable<String, String> ht) {
 
     // if no subjectaltname extension was requested, we try to make it up
     // from some of the elements of the subject name
@@ -1404,7 +1406,7 @@ private void getDetailFromRequest(CRSPKIMessage req, CRSPKIMessage crsResp)
 	GeneralNameInterface[] gn = new GeneralNameInterface[ht.size()];
 
 	itemCount = 0;
-	Enumeration en = ht.keys();
+	Enumeration<String> en = ht.keys();
     while (en.hasMoreElements()) {
 		String key = (String) en.nextElement();
 		if (key.equals(SANE_DNSNAME)) {
@@ -1495,10 +1497,10 @@ private void getDetailFromRequest(CRSPKIMessage req, CRSPKIMessage crsResp)
          return authenticationFailed;
    }
 
-  private boolean areFingerprintsEqual(IRequest req, Hashtable fingerprints)
+  private boolean areFingerprintsEqual(IRequest req, Hashtable<String, byte[]> fingerprints)
   {
 	
-	Hashtable old_fprints = req.getExtDataInHashtable(IRequest.FINGERPRINTS);
+	Hashtable<String, Object> old_fprints = req.getExtDataInHashtable(IRequest.FINGERPRINTS);
 	if (old_fprints == null) { return false; }
 
     byte[] old_md5 = CMS.AtoB((String) old_fprints.get("MD5"));
@@ -1521,7 +1523,7 @@ private void getDetailFromRequest(CRSPKIMessage req, CRSPKIMessage crsResp)
 
 	try {
        unwrapPKCS10(req,cx);
-	   Hashtable fingerprints = makeFingerPrints(req);
+	   Hashtable<String, byte[]> fingerprints = makeFingerPrints(req);
 
        if (cmsRequest != null) {
 			if (areFingerprintsEqual(cmsRequest, fingerprints)) {
@@ -1614,7 +1616,7 @@ throws EBaseException {
 
      // use profile framework to handle SCEP
      if (mProfileId != null) {
-       PKCS10 pkcs10data = (PKCS10)req.getP10();
+       PKCS10 pkcs10data = req.getP10();
        String pkcs10blob = CMS.BtoA(pkcs10data.toByteArray());
 
        // XXX authentication handling
@@ -1726,10 +1728,10 @@ throws EBaseException {
 	 } catch (Exception pwex) {
 	 }
 
-     Hashtable fingerprints = (Hashtable)req.get(IRequest.FINGERPRINTS);
+     Hashtable<?, ?> fingerprints = (Hashtable<?, ?>)req.get(IRequest.FINGERPRINTS);
      if (fingerprints.size() > 0) {
-         Hashtable encodedPrints = new Hashtable(fingerprints.size());
-         Enumeration e = fingerprints.keys();
+         Hashtable<String, String> encodedPrints = new Hashtable<String, String>(fingerprints.size());
+         Enumeration<?> e = fingerprints.keys();
          while (e.hasMoreElements()) {
              String key = (String)e.nextElement();
              byte[] value = (byte[])fingerprints.get(key);
@@ -1761,8 +1763,8 @@ throws EBaseException {
 
 
 
-  public Hashtable makeFingerPrints(CRSPKIMessage req) {
-        Hashtable fingerprints = new Hashtable();
+  public Hashtable<String, byte[]> makeFingerPrints(CRSPKIMessage req) {
+        Hashtable<String, byte[]> fingerprints = new Hashtable<String, byte[]>();
 
         MessageDigest md;
         String[] hashes = new String[] {"MD2", "MD5", "SHA1", "SHA256", "SHA512"};
@@ -2020,7 +2022,7 @@ throws EBaseException {
     private CryptoToken keyStorageToken;
     private CryptoToken internalKeyStorageToken;
     private KeyGenerator DESkg;
-	private Enumeration externalTokens = null;
+	private Enumeration<?> externalTokens = null;
     private org.mozilla.jss.crypto.X509Certificate signingCert;
     private org.mozilla.jss.crypto.PrivateKey signingCertPrivKey;
 	private int signingCertKeySize = 0;
@@ -2118,11 +2120,11 @@ throws EBaseException {
         return internalToken;
     }
 
-    public void setExternalTokens( Enumeration tokens ) {
+    public void setExternalTokens( Enumeration<?> tokens ) {
         externalTokens = tokens;
     }
 
-    public Enumeration getExternalTokens() {
+    public Enumeration<?> getExternalTokens() {
         return externalTokens;
     }
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/scep/ChallengePassword.java b/pki/base/common/src/com/netscape/cms/servlet/cert/scep/ChallengePassword.java
index b449a8bd88a3d94704ed4bc77be27970d1b64edc..49a591f07092a06ad4c8872f68d4c0caab9b7570 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/scep/ChallengePassword.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/scep/ChallengePassword.java
@@ -23,7 +23,7 @@ import java.io.InputStream;
 import java.io.OutputStream;
 import java.security.cert.CertificateException;
 import java.util.Enumeration;
-import java.util.Hashtable;
+import java.util.Vector;
 
 import netscape.security.util.DerValue;
 import netscape.security.x509.CertAttrSet;
@@ -130,8 +130,8 @@ public class ChallengePassword implements CertAttrSet {
   /**
    * @return an empty set of elements
    */
-  public Enumeration getElements()
-    { return (new Hashtable()).elements();}
+  public Enumeration<String> getAttributeNames()
+    { return (new Vector<String>()).elements();}
 
   /**
    * @return the String "ChallengePassword"
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/scep/ExtensionsRequested.java b/pki/base/common/src/com/netscape/cms/servlet/cert/scep/ExtensionsRequested.java
index a8757e74f23ee758bf24a4e8cffd006003d325a5..6f689b341f93148cccf54a46d589dde2b37e2b6e 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/scep/ExtensionsRequested.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/scep/ExtensionsRequested.java
@@ -23,7 +23,6 @@ import java.io.InputStream;
 import java.io.OutputStream;
 import java.security.cert.CertificateException;
 import java.util.Enumeration;
-import java.util.Hashtable;
 import java.util.Vector;
 
 import netscape.security.util.DerInputStream;
@@ -43,7 +42,7 @@ public class ExtensionsRequested implements CertAttrSet {
     private String kue_digital_signature = "false";
     private String kue_key_encipherment  = "false";
     
-    private Vector exts = new Vector();
+    private Vector<Extension> exts = new Vector<Extension>();
 
     public ExtensionsRequested(Object stuff) throws IOException {
         ByteArrayInputStream is = new ByteArrayInputStream((byte[]) stuff);
@@ -91,8 +90,8 @@ public class ExtensionsRequested implements CertAttrSet {
     { 
     }
 
-    public Enumeration getElements()
-    { return (new Hashtable()).elements();}
+    public Enumeration<String> getAttributeNames()
+    { return (new Vector<String>()).elements();}
     
     public String getName()
     { return NAME;}
@@ -182,7 +181,7 @@ public class ExtensionsRequested implements CertAttrSet {
 
     }
 
-	public Vector getExtensions() {
+	public Vector<Extension> getExtensions() {
 		return exts;
 	}
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/common/CMCOutputTemplate.java b/pki/base/common/src/com/netscape/cms/servlet/common/CMCOutputTemplate.java
index 03cb83f63b5a841439e511e02cf3c8d235d21f58..3fac4a63719f1b12130729c6b341027b236c89ed 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/common/CMCOutputTemplate.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/common/CMCOutputTemplate.java
@@ -1032,7 +1032,7 @@ public class CMCOutputTemplate {
 
             SET dias = msgData.getDigestAlgorithmIdentifiers();
             int numDig = dias.size();
-            Hashtable digs = new Hashtable();
+            Hashtable<String, byte[]> digs = new Hashtable<String, byte[]>();
             for (int i=0; i<numDig; i++) {
                 AlgorithmIdentifier dai =
                   (AlgorithmIdentifier) dias.elementAt(i);
@@ -1050,7 +1050,7 @@ public class CMCOutputTemplate {
                 org.mozilla.jss.pkix.cms.SignerInfo si =
                   (org.mozilla.jss.pkix.cms.SignerInfo)sis.elementAt(i);
                 String name = si.getDigestAlgorithm().toString();
-                byte[] digest = (byte[]) digs.get(name);
+                byte[] digest = digs.get(name);
                 if (digest == null) {
                     MessageDigest md = MessageDigest.getInstance(name);
                     ByteArrayOutputStream ostream = new ByteArrayOutputStream();
diff --git a/pki/base/common/src/com/netscape/cms/servlet/connector/ConnectorServlet.java b/pki/base/common/src/com/netscape/cms/servlet/connector/ConnectorServlet.java
index ad48d18d9d5f0fd4c58d63924ac155d33a9831b2..67956bd8ac74938ac027532779f7d95fee738b1c 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/connector/ConnectorServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/connector/ConnectorServlet.java
@@ -836,10 +836,10 @@ public class ConnectorServlet extends CMSServlet {
                         int reason = 0;
 
                         if (crlExts != null) {
-                            Enumeration enum1 = crlExts.getElements();
+                            Enumeration<Extension> enum1 = crlExts.getElements();
 
                             while (enum1.hasMoreElements()) {
-                                Extension ext = (Extension) enum1.nextElement();
+                                Extension ext =  enum1.nextElement();
 
                                 if (ext instanceof CRLReasonExtension) {
                                     reason = ((CRLReasonExtension) ext).getReason().toInt();
diff --git a/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileSubmitServlet.java b/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileSubmitServlet.java
index 184a82b2e71a6150b763a013abd6fe89237777c0..3f663619725514c9f497cf877dcf0e69cbbd1002 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileSubmitServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileSubmitServlet.java
@@ -135,13 +135,13 @@ public class ProfileSubmitServlet extends ProfileServlet {
 
     private void setInputsIntoContext(HttpServletRequest request, IProfile profile, IProfileContext ctx) {
         // passing inputs into context
-        Enumeration inputIds = profile.getProfileInputIds();
+        Enumeration<String> inputIds = profile.getProfileInputIds();
 
         if (inputIds != null) {
             while (inputIds.hasMoreElements()) {
                 String inputId = (String) inputIds.nextElement();
                 IProfileInput profileInput = profile.getProfileInput(inputId);
-                Enumeration inputNames = profileInput.getValueNames();
+                Enumeration<String> inputNames = profileInput.getValueNames();
 
                 while (inputNames.hasMoreElements()) {
                     String inputName = (String) inputNames.nextElement();
@@ -166,13 +166,13 @@ public class ProfileSubmitServlet extends ProfileServlet {
      */
     private void setInputsIntoContext(IRequest request, IProfile profile, IProfileContext ctx, Locale locale) {
         // passing inputs into context
-        Enumeration inputIds = profile.getProfileInputIds();
+        Enumeration<String> inputIds = profile.getProfileInputIds();
 
         if (inputIds != null) {
             while (inputIds.hasMoreElements()) {
                 String inputId = (String) inputIds.nextElement();
                 IProfileInput profileInput = profile.getProfileInput(inputId);
-                Enumeration inputNames = profileInput.getValueNames();
+                Enumeration<String> inputNames = profileInput.getValueNames();
 
                 while (inputNames.hasMoreElements()) {
                     String inputName = (String) inputNames.nextElement();
@@ -199,7 +199,7 @@ public class ProfileSubmitServlet extends ProfileServlet {
 
 
     private void setCredentialsIntoContext(HttpServletRequest request, IProfileAuthenticator authenticator, IProfileContext ctx) {
-        Enumeration authIds = authenticator.getValueNames();
+        Enumeration<String> authIds = authenticator.getValueNames();
 
         if (authIds != null) {
             CMS.debug("ProfileSubmitServlet:setCredentialsIntoContext() authNames not null");
@@ -309,7 +309,7 @@ public class ProfileSubmitServlet extends ProfileServlet {
         AuthCredentials credentials = new AuthCredentials();
 
         // build credential
-        Enumeration authNames = authenticator.getValueNames();
+        Enumeration<String> authNames = authenticator.getValueNames();
 
         if (authNames != null) {
             while (authNames.hasMoreElements()) {
@@ -335,13 +335,13 @@ public class ProfileSubmitServlet extends ProfileServlet {
     }
 
     private void setInputsIntoRequest(HttpServletRequest request, IProfile profile, IRequest req) {
-        Enumeration inputIds = profile.getProfileInputIds();
+        Enumeration<String> inputIds = profile.getProfileInputIds();
 
         if (inputIds != null) {
             while (inputIds.hasMoreElements()) {
                 String inputId = (String) inputIds.nextElement();
                 IProfileInput profileInput = profile.getProfileInput(inputId);
-                Enumeration inputNames = profileInput.getValueNames();
+                Enumeration<String> inputNames = profileInput.getValueNames();
 
                 if (inputNames != null) {
                     while (inputNames.hasMoreElements()) {
@@ -368,13 +368,13 @@ public class ProfileSubmitServlet extends ProfileServlet {
      */
     private void setInputsIntoRequest(IRequest request, IProfile profile, IRequest req, Locale locale) {
         // passing inputs into request
-        Enumeration inputIds = profile.getProfileInputIds();
+        Enumeration<String> inputIds = profile.getProfileInputIds();
 
         if (inputIds != null) {
             while (inputIds.hasMoreElements()) {
                 String inputId = (String) inputIds.nextElement();
                 IProfileInput profileInput = profile.getProfileInput(inputId);
-                Enumeration inputNames = profileInput.getValueNames();
+                Enumeration<String> inputNames = profileInput.getValueNames();
 
                 while (inputNames.hasMoreElements()) {
                     String inputName = (String) inputNames.nextElement();
@@ -399,14 +399,14 @@ public class ProfileSubmitServlet extends ProfileServlet {
     }
 
     private void setOutputIntoArgs(IProfile profile, ArgList outputlist, Locale locale, IRequest req) {
-        Enumeration outputIds = profile.getProfileOutputIds();
+        Enumeration<String> outputIds = profile.getProfileOutputIds();
 
         if (outputIds != null) {
             while (outputIds.hasMoreElements()) {
                 String outputId = (String) outputIds.nextElement();
                 IProfileOutput profileOutput = profile.getProfileOutput(outputId);
 
-                Enumeration outputNames = profileOutput.getValueNames();
+                Enumeration<String> outputNames = profileOutput.getValueNames();
 
                 if (outputNames != null) {
                     while (outputNames.hasMoreElements()) {
@@ -487,10 +487,11 @@ public class ProfileSubmitServlet extends ProfileServlet {
 
         if (CMS.debugOn()) {
             CMS.debug("Start of ProfileSubmitServlet Input Parameters");
-            Enumeration paramNames = request.getParameterNames();
+            @SuppressWarnings("unchecked")
+			Enumeration<String> paramNames = request.getParameterNames();
 
             while (paramNames.hasMoreElements()) {
-                String paramName = (String) paramNames.nextElement();
+                String paramName = paramNames.nextElement();
                 // added this facility so that password can be hidden,
                 // all sensitive parameters should be prefixed with 
                 // __ (double underscores); however, in the event that
@@ -749,7 +750,7 @@ public class ProfileSubmitServlet extends ProfileServlet {
                             if (origReq != null) {
                                 CMS.debug("ProfileSubmitServlet: renewal: found original enrollment request id:"+ rid);
                                 // debug: print the extData keys
-                                Enumeration en = origReq.getExtDataKeys();
+                                Enumeration<String> en = origReq.getExtDataKeys();
 /*
                                 CMS.debug("ProfileSubmitServlet: renewal: origRequest extdata key print BEGINS");
                                 while (en.hasMoreElements()) {
@@ -970,11 +971,11 @@ public class ProfileSubmitServlet extends ProfileServlet {
             CMS.debug("ProfileSubmitServlet: authentication required.");
             String uid_cred = "Unidentified";
             String uid_attempted_cred = "Unidentified";
-            Enumeration authIds = authenticator.getValueNames();
+            Enumeration<String> authIds = authenticator.getValueNames();
             //Attempt to possibly fetch attemped uid, may not always be available.
             if (authIds != null) {
                 while (authIds.hasMoreElements()) {
-                    String authName = (String) authIds.nextElement();
+                    String authName =  authIds.nextElement();
                     String value = request.getParameter(authName); 
                     if (value != null) {
                           if (authName.equals("uid")) {
@@ -1153,9 +1154,9 @@ public class ProfileSubmitServlet extends ProfileServlet {
 
             // serial auth token into request
             if (authToken != null) {
-                Enumeration tokenNames = authToken.getElements();
+                Enumeration<String> tokenNames = authToken.getElements();
                 while (tokenNames.hasMoreElements()) {
-                    String tokenName = (String) tokenNames.nextElement();
+                    String tokenName =  tokenNames.nextElement();
                     String[] tokenVals = authToken.getInStringArray(tokenName);
                     if (tokenVals != null) {
                         for (int i = 0; i < tokenVals.length; i++) {
@@ -1281,9 +1282,9 @@ public class ProfileSubmitServlet extends ProfileServlet {
                     // print request debug
                     if (reqs[k] != null) {
                       requestIds += "  "+reqs[k].getRequestId().toString();
-                      Enumeration reqKeys = reqs[k].getExtDataKeys();
+                      Enumeration<String> reqKeys = reqs[k].getExtDataKeys();
                       while (reqKeys.hasMoreElements()) {
-                        String reqKey = (String)reqKeys.nextElement();
+                        String reqKey = reqKeys.nextElement();
                         String reqVal = reqs[k].getExtDataInString(reqKey);
                         if (reqVal != null) {
                            CMS.debug("ProfileSubmitServlet: key=$request." + reqKey + "$ value=" + reqVal);
@@ -1486,15 +1487,15 @@ public class ProfileSubmitServlet extends ProfileServlet {
                 } else {
                   CMS.debug("ProfileSubmitServlet xmlOutput: no certInfo found in request");
                 }
-                Enumeration outputIds = profile.getProfileOutputIds();
+                Enumeration<String> outputIds = profile.getProfileOutputIds();
                 if (outputIds != null) {
                     while (outputIds.hasMoreElements()) {
-                        String outputId = (String) outputIds.nextElement();
+                        String outputId = outputIds.nextElement();
                         IProfileOutput profileOutput = profile.getProfileOutput(outputId);
-                        Enumeration outputNames = profileOutput.getValueNames();
+                        Enumeration<String> outputNames = profileOutput.getValueNames();
                         if (outputNames != null) {
                             while (outputNames.hasMoreElements()) {
-                                String outputName = (String) outputNames.nextElement();
+                                String outputName = outputNames.nextElement();
                                 if (!outputName.equals("b64_cert") && !outputName.equals("pkcs7"))
                                     continue;
                                 try {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/request/CertReqParser.java b/pki/base/common/src/com/netscape/cms/servlet/request/CertReqParser.java
index 60a8d16d5c4179ae4abb2a1c6ab8717a8ed52f00..6a9ccac5814ab31b73128d65b88b1ddc347d0898 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/request/CertReqParser.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/request/CertReqParser.java
@@ -135,7 +135,7 @@ public class CertReqParser extends ReqParser {
         arg.addStringValue("certExtsEnabled", "yes");
 
         int saCounter = 0;
-        Enumeration enum1 = req.getExtDataKeys();
+        Enumeration<String> enum1 = req.getExtDataKeys();
 
         // gross hack
         String prefix = "record."; 
@@ -144,12 +144,12 @@ public class CertReqParser extends ReqParser {
             prefix = "header.";
 
         while (enum1.hasMoreElements()) {
-            String name = (String) enum1.nextElement();
+            String name =  enum1.nextElement();
 
             if (mDetails) {
                 // show all http parameters stored in request.
                 if (name.equalsIgnoreCase(IRequest.HTTP_PARAMS)) {
-                    Hashtable http_params = req.getExtDataInHashtable(name);
+                    Hashtable<String, ?> http_params = req.getExtDataInHashtable(name);
                     // show certType specially 
                     String certType = (String) http_params.get(IRequest.CERT_TYPE);
 
@@ -163,13 +163,13 @@ public class CertReqParser extends ReqParser {
                     }
                     // show all http parameters in request
                     int counter = 0;
-                    Enumeration elms = http_params.keys();
+                    Enumeration<String> elms = http_params.keys();
 
                     while (elms.hasMoreElements()) {
                         String parami = 
                             IRequest.HTTP_PARAMS + LB + String.valueOf(counter++) + RB;
                         // hack
-                        String n = (String) elms.nextElement();
+                        String n =  elms.nextElement();
                         String rawJS = "new Object;\n\r" +
                             prefix + parami + ".name=\"" +
                             CMSTemplate.escapeJavaScriptString(n) + "\";\n\r" +
@@ -181,15 +181,15 @@ public class CertReqParser extends ReqParser {
                     }
                 } // show all http headers stored in request.
                 else if (name.equalsIgnoreCase(IRequest.HTTP_HEADERS)) {
-                    Hashtable http_hdrs = req.getExtDataInHashtable(name);
-                    Enumeration elms = http_hdrs.keys();
+                    Hashtable<String, Object> http_hdrs = req.getExtDataInHashtable(name);
+                    Enumeration<String> elms = http_hdrs.keys();
                     int counter = 0;
 
                     while (elms.hasMoreElements()) {
                         String parami = 
                             IRequest.HTTP_HEADERS + LB + String.valueOf(counter++) + RB;
                         // hack
-                        String n = (String) elms.nextElement();
+                        String n =  elms.nextElement();
                         String rawJS = "new Object;\n\r" +
                             prefix + parami + ".name=\"" +
                             CMSTemplate.escapeJavaScriptString(n) + "\";\n\r" +
@@ -202,14 +202,14 @@ public class CertReqParser extends ReqParser {
                 } // show all auth token stored in request.
                 else if (name.equalsIgnoreCase(IRequest.AUTH_TOKEN)) {
                     IAuthToken auth_token = req.getExtDataInAuthToken(name);
-                    Enumeration elms = auth_token.getElements();
+                    Enumeration<String> elms = auth_token.getElements();
                     int counter = 0;
 
                     while (elms.hasMoreElements()) {
                         String parami = 
                             IRequest.AUTH_TOKEN + LB + String.valueOf(counter++) + RB;
                         // hack
-                        String n = (String) elms.nextElement();
+                        String n =  elms.nextElement();
                         Object authTokenValue = auth_token.getInStringArray(n);
                         if (authTokenValue == null) {
                             authTokenValue = auth_token.getInString(n);
@@ -283,7 +283,7 @@ public class CertReqParser extends ReqParser {
             }
 
             if (name.equalsIgnoreCase(IRequest.ERRORS)) {
-                Vector errorStrings = req.getExtDataInStringVector(name);
+                Vector<String> errorStrings = req.getExtDataInStringVector(name);
                 if (errorStrings != null) {
                     StringBuffer errInfo = new StringBuffer();
 
@@ -355,10 +355,10 @@ public class CertReqParser extends ReqParser {
                         } catch (Exception e) {
                         }
                         if (extensions != null) {
-                            Enumeration exts = extensions.getElements();
+                            Enumeration<Extension> exts = extensions.getAttributes();
 
                             while (exts.hasMoreElements()) {
-                                Extension ext = (Extension) exts.nextElement();
+                                Extension ext = exts.nextElement();
 
                                 // only know about ns cert type
                                 if (ext instanceof NSCertTypeExtension) {
@@ -535,16 +535,16 @@ public class CertReqParser extends ReqParser {
                 }
             }
             if (name.equalsIgnoreCase(IRequest.FINGERPRINTS) && mDetails) {
-                Hashtable fingerprints = 
+                Hashtable<String, Object> fingerprints =  
                     req.getExtDataInHashtable(IRequest.FINGERPRINTS);
 
                 if (fingerprints != null) {
                     String namesAndHashes = null;
-                    Enumeration enumFingerprints = fingerprints.keys();
+                    Enumeration<String> enumFingerprints = fingerprints.keys();
 
                     while (enumFingerprints.hasMoreElements()) { 
-                        String hashname = (String) enumFingerprints.nextElement();
-                        String hashvalue = (String) fingerprints.get(hashname);
+                        String hashname = enumFingerprints.nextElement();
+                        String hashvalue =  (String) fingerprints.get(hashname);
                         byte[] fingerprint = CMS.AtoB(hashvalue);
                         String ppFingerprint = pp.toHexString(fingerprint, 0);
 
@@ -577,7 +577,8 @@ public class CertReqParser extends ReqParser {
                 int j = 0;
 
                 StringBuffer sb = new StringBuffer();
-                for (Enumeration n = ((Vector) v).elements(); n.hasMoreElements(); j++) {
+                for (@SuppressWarnings("unchecked")
+				Enumeration<String> n = ((Vector<String>)v).elements(); n.hasMoreElements(); j++) {
                     sb.append(";\n");
                     sb.append(valuename);
                     sb.append(LB);
@@ -687,7 +688,7 @@ public class CertReqParser extends ReqParser {
         }
 
         int saCounter = 0;
-        Enumeration enum1 = req.getExtDataKeys();
+        Enumeration<String> enum1 = req.getExtDataKeys();
 
         // gross hack
         String prefix = "record."; 
@@ -701,7 +702,7 @@ public class CertReqParser extends ReqParser {
             if (mDetails) {
                 // show all http parameters stored in request.
                 if (name.equalsIgnoreCase(IRequest.HTTP_PARAMS)) {
-                    Hashtable http_params = req.getExtDataInHashtable(name);
+                    Hashtable<String, Object> http_params = req.getExtDataInHashtable(name);
                     // show certType specially 
                     String certType = (String) http_params.get(IRequest.CERT_TYPE);
 
@@ -710,7 +711,7 @@ public class CertReqParser extends ReqParser {
                     }
                     // show all http parameters in request
                     int counter = 0;
-                    Enumeration elms = http_params.keys();
+                    Enumeration<String> elms = http_params.keys();
 
                     while (elms.hasMoreElements()) {
                         String parami = 
@@ -728,8 +729,8 @@ public class CertReqParser extends ReqParser {
                     }
                 } // show all http headers stored in request.
                 else if (name.equalsIgnoreCase(IRequest.HTTP_HEADERS)) {
-                    Hashtable http_hdrs = req.getExtDataInHashtable(name);
-                    Enumeration elms = http_hdrs.keys();
+                    Hashtable<String, ?> http_hdrs = req.getExtDataInHashtable(name);
+                    Enumeration<String> elms = http_hdrs.keys();
                     int counter = 0;
 
                     while (elms.hasMoreElements()) {
@@ -749,7 +750,7 @@ public class CertReqParser extends ReqParser {
                 } // show all auth token stored in request.
                 else if (name.equalsIgnoreCase(IRequest.AUTH_TOKEN)) {
                     IAuthToken auth_token = req.getExtDataInAuthToken(name);
-                    Enumeration elms = auth_token.getElements();
+                    Enumeration<String> elms = auth_token.getElements();
                     int counter = 0;
 
                     while (elms.hasMoreElements()) {
@@ -811,7 +812,7 @@ public class CertReqParser extends ReqParser {
             }
 
             if (name.equalsIgnoreCase(IRequest.ERRORS)) {
-                Vector errorsVector = req.getExtDataInStringVector(name);
+                Vector<String> errorsVector = req.getExtDataInStringVector(name);
                 if (errorsVector != null) {
                     StringBuffer errInfo = new StringBuffer();
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/request/ProcessCertReq.java b/pki/base/common/src/com/netscape/cms/servlet/request/ProcessCertReq.java
index 76418a9984b044e1b2942976526a20fc8bf8af8b..d19c7714e8fabc1af4dbd51c786deb52699b82d0 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/request/ProcessCertReq.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/request/ProcessCertReq.java
@@ -635,7 +635,7 @@ public class ProcessCertReq extends CMSServlet {
                             String addExts = req.getParameter("addExts");
 
                             if (addExts != null && !addExts.trim().equals("")) {
-                                Vector extsToBeAdded = new Vector();
+                                Vector<Extension> extsToBeAdded = new Vector<Extension>();
 
                                 byte[] b = (byte[]) (com.netscape.osutil.OSUtil.AtoB(addExts));
 
@@ -672,7 +672,7 @@ public class ProcessCertReq extends CMSServlet {
                                     NSCertTypeExtension nsExtensions = 
                                         (NSCertTypeExtension)
                                         extensions.get(
-                                            NSCertTypeExtension.NAME);
+                                            NSCertTypeExtension.class.getSimpleName());
 
                                     if (nsExtensions != null) {
                                         updateNSExtension(req, nsExtensions);
@@ -689,7 +689,7 @@ public class ProcessCertReq extends CMSServlet {
                                         BasicConstraintsExtension bcExt = 
                                             (BasicConstraintsExtension)
                                             extensions.get(
-                                                BasicConstraintsExtension.NAME);
+                                                BasicConstraintsExtension.class.getSimpleName());
 
                                         if (bcExt != null) {
                                             Integer bcPathLen = (Integer) bcExt.get(BasicConstraintsExtension.PATH_LEN);
@@ -701,8 +701,8 @@ public class ProcessCertReq extends CMSServlet {
                                                 BasicConstraintsExtension bcExt0 =
                                                     new BasicConstraintsExtension(isCA.booleanValue(), pathLen);
 
-                                                extensions.delete(BasicConstraintsExtension.NAME);
-                                                extensions.set(BasicConstraintsExtension.NAME, (Extension) bcExt0);
+                                                extensions.delete(BasicConstraintsExtension.class.getSimpleName());
+                                                extensions.set(BasicConstraintsExtension.class.getSimpleName(), (Extension) bcExt0);
                                                 alterationCounter++;
                                             }
                                         }
@@ -774,14 +774,15 @@ public class ProcessCertReq extends CMSServlet {
                                 }
 
                                 if (mExtraAgentParams) {
-                                    Enumeration extraparams = req.getParameterNames();
+                                    @SuppressWarnings("unchecked")
+									Enumeration<String> extraparams = req.getParameterNames();
                                     int l = IRequest.AGENT_PARAMS.length() + 1;
                                     int ap_counter = 0;
-                                    Hashtable agentparamsargblock = new Hashtable();
+                                    Hashtable<String, String> agentparamsargblock = new Hashtable<String, String>();
 
                                     if (extraparams != null) {
                                         while (extraparams.hasMoreElements()) {
-                                            String s = (String) extraparams.nextElement();
+                                            String s = extraparams.nextElement();
 
                                             if (s.startsWith(IRequest.AGENT_PARAMS)) {
                                                 String param_value = req.getParameter(s);
diff --git a/pki/base/common/src/com/netscape/cmscore/apps/CMSEngine.java b/pki/base/common/src/com/netscape/cmscore/apps/CMSEngine.java
index e812cf10a5a6056af7dad81b06c9141bbcef81e9..44934ed8e989f3a1e51a2c7de2e9a1c2516c0cc8 100644
--- a/pki/base/common/src/com/netscape/cmscore/apps/CMSEngine.java
+++ b/pki/base/common/src/com/netscape/cmscore/apps/CMSEngine.java
@@ -119,6 +119,7 @@ import com.netscape.certsrv.ra.IRegistrationAuthority;
 import com.netscape.certsrv.request.IRequest;
 import com.netscape.certsrv.request.IRequestQueue;
 import com.netscape.certsrv.request.RequestStatus;
+import com.netscape.cms.servlet.common.CMSRequest;
 import com.netscape.cms.servlet.csadmin.LDAPSecurityDomainSessionTable;
 import com.netscape.cms.servlet.csadmin.SecurityDomainSessionTable;
 import com.netscape.cms.servlet.csadmin.SessionTimer;
@@ -408,7 +409,7 @@ public class CMSEngine implements ICMSEngine {
         }
 
         ACL acl = null;
-        Vector rights = null;
+        Vector<String> rights = null;
         int idx1 = resACLs.indexOf(":");
 
         if (idx1 <= 0) {
@@ -446,7 +447,7 @@ public class CMSEngine implements ICMSEngine {
             }
 
             if (rightsString != null) {
-                rights = new Vector();
+                rights = new Vector<String>();
                 StringTokenizer rtok = new StringTokenizer(rightsString, ",");
 
                 while (rtok.hasMoreTokens()) {
@@ -645,11 +646,11 @@ public class CMSEngine implements ICMSEngine {
         return new ArgBlock();
     }
 
-    public IArgBlock createArgBlock(Hashtable httpReq) {
+    public IArgBlock createArgBlock(Hashtable<String, String> httpReq) {
         return new ArgBlock(httpReq);
     }
 
-    public IArgBlock createArgBlock(String realm, Hashtable httpReq) {
+    public IArgBlock createArgBlock(String realm, Hashtable<String, String> httpReq) {
         return new ArgBlock(realm, httpReq);
     }
 
@@ -827,11 +828,11 @@ public class CMSEngine implements ICMSEngine {
         return new HttpRequestEncoder();
     }
 
-    public Enumeration getSubsystemNames() {
+    public Enumeration<String> getSubsystemNames() {
         return mSSReg.keys();
     }
 
-    public Enumeration getSubsystems() {
+    public Enumeration<ISubsystem> getSubsystems() {
         return mSSReg.elements();
     }
 
@@ -859,7 +860,7 @@ public class CMSEngine implements ICMSEngine {
         IConfigStore ssconfig = mConfig.getSubStore(PROP_SUBSYSTEM);
 
         // count number of dyn loaded subsystems. 
-        Enumeration ssnames = ssconfig.getSubStoreNames();
+        Enumeration<String> ssnames = ssconfig.getSubStoreNames();
         int nsubsystems = 0;
 
         for (nsubsystems = 0; ssnames.hasMoreElements(); nsubsystems++)
@@ -1310,12 +1311,12 @@ public class CMSEngine implements ICMSEngine {
     }
 
     public  void getSubjAltNameConfigDefaultParams(String name,
-        Vector params) {
+        Vector<String> params) {
         GeneralNameUtil.SubjAltNameGN.getDefaultParams(name, params);
     }
 
     public  void getSubjAltNameConfigExtendedPluginInfo(String name,
-        Vector params) {
+        Vector<String> params) {
         GeneralNameUtil.SubjAltNameGN.getExtendedPluginInfo(name, params);
     }
 
@@ -1333,22 +1334,22 @@ public class CMSEngine implements ICMSEngine {
     }
 
     public  void getGeneralNameConfigDefaultParams(String name,
-        boolean isValueConfigured, Vector params) {
+        boolean isValueConfigured, Vector<String> params) {
         GeneralNameUtil.GeneralNameConfig.getDefaultParams(name, isValueConfigured, params);
     }
 
     public  void getGeneralNamesConfigDefaultParams(String name,
-        boolean isValueConfigured, Vector params) {
+        boolean isValueConfigured, Vector<String> params) {
         GeneralNameUtil.GeneralNamesConfig.getDefaultParams(name, isValueConfigured, params);
     }
 
     public  void getGeneralNameConfigExtendedPluginInfo(String name,
-        boolean isValueConfigured, Vector info) {
+        boolean isValueConfigured, Vector<String> info) {
         GeneralNameUtil.GeneralNameConfig.getExtendedPluginInfo(name, isValueConfigured, info);
     }
 
     public  void getGeneralNamesConfigExtendedPluginInfo(String name,
-        boolean isValueConfigured, Vector info) {
+        boolean isValueConfigured, Vector<String> info) {
         GeneralNameUtil.GeneralNamesConfig.getExtendedPluginInfo(name, isValueConfigured, info);
     }
 
@@ -1514,7 +1515,7 @@ public class CMSEngine implements ICMSEngine {
     }
 
     public void terminateRequests() {
-        java.util.Enumeration e = CommandQueue.mCommandQueue.keys();
+        Enumeration<CMSRequest> e = CommandQueue.mCommandQueue.keys();
         
         while (e.hasMoreElements()) {
             Object thisRequest = e.nextElement();
@@ -1833,10 +1834,10 @@ public class CMSEngine implements ICMSEngine {
                         RequestStatus status = checkRevReq.getRequestStatus();
 
                         if (status == RequestStatus.COMPLETE) {
-                            Enumeration enum1 = checkRevReq.getExtDataKeys();
+                            Enumeration<String> enum1 = checkRevReq.getExtDataKeys();
 
                             while (enum1.hasMoreElements()) {
-                                String name = (String) enum1.nextElement();
+                                String name = enum1.nextElement();
 
                                 if (name.equals(IRequest.REVOKED_CERTS)) {
                                     revoked = true;
@@ -1914,7 +1915,7 @@ class WarningListener implements ILogEventListener {
      * and from  source "source". If the parameter is omitted. All entries
      * are sent back.
      */
-    public synchronized NameValuePairs retrieveLogContent(Hashtable req) throws ServletException,
+    public synchronized NameValuePairs retrieveLogContent(Hashtable<String, String>  req) throws ServletException,
             IOException, EBaseException {
         return null;
     }
@@ -1922,7 +1923,7 @@ class WarningListener implements ILogEventListener {
     /**
      * Retrieve log file list.
      */
-    public synchronized NameValuePairs retrieveLogList(Hashtable req) throws ServletException,
+    public synchronized NameValuePairs retrieveLogList(Hashtable<String, String>  req) throws ServletException,
             IOException, EBaseException {
         return null;
     }
@@ -1935,14 +1936,14 @@ class WarningListener implements ILogEventListener {
         return "ConsoleLog";
     }
 
-    public Vector getDefaultParams() {
-        Vector v = new Vector();
+    public Vector<String> getDefaultParams() {
+        Vector<String> v = new Vector<String>();
 
         return v;
     }
 
-    public Vector getInstanceParams() {
-        Vector v = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> v = new Vector<String>();
 
         return v;
     }
diff --git a/pki/base/common/src/com/netscape/cmscore/cert/CertUtils.java b/pki/base/common/src/com/netscape/cmscore/cert/CertUtils.java
index 5a49d06e80f584b65af92fc5aa07040fef228ed7..97db7921701dcf16cc19c9bc07902d16436e50a8 100644
--- a/pki/base/common/src/com/netscape/cmscore/cert/CertUtils.java
+++ b/pki/base/common/src/com/netscape/cmscore/cert/CertUtils.java
@@ -473,7 +473,7 @@ public class CertUtils {
 
             if (extns != null) {
                 NSCertTypeExtension nsExtn = (NSCertTypeExtension)
-                    extns.get(NSCertTypeExtension.NAME);
+                    extns.get(NSCertTypeExtension.class.getSimpleName());
 
                 if (nsExtn != null) {
                     String nsType = getNSExtensionInfo(nsExtn);
diff --git a/pki/base/common/src/com/netscape/cmscore/cert/CrlCachePrettyPrint.java b/pki/base/common/src/com/netscape/cmscore/cert/CrlCachePrettyPrint.java
index 232035250e637356f0da96157ea4fae59db8765f..5c3c80012b012f1f49c2ebc6a144855390e124f4 100644
--- a/pki/base/common/src/com/netscape/cmscore/cert/CrlCachePrettyPrint.java
+++ b/pki/base/common/src/com/netscape/cmscore/cert/CrlCachePrettyPrint.java
@@ -27,7 +27,7 @@ import java.util.TimeZone;
 
 import netscape.security.x509.CRLExtensions;
 import netscape.security.x509.Extension;
-import netscape.security.x509.RevokedCertImpl;
+import netscape.security.x509.RevokedCertificate;
 
 import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.base.ICRLPrettyPrint;
@@ -183,14 +183,14 @@ public class CrlCachePrettyPrint implements ICRLPrettyPrint
                 }
                 sb.append("\n");
 
-                Set revokedCerts = mIP.getRevokedCertificates((int)(pageStart-1), (int)upperLimit);
+                Set<RevokedCertificate> revokedCerts = mIP.getRevokedCertificates((int)(pageStart-1), (int)upperLimit);
 
                 if (revokedCerts != null) {
-                    Iterator i = revokedCerts.iterator();
+                    Iterator<RevokedCertificate> i = revokedCerts.iterator();
                     long l = 1;
 
                     while ((i.hasNext()) && ((crlSize == 0) || (upperLimit - pageStart + 1 >= l))) {
-                        RevokedCertImpl revokedCert = (RevokedCertImpl)i.next();
+                        RevokedCertificate revokedCert = i.next();
 
                         if ((crlSize == 0) || (upperLimit - pageStart + 1 >= l)) {
                             sb.append(pp.indent(16) + resource.getString(
diff --git a/pki/base/common/src/com/netscape/cmscore/cert/OidLoaderSubsystem.java b/pki/base/common/src/com/netscape/cmscore/cert/OidLoaderSubsystem.java
index b340ea2368096ef085aff1c8696a338ab41adde0..9353ae8ff0d130dd3f1c39d23c5ee96b7323bd0e 100644
--- a/pki/base/common/src/com/netscape/cmscore/cert/OidLoaderSubsystem.java
+++ b/pki/base/common/src/com/netscape/cmscore/cert/OidLoaderSubsystem.java
@@ -89,28 +89,28 @@ public class OidLoaderSubsystem implements ISubsystem {
     private static final String[][] oidMapEntries = new String[][] {
             {NSCertTypeExtension.class.getName(),
                 CertType_Id.toString(),
-                NSCertTypeExtension.NAME},
+                NSCertTypeExtension.class.getSimpleName()},
             {CertificateRenewalWindowExtension.class.getName(),
                 CertificateRenewalWindowExtension.ID.toString(),
-                CertificateRenewalWindowExtension.NAME},
+                CertificateRenewalWindowExtension.class.getSimpleName()},
             {CertificateScopeOfUseExtension.class.getName(),
                 CertificateScopeOfUseExtension.ID.toString(),
                 CertificateScopeOfUseExtension.NAME},
             {DeltaCRLIndicatorExtension.class.getName(),
                 DeltaCRLIndicatorExtension.OID,
-                DeltaCRLIndicatorExtension.NAME},
+                DeltaCRLIndicatorExtension.class.getSimpleName()},
             {HoldInstructionExtension.class.getName(),
                 HoldInstructionExtension.OID,
-                HoldInstructionExtension.NAME},
+                HoldInstructionExtension.class.getSimpleName()},
             {InvalidityDateExtension.class.getName(),
                 InvalidityDateExtension.OID,
-                InvalidityDateExtension.NAME},
+                InvalidityDateExtension.class.getSimpleName()},
             {IssuingDistributionPointExtension.class.getName(),
                 IssuingDistributionPointExtension.OID,
-                IssuingDistributionPointExtension.NAME},
+                IssuingDistributionPointExtension.class.getSimpleName()},
             {FreshestCRLExtension.class.getName(),
                 FreshestCRLExtension.OID,
-                FreshestCRLExtension.NAME},
+                FreshestCRLExtension.class.getSimpleName()},
         };
 
     /**
@@ -137,7 +137,7 @@ public class OidLoaderSubsystem implements ISubsystem {
         }
         mConfig = config;
 
-        Enumeration names = mConfig.getSubStoreNames();
+        Enumeration<String> names = mConfig.getSubStoreNames();
 
         // load static (build-in) extensions
 
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/RevocationInfoMapper.java b/pki/base/common/src/com/netscape/cmscore/dbs/RevocationInfoMapper.java
index fc0eb3866737463cdbe39b91b7ff6a9b9d18539d..c0949f6663e288e859b5cd3012c600979ca8a342 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/RevocationInfoMapper.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/RevocationInfoMapper.java
@@ -48,7 +48,7 @@ import com.netscape.cmscore.util.Debug;
  */
 public class RevocationInfoMapper implements IDBAttrMapper {
 
-    protected static Vector mNames = new Vector();
+    protected static Vector<String> mNames = new Vector<String>();
     static {
         mNames.addElement(CertDBSchema.LDAP_ATTR_REVO_INFO);
     }
@@ -59,7 +59,7 @@ public class RevocationInfoMapper implements IDBAttrMapper {
     public RevocationInfoMapper() {
     }
 
-    public Enumeration getSupportedLDAPAttributeNames() {
+    public Enumeration<String> getSupportedLDAPAttributeNames() {
         return mNames.elements();
     }
 
@@ -76,10 +76,10 @@ public class RevocationInfoMapper implements IDBAttrMapper {
             CRLExtensions exts = info.getCRLEntryExtensions();
             // CRLExtension's DER encoding and decoding does not work!
             // That is why we need to do our own serialization.
-            Enumeration e = exts.getElements();
+            Enumeration<Extension> e = exts.getElements();
 
             while (e.hasMoreElements()) {
-                Extension ext = (Extension) e.nextElement();
+                Extension ext = e.nextElement();
 
                 if (ext instanceof CRLReasonExtension) {
                     RevocationReason reason = 
@@ -143,14 +143,14 @@ public class RevocationInfoMapper implements IDBAttrMapper {
                                 Integer.parseInt(reasonStr));
                         CRLReasonExtension ext = new CRLReasonExtension(reason);
 
-                        exts.set(CRLReasonExtension.NAME, ext);
+                        exts.set(CRLReasonExtension.class.getSimpleName(), ext);
                     } else if (str.startsWith("InvalidityDateExtension=")) {
                         String invalidityDateStr = str.substring(24);
                         Date invalidityDate = DateMapper.dateFromDB(invalidityDateStr);
                         InvalidityDateExtension ext =
                             new InvalidityDateExtension(invalidityDate);
 
-                        exts.set(InvalidityDateExtension.NAME, ext);
+                        exts.set(InvalidityDateExtension.class.getSimpleName(), ext);
                     } else {
                         Debug.trace("XXX skipped extension");
                     }
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/X509CertImplMapper.java b/pki/base/common/src/com/netscape/cmscore/dbs/X509CertImplMapper.java
index e1aa144b91923ff86d3d4b3d6a431758ae9a1ab5..9acf05f2014f8746a518a9d5c5b544d5a879362f 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/X509CertImplMapper.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/X509CertImplMapper.java
@@ -56,8 +56,8 @@ public class X509CertImplMapper implements IDBAttrMapper {
     public X509CertImplMapper() {
     }
 
-    public Enumeration getSupportedLDAPAttributeNames() {
-        Vector v = new Vector();
+    public Enumeration<String> getSupportedLDAPAttributeNames() {
+        Vector<String> v = new Vector<String>();
 
         v.addElement(CertDBSchema.LDAP_ATTR_NOT_BEFORE);
         v.addElement(CertDBSchema.LDAP_ATTR_NOT_AFTER);
@@ -92,11 +92,11 @@ public class X509CertImplMapper implements IDBAttrMapper {
                     cert.getSubjectDN().getName()));
             attrs.add(new LDAPAttribute(CertDBSchema.LDAP_ATTR_PUBLIC_KEY_DATA, cert.getPublicKey().getEncoded()));
             // make extension searchable
-            Set nonCritSet = cert.getNonCriticalExtensionOIDs();
+            Set<String> nonCritSet = cert.getNonCriticalExtensionOIDs();
 
             if (nonCritSet != null) {
-                for (Iterator i = nonCritSet.iterator(); i.hasNext();) {
-                    String oid = (String) i.next();
+                for (Iterator<String> i = nonCritSet.iterator(); i.hasNext();) {
+                    String oid = i.next();
 
                     if (oid.equals("2.16.840.1.113730.1.1")) {
                         String extVal = getCertTypeExtensionInfo(cert);
@@ -115,11 +115,11 @@ public class X509CertImplMapper implements IDBAttrMapper {
                             CertDBSchema.LDAP_ATTR_EXTENSION, oid));
                 }
             }
-            Set critSet = cert.getCriticalExtensionOIDs();
+            Set<String> critSet = cert.getCriticalExtensionOIDs();
 
             if (critSet != null) {
-                for (Iterator i = critSet.iterator(); i.hasNext();) {
-                    String oid = (String) i.next();
+                for (Iterator<String> i = critSet.iterator(); i.hasNext();) {
+                    String oid =  i.next();
 
                     if (oid.equals("2.16.840.1.113730.1.1")) {
                         String extVal = getCertTypeExtensionInfo(cert);
@@ -172,7 +172,7 @@ public class X509CertImplMapper implements IDBAttrMapper {
             if (ext == null) {
                 // sometime time (during installation) it
                 // is named differently
-                ext = cert.getExtension(NSCertTypeExtension.NAME);
+                ext = cert.getExtension(NSCertTypeExtension.class.getSimpleName());
                 if (ext == null)
                     return null;
             }
@@ -218,7 +218,7 @@ public class X509CertImplMapper implements IDBAttrMapper {
             if (ext == null) {
                 // sometime time (during installation) it
                 // is named differently
-                ext = cert.getExtension(BasicConstraintsExtension.NAME);
+                ext = cert.getExtension(BasicConstraintsExtension.class.getSimpleName());
                 if (ext == null)
                     return null;
             }
diff --git a/pki/base/common/src/com/netscape/cmscore/extensions/CMSExtensionsMap.java b/pki/base/common/src/com/netscape/cmscore/extensions/CMSExtensionsMap.java
index a5eb391d886d4212816f301bcb485199e1192f0a..b0fe0432c310173a080c579e974b0dc790eb8905 100644
--- a/pki/base/common/src/com/netscape/cmscore/extensions/CMSExtensionsMap.java
+++ b/pki/base/common/src/com/netscape/cmscore/extensions/CMSExtensionsMap.java
@@ -49,8 +49,8 @@ public class CMSExtensionsMap implements ISubsystem {
 
     private static final String PROP_CLASS = "class";
 
-    private Hashtable mName2Ext = new Hashtable();
-    private Hashtable mOID2Ext = new Hashtable();
+    private Hashtable<String, ICMSExtension> mName2Ext = new Hashtable<String, ICMSExtension>();
+    private Hashtable<String, ICMSExtension> mOID2Ext = new Hashtable<String, ICMSExtension>();
     private ISubsystem mOwner = null;
     private IConfigStore mConfig = null;
 
@@ -63,7 +63,7 @@ public class CMSExtensionsMap implements ISubsystem {
         mOwner = owner;
         mConfig = config;
 
-        Enumeration sstores = mConfig.getSubStoreNames();
+        Enumeration<String> sstores = mConfig.getSubStoreNames();
 
         while (sstores.hasMoreElements()) {
             String name = (String) sstores.nextElement();
diff --git a/pki/base/common/src/com/netscape/cmscore/notification/ReqCertSANameEmailResolver.java b/pki/base/common/src/com/netscape/cmscore/notification/ReqCertSANameEmailResolver.java
index b592ea168fa21928c90f8db96b13aebbf104a78c..580c9e98875f35b079d9be7cc7ee27f0237ac39f 100644
--- a/pki/base/common/src/com/netscape/cmscore/notification/ReqCertSANameEmailResolver.java
+++ b/pki/base/common/src/com/netscape/cmscore/notification/ReqCertSANameEmailResolver.java
@@ -25,7 +25,6 @@ import java.security.cert.X509Certificate;
 import java.util.Enumeration;
 
 import netscape.security.x509.CertificateExtensions;
-import netscape.security.x509.GeneralName;
 import netscape.security.x509.GeneralNameInterface;
 import netscape.security.x509.GeneralNames;
 import netscape.security.x509.RevokedCertImpl;
@@ -172,7 +171,7 @@ public class ReqCertSANameEmailResolver implements IEmailResolver {
                     try {
                         ext = 
                                 (SubjectAlternativeNameExtension)
-                                exts.get(SubjectAlternativeNameExtension.NAME);
+                                exts.get(SubjectAlternativeNameExtension.class.getSimpleName());
                     } catch (IOException e) {
                         log(ILogger.LL_FAILURE,
                             CMS.getLogMessage("CMSCORE_NOTIFY_GET_EXT", e.toString()));
@@ -187,19 +186,16 @@ public class ReqCertSANameEmailResolver implements IEmailResolver {
                             GeneralNames gn =
                                 (GeneralNames) ext.get(SubjectAlternativeNameExtension.SUBJECT_NAME);
 
-                            Enumeration e = gn.elements();
+                            Enumeration<GeneralNameInterface> e = gn.elements();
 
                             while (e.hasMoreElements()) {
-                                Object g = (Object) e.nextElement();
-
-                                GeneralName gni =
-                                    (GeneralName) g;
+                                GeneralNameInterface gni =e.nextElement();
 
                                 if (gni.getType() ==
                                     GeneralNameInterface.NAME_RFC822) {
                                     CMS.debug("got an subjectalternatename email");
 
-                                    String nameString = g.toString();
+                                    String nameString = gni.toString();
 
                                     // "RFC822Name: " + name
                                     mEmail =
diff --git a/pki/base/common/src/com/netscape/cmscore/request/ARequestQueue.java b/pki/base/common/src/com/netscape/cmscore/request/ARequestQueue.java
index 2da14467ecb746b7f3cd17d7c2947b6ed7a1896f..47418664d2938adc7a6b7ee30dc58007addeceae 100644
--- a/pki/base/common/src/com/netscape/cmscore/request/ARequestQueue.java
+++ b/pki/base/common/src/com/netscape/cmscore/request/ARequestQueue.java
@@ -31,6 +31,7 @@ import java.util.Enumeration;
 import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.Locale;
+import java.util.Map;
 import java.util.Set;
 import java.util.Vector;
 
@@ -178,7 +179,7 @@ public abstract class ARequestQueue
      * @return
      *    an Enumeration that generates RequestId objects.
      */
-    abstract protected Enumeration getRawList();
+    abstract protected Enumeration<RequestId> getRawList();
 
     /**
      * protected access for setting the current state of a request.
@@ -429,7 +430,7 @@ public abstract class ARequestQueue
         if (agentName == null) throw new EBaseException("Missing agent information");
 
         aas.addApproval(agentName);
-        r.setExtData(AgentApprovals.class.getName(), aas.toStringVector());
+        r.setExtData(AgentApprovals.class.getName(), (Vector<?>)aas.toStringVector());
 
         PolicyResult pr = mPolicy.apply(r);
 
@@ -830,7 +831,7 @@ class Request
      * this isn't that efficient but will do for now.
      */
     public void copyContents(IRequest req) {
-        Enumeration e = req.getExtDataKeys();
+        Enumeration<String> e = req.getExtDataKeys();
         while (e.hasMoreElements()) {
             String key = (String) e.nextElement();
             if (!key.equals(IRequest.ISSUED_CERTS) &&
@@ -858,18 +859,20 @@ class Request
                (! key.equals(""));
     }
 
-    protected boolean isValidExtDataHashtableValue(Hashtable hash) {
+    protected boolean isValidExtDataHashtableValue(Hashtable<String, Object> hash) {
         if (hash == null) {
             return false;
         }
-        Enumeration keys = hash.keys();
+        Enumeration<String> keys = hash.keys();
         while (keys.hasMoreElements()) {
             Object key = keys.nextElement();
             if (! ((key instanceof String) &&
                     isValidExtDataKey((String)key)) ) {
                 return false;
             }
-
+            /*
+             * 	TODO  should the Value type be String?
+             */
             Object value = hash.get(key);
             if (! (value instanceof String)) {
                 return false;
@@ -891,12 +894,13 @@ class Request
         return true;
     }
 
-    public boolean setExtData(String key, Hashtable value) {
-        if ( !(isValidExtDataKey(key) && isValidExtDataHashtableValue(value)) ) {
+    @SuppressWarnings("unchecked")
+	public boolean setExtData(String key, Hashtable<String, ?> value) {
+        if ( !(isValidExtDataKey(key) && isValidExtDataHashtableValue((Hashtable<String, Object>) value)) ) {
             return false;
         }
 
-        mExtData.put(key, new ExtDataHashtable(value));
+        mExtData.put(key, new ExtDataHashtable<Object>(value));
         return true;
     }
 
@@ -915,7 +919,8 @@ class Request
         return (String)value;
     }
 
-    public Hashtable getExtDataInHashtable(String key) {
+    @SuppressWarnings("unchecked")
+	public <V> Hashtable<String, V> getExtDataInHashtable(String key) {
         Object value = mExtData.get(key);
         if (value == null) {
             return null;
@@ -923,10 +928,10 @@ class Request
         if (! (value instanceof Hashtable)) {
             return null;
         }
-        return new ExtDataHashtable((Hashtable)value);
+        return new ExtDataHashtable<V>((Map<? extends String, ? extends V>)value);
     }
 
-    public Enumeration getExtDataKeys() {
+    public Enumeration<String> getExtDataKeys() {
         return mExtData.keys();
     }
 
@@ -945,9 +950,10 @@ class Request
             return false;
         }
 
-        Hashtable existingValue = (Hashtable)mExtData.get(key);
+        @SuppressWarnings("unchecked")
+		Hashtable<String, String> existingValue = (Hashtable<String, String>)mExtData.get(key);
         if (existingValue == null) {
-            existingValue = new ExtDataHashtable();
+            existingValue = new ExtDataHashtable<String>();
             mExtData.put(key, existingValue);
         }
         existingValue.put(subkey, value);
@@ -955,7 +961,7 @@ class Request
     }
 
     public String getExtDataInString(String key, String subkey) {
-        Hashtable value = getExtDataInHashtable(key);
+        Hashtable<String, Object> value = getExtDataInHashtable(key);
         if (value == null) {
             return null;
         }
@@ -1217,7 +1223,7 @@ class Request
         return certArray;
     }
 
-    public boolean setExtData(String key, Vector stringVector) {
+    public boolean setExtData(String key, Vector<?> stringVector) {
         String[] stringArray;
         if (stringVector == null) {
             return false;
@@ -1230,12 +1236,12 @@ class Request
         return setExtData(key, stringArray);
     }
 
-    public Vector getExtDataInStringVector(String key) {
+    public Vector<String> getExtDataInStringVector(String key) {
         String[] stringArray = getExtDataInStringArray(key);
         if (stringArray == null) {
             return null;
         }
-        return new Vector(Arrays.asList(stringArray));
+        return new Vector<String>(Arrays.asList(stringArray));
     }
 
     public boolean getExtDataInBoolean(String key, boolean defVal) {
@@ -1256,8 +1262,8 @@ class Request
         if (data == null) {
             return false;
         }
-        Hashtable hash = new Hashtable();
-        Enumeration keys = data.getElements();
+        Hashtable<String, String> hash = new Hashtable<String, String>();
+        Enumeration<String> keys = data.getElements();
         while (keys.hasMoreElements()) {
             try {
                 String authKey = (String) keys.nextElement();
@@ -1270,12 +1276,12 @@ class Request
     }
 
     public IAuthToken getExtDataInAuthToken(String key) {
-        Hashtable hash = getExtDataInHashtable(key);
+        Hashtable<String, Object> hash = getExtDataInHashtable(key);
         if (hash == null) {
             return null;
         }
         AuthToken authToken = new AuthToken(null);
-        Enumeration keys = hash.keys();
+        Enumeration<String> keys = hash.keys();
         while (keys.hasMoreElements()) {
             try {
                 String hashKey = (String) keys.nextElement();
@@ -1351,7 +1357,7 @@ class Request
         if (values == null) {
             return false;
         }
-        Hashtable hashValue = new Hashtable();
+        Hashtable<String, String> hashValue = new Hashtable<String, String>();
         for (int index = 0; index < values.length; index++) {
             hashValue.put(Integer.toString(index), values[index]);
         }
@@ -1361,7 +1367,7 @@ class Request
     public String[] getExtDataInStringArray(String key) {
         int index;
 
-        Hashtable hashValue = getExtDataInHashtable(key);
+        Hashtable<String, Object> hashValue = getExtDataInHashtable(key);
         if (hashValue == null) {
             String s = getExtDataInString(key);
             if (s == null) {
@@ -1371,10 +1377,10 @@ class Request
                 return sa;
             }
         }
-        Set arrayKeys = hashValue.keySet();
-        Vector listValue = new Vector(arrayKeys.size());
-        for (Iterator iter = arrayKeys.iterator(); iter.hasNext();) {
-            String arrayKey = (String)iter.next();
+        Set<String> arrayKeys = hashValue.keySet();
+        Vector<Object> listValue = new Vector<Object>(arrayKeys.size());
+        for (Iterator<String> iter = arrayKeys.iterator(); iter.hasNext();) {
+            String arrayKey = iter.next();
             try {
                 index = Integer.parseInt(arrayKey);
             } catch (NumberFormatException e) {
@@ -1406,7 +1412,7 @@ class Request
     protected String mOwner;
     protected String mRequestType;
     protected String mContext; // string for now.
-    protected ExtDataHashtable mExtData = new ExtDataHashtable();
+    protected ExtDataHashtable<Object> mExtData = new ExtDataHashtable<Object>();
 
     Date mCreationTime = CMS.getCurrentDate();
     Date mModificationTime = CMS.getCurrentDate();
@@ -1439,7 +1445,7 @@ class RequestIAttrSetWrapper implements IAttrSet {
         mRequest.deleteExtData(name);
     }
 
-    public Enumeration getElements() {
+    public Enumeration<String> getElements() {
         return mRequest.getExtDataKeys();
     }
 }
@@ -1471,7 +1477,7 @@ class RequestListByStatus
         return null;
     }
 
-    public Object nextElement() {
+    public RequestId nextElement() {
         RequestId next = mNext;
 
         update();
@@ -1487,7 +1493,7 @@ class RequestListByStatus
         return next;
     }
 
-    public RequestListByStatus(Enumeration e, RequestStatus s, IRequestQueue q) {
+    public RequestListByStatus(Enumeration<RequestId> e, RequestStatus s, IRequestQueue q) {
         mEnumeration = e;
         mStatus = s;
         mQueue = q;
@@ -1503,7 +1509,7 @@ class RequestListByStatus
         while (mNext == null) {
             if (!mEnumeration.hasMoreElements()) break;
    
-            rId = (RequestId) mEnumeration.nextElement();
+            rId =  mEnumeration.nextElement();
 
             try {
                 IRequest r = mQueue.findRequest(rId);
@@ -1518,7 +1524,7 @@ class RequestListByStatus
 
     protected RequestStatus mStatus;
     protected IRequestQueue mQueue;
-    protected Enumeration mEnumeration; 
+    protected Enumeration<RequestId> mEnumeration; 
     protected RequestId mNext;
 }
 
@@ -1529,7 +1535,7 @@ class RequestList
         return mEnumeration.hasMoreElements();
     }
 
-    public Object nextElement() {
+    public RequestId nextElement() {
         return mEnumeration.nextElement();
     }
 
@@ -1545,11 +1551,11 @@ class RequestList
         return null;
     }
 
-    public RequestList(Enumeration e) {
+    public RequestList(Enumeration<RequestId> e) {
         mEnumeration = e;
     }
 
-    protected Enumeration mEnumeration; 
+    protected Enumeration<RequestId> mEnumeration; 
 }
 
 
diff --git a/pki/base/common/src/com/netscape/cmscore/request/ExtDataHashtable.java b/pki/base/common/src/com/netscape/cmscore/request/ExtDataHashtable.java
index 415908dc315281319999bfaac6f53e4c54c81282..e3c1908e71bf07a3e2d5b33a0ec5640ab7b328a6 100644
--- a/pki/base/common/src/com/netscape/cmscore/request/ExtDataHashtable.java
+++ b/pki/base/common/src/com/netscape/cmscore/request/ExtDataHashtable.java
@@ -10,7 +10,7 @@ import java.util.Set;
  * purpose is to hide the fact that LDAP doesn't preserve the case of keys.
  * It does this by lowercasing all keys used to access the Hashtable.
  */
-public class ExtDataHashtable extends Hashtable {
+public class ExtDataHashtable<V> extends Hashtable<String, V> {
 
     /**
      *
@@ -29,7 +29,7 @@ public class ExtDataHashtable extends Hashtable {
         super(i, v);
     }
 
-    public ExtDataHashtable(Map map) {
+    public ExtDataHashtable(Map<? extends String, ? extends V> map) {
         // the super constructor seems to call putAll, but I can't
         // rely on that behaviour
         super();
@@ -44,7 +44,7 @@ public class ExtDataHashtable extends Hashtable {
         return super.containsKey(o);
     }
 
-    public Object get(Object o) {
+    public V get(Object o) {
         if (o instanceof String) {
             String key = (String)o;
             return super.get(key.toLowerCase());
@@ -52,7 +52,7 @@ public class ExtDataHashtable extends Hashtable {
         return super.get(o);
     }
 
-    public Object put(Object oKey, Object val) {
+    public V put(String oKey, V val) {
         if (oKey instanceof String) {
             String key = (String)oKey;
             return super.put(key.toLowerCase(), val);
@@ -60,16 +60,16 @@ public class ExtDataHashtable extends Hashtable {
         return super.put(oKey, val);
     }
 
-    public void putAll(Map map) {
-        Set keys = map.keySet();
-        for (Iterator i = keys.iterator();
+    public void putAll(Map<? extends String, ? extends V> map) {
+        Set<? extends String> keys = map.keySet();
+        for (Iterator<? extends String> i = keys.iterator();
              i.hasNext();) {
             Object key = i.next();
-            put(key, map.get(key));
+            put((String)key, map.get(key));
         }
     }
 
-    public Object remove(Object o) {
+    public V remove(Object o) {
         if (o instanceof String) {
             String key = (String)o;
             return super.remove(key.toLowerCase());
diff --git a/pki/base/common/src/com/netscape/cmscore/security/CertificateInfo.java b/pki/base/common/src/com/netscape/cmscore/security/CertificateInfo.java
index dc240dac2aeeaf2e922c62910527d7fab2d05a69..1b0c9f2fc3b3249c0f793c201375d0c1b6c4634c 100644
--- a/pki/base/common/src/com/netscape/cmscore/security/CertificateInfo.java
+++ b/pki/base/common/src/com/netscape/cmscore/security/CertificateInfo.java
@@ -262,7 +262,7 @@ public abstract class CertificateInfo {
 
         try {
             subjKeyExt =
-                    (SubjectKeyIdentifierExtension) caexts.get(SubjectKeyIdentifierExtension.NAME);
+                    (SubjectKeyIdentifierExtension) caexts.get(SubjectKeyIdentifierExtension.class.getSimpleName());
         } catch (IOException e) {
         }
 
@@ -274,7 +274,7 @@ public abstract class CertificateInfo {
             AuthorityKeyIdentifierExtension authExt =
                 new AuthorityKeyIdentifierExtension(false, keyId, null, null);
 
-            ext.set(AuthorityKeyIdentifierExtension.NAME, authExt);
+            ext.set(AuthorityKeyIdentifierExtension.class.getSimpleName(), authExt);
         }
     }
 }
diff --git a/pki/base/common/src/com/netscape/cmscore/security/JssSubsystem.java b/pki/base/common/src/com/netscape/cmscore/security/JssSubsystem.java
index d0df7d1a9514d15b4d105b55135d3ad0dfab0814..372b966bec400a585c1ce1066fca147152c2df94 100644
--- a/pki/base/common/src/com/netscape/cmscore/security/JssSubsystem.java
+++ b/pki/base/common/src/com/netscape/cmscore/security/JssSubsystem.java
@@ -128,8 +128,8 @@ public final class JssSubsystem implements ICryptoSubsystem {
     protected PasswordCallback mPWCB = null;
 
     private static JssSubsystem mInstance = new JssSubsystem();
-    private Hashtable mNicknameMapCertsTable = new Hashtable();
-    private Hashtable mNicknameMapUserCertsTable = new Hashtable();
+    private Hashtable<String, X509Certificate[]> mNicknameMapCertsTable = new Hashtable<String, X509Certificate[]>();
+    private Hashtable<String, X509Certificate[]> mNicknameMapUserCertsTable = new Hashtable<String, X509Certificate[]>();
 
 	private FileInputStream devRandomInputStream=null;
 
@@ -145,7 +145,7 @@ public final class JssSubsystem implements ICryptoSubsystem {
     private static final String PROP_SSL_CIPHERPREF = Constants.PR_CIPHER_PREF;
     private static final String PROP_SSL_ECTYPE = Constants.PR_ECTYPE;
 
-    private static Hashtable mCipherNames = new Hashtable();
+    private static Hashtable<String, Integer> mCipherNames = new Hashtable<String, Integer>();
 
     /* default sslv2 and sslv3 cipher suites(all), set if no prefs in config.*/
     private static final String DEFAULT_CIPHERPREF = 
@@ -518,12 +518,13 @@ public final class JssSubsystem implements ICryptoSubsystem {
 
     public String getTokenList() throws EBaseException {
         String tokenList = "";
-        Enumeration tokens = mCryptoManager.getExternalTokens();
+        @SuppressWarnings("unchecked")
+		Enumeration<CryptoToken> tokens = mCryptoManager.getExternalTokens();
         int num = 0;
 
         try {
             while (tokens.hasMoreElements()) {
-                CryptoToken c = (CryptoToken) tokens.nextElement();
+                CryptoToken c =  tokens.nextElement();
 
                 // skip builtin object token
                 if (c.getName() != null && c.getName().equals("Builtin Object Token")) {
@@ -607,10 +608,11 @@ public final class JssSubsystem implements ICryptoSubsystem {
         String certNames = "";
 
         try {
-            Enumeration enums = mCryptoManager.getAllTokens();
+            @SuppressWarnings("unchecked")
+			Enumeration<CryptoToken> enums = mCryptoManager.getAllTokens();
 
             while (enums.hasMoreElements()) {
-                CryptoToken token = (CryptoToken) enums.nextElement();
+                CryptoToken token = enums.nextElement();
                 CryptoStore store = token.getCryptoStore();
                 X509Certificate[] list = store.getCertificates();
 
@@ -1159,12 +1161,13 @@ CMS.debug("*** removing this interna cert");
     public NameValuePairs getRootCerts() throws EBaseException {
         NameValuePairs nvps = new NameValuePairs();
         try {
-            Enumeration enums = mCryptoManager.getAllTokens();
+            @SuppressWarnings("unchecked")
+			Enumeration<CryptoToken> enums = mCryptoManager.getAllTokens();
             if (mNicknameMapCertsTable != null)
                 mNicknameMapCertsTable.clear();
 
             // a temp hashtable with vectors
-            Hashtable vecTable = new Hashtable();
+            Hashtable<String, Vector<X509Certificate>> vecTable = new Hashtable<String, Vector<X509Certificate>>();
 
             while (enums.hasMoreElements()) {
                 CryptoToken token = (CryptoToken) enums.nextElement();
@@ -1187,11 +1190,11 @@ CMS.debug("*** removing this interna cert");
                         X509CertImpl impl = null;
 
                         try {
-                            Vector v;
+                            Vector<X509Certificate> v;
                             if (vecTable.containsKey((Object) nickname) == true) {
-                                v = (Vector) vecTable.get(nickname);
+                                v =  vecTable.get(nickname);
                             } else {
-                                v = new Vector();
+                                v = new Vector<X509Certificate>();
                             }
                             v.addElement(list[i]);
                             vecTable.put(nickname, v);
@@ -1212,11 +1215,11 @@ CMS.debug("*** removing this interna cert");
                     }
                 }   
                 // convert hashtable of vectors to hashtable of arrays
-                Enumeration elms = vecTable.keys();
+                Enumeration<String> elms = vecTable.keys();
 
                 while (elms.hasMoreElements()) {
                     String key = (String) elms.nextElement();
-                    Vector v = (Vector) vecTable.get((Object) key);
+                    Vector<X509Certificate> v =  vecTable.get((Object) key);
                     X509Certificate[] a = new X509Certificate[v.size()];
 
                     v.copyInto((Object[]) a);
@@ -1235,7 +1238,8 @@ CMS.debug("*** removing this interna cert");
     public NameValuePairs getUserCerts() throws EBaseException {
         NameValuePairs nvps = new NameValuePairs();
         try {
-            Enumeration enums = mCryptoManager.getAllTokens();
+            @SuppressWarnings("unchecked")
+			Enumeration<CryptoToken> enums = mCryptoManager.getAllTokens();
 
             while (enums.hasMoreElements()) {
                 CryptoToken token = (CryptoToken) enums.nextElement();
@@ -1301,7 +1305,8 @@ CMS.debug("*** removing this interna cert");
             mNicknameMapUserCertsTable.clear();
 
         try {
-            Enumeration enums = mCryptoManager.getAllTokens();
+            @SuppressWarnings("unchecked")
+			Enumeration<CryptoToken> enums = mCryptoManager.getAllTokens();
 
             while (enums.hasMoreElements()) {
                 CryptoToken token = (CryptoToken) enums.nextElement();
@@ -1382,36 +1387,36 @@ CMS.debug("*** removing this interna cert");
         }
 
             // a temp hashtable with vectors
-        Hashtable vecTable = new Hashtable();
+        Hashtable<String, Vector<X509Certificate>> vecTable = new Hashtable<String, Vector<X509Certificate>>();
 
         for (int i = 0; i < certs.length; i++) {
             String nickname = certs[i].getNickname();
 
             /* build a table of our own */
-            Vector v;
+            Vector<X509Certificate> v;
 
             if (vecTable.containsKey((Object) nickname) == true) {
-                v = (Vector) vecTable.get(nickname);
+                v =  vecTable.get(nickname);
             } else {
-                v = new Vector();
+                v = new Vector<X509Certificate>();
             }
             v.addElement(certs[i]);
             vecTable.put(nickname, v);
         }
 
         // convert hashtable of vectors to hashtable of arrays
-        Enumeration elms = vecTable.keys();
+        Enumeration<String> elms = vecTable.keys();
 
         while (elms.hasMoreElements()) {
             String key = (String) elms.nextElement();
-            Vector v = (Vector) vecTable.get((Object) key);
+            Vector<X509Certificate> v =  vecTable.get((Object) key);
             X509Certificate[] a = new X509Certificate[v.size()];
 
             v.copyInto((Object[]) a);
             mNicknameMapCertsTable.put(key, a);
         }
 
-        Enumeration keys = mNicknameMapCertsTable.keys(); 
+        Enumeration<String> keys = mNicknameMapCertsTable.keys(); 
 
         while (keys.hasMoreElements()) {
             String nickname = (String) keys.nextElement();
@@ -1719,9 +1724,6 @@ CMS.debug("*** removing this interna cert");
         } catch (IOException e) { 
             log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_SECURITY_DELETE_CERT", e.toString()));
             throw new EBaseException(CMS.getUserMessage("CMS_BASE_CERT_ERROR", e.toString()));
-        } catch (CertificateException e) {
-            log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_SECURITY_DELETE_CERT", e.toString()));
-            throw new EBaseException(CMS.getUserMessage("CMS_BASE_CERT_ERROR", e.toString()));
         }
     }
 
@@ -2121,7 +2123,7 @@ CMS.debug("*** removing this interna cert");
                 else {
                     try {
                         BasicConstraintsExtension ext = (BasicConstraintsExtension)
-                            exts.get(BasicConstraintsExtension.NAME);
+                            exts.get(BasicConstraintsExtension.class.getSimpleName());
 
                         if (ext == null)
                             return false;
diff --git a/pki/base/common/src/com/netscape/cmscore/security/KeyCertUtil.java b/pki/base/common/src/com/netscape/cmscore/security/KeyCertUtil.java
index 589d5a68c0fc70338e9c1ea5d599e70b056b100a..c020fe8bde29aed633b4659ab51d4ba7823c8021 100644
--- a/pki/base/common/src/com/netscape/cmscore/security/KeyCertUtil.java
+++ b/pki/base/common/src/com/netscape/cmscore/security/KeyCertUtil.java
@@ -158,7 +158,8 @@ public class KeyCertUtil {
     public static String getTokenNames(CryptoManager manager) 
         throws TokenException {
         String tokenList = "";
-        Enumeration tokens = manager.getExternalTokens();
+        @SuppressWarnings("unchecked")
+		Enumeration<CryptoToken> tokens = manager.getExternalTokens();
         int num = 0;
 
         while (tokens.hasMoreElements()) {
@@ -852,7 +853,7 @@ public class KeyCertUtil {
         BasicConstraintsExtension basic = new BasicConstraintsExtension(
                 bool, len);
 
-        ext.set(BasicConstraintsExtension.NAME, basic);
+        ext.set(BasicConstraintsExtension.class.getSimpleName(), basic);
     }
 
     public static void setExtendedKeyUsageExtension(
@@ -903,7 +904,7 @@ public class KeyCertUtil {
         }
 
         if (anyExt)
-            ext.set(ExtendedKeyUsageExtension.NAME, ns);
+            ext.set(ExtendedKeyUsageExtension.class.getSimpleName(), ns);
     }
 
     public static void setNetscapeCertificateExtension(
@@ -962,7 +963,7 @@ public class KeyCertUtil {
             anyExt = true;
         }
         if (anyExt)
-            ext.set(NSCertTypeExtension.NAME, ns);
+            ext.set(NSCertTypeExtension.class.getSimpleName(), ns);
     }
 
     public static void setOCSPNoCheck(KeyPair keypair, 
@@ -974,7 +975,7 @@ public class KeyCertUtil {
             OCSPNoCheckExtension noCheckExt = 
                 new OCSPNoCheckExtension();
 
-            ext.set(OCSPNoCheckExtension.NAME, noCheckExt);
+            ext.set(OCSPNoCheckExtension.class.getSimpleName(), noCheckExt);
         }
     }
 
@@ -984,13 +985,13 @@ public class KeyCertUtil {
         String signing = properties.getOCSPSigning();
 
         if ((signing != null) && (signing.equals(Constants.TRUE))) { 
-            Vector oidSet = new Vector(); 
+            Vector<ObjectIdentifier> oidSet = new Vector<ObjectIdentifier>(); 
             oidSet.addElement(
               ObjectIdentifier.getObjectIdentifier(
                 ExtendedKeyUsageExtension.OID_OCSPSigning));
             ExtendedKeyUsageExtension ocspExt = 
                 new ExtendedKeyUsageExtension(false, oidSet);
-            ext.set(ExtendedKeyUsageExtension.NAME, ocspExt);
+            ext.set(ExtendedKeyUsageExtension.class.getSimpleName(), ocspExt);
         }
     }
 
@@ -1009,7 +1010,7 @@ public class KeyCertUtil {
                 aiaExt.addAccessDescription(AuthInfoAccessExtension.METHOD_OCSP, ocspName);
             }
 
-            ext.set(AuthInfoAccessExtension.NAME, aiaExt);
+            ext.set(AuthInfoAccessExtension.class.getSimpleName(), aiaExt);
         }
     }
 
@@ -1023,7 +1024,7 @@ public class KeyCertUtil {
             AuthorityKeyIdentifierExtension akiExt = 
                 new AuthorityKeyIdentifierExtension(id, null, null);
 
-            ext.set(AuthorityKeyIdentifierExtension.NAME, akiExt);
+            ext.set(AuthorityKeyIdentifierExtension.class.getSimpleName(), akiExt);
         }
     }
 
@@ -1038,13 +1039,13 @@ public class KeyCertUtil {
             SubjectKeyIdentifierExtension skiExt =
                 new SubjectKeyIdentifierExtension(id.getIdentifier());
 
-            ext.set(SubjectKeyIdentifierExtension.NAME, skiExt);
+            ext.set(SubjectKeyIdentifierExtension.class.getSimpleName(), skiExt);
         }
     }
 
     public static void setKeyUsageExtension(CertificateExtensions ext,
         KeyUsageExtension keyUsage) throws IOException {
-        ext.set(KeyUsageExtension.NAME, keyUsage);
+        ext.set(KeyUsageExtension.class.getSimpleName(), keyUsage);
     }
 
     public static KeyIdentifier createKeyIdentifier(KeyPair keypair) 
diff --git a/pki/base/common/test/com/netscape/certsrv/app/CMSEngineDefaultStub.java b/pki/base/common/test/com/netscape/certsrv/app/CMSEngineDefaultStub.java
index ac5fe2247488885913f0713ea5f0133ed47b4077..c01ec33e8cff407dbb30a418319067daf825082b 100644
--- a/pki/base/common/test/com/netscape/certsrv/app/CMSEngineDefaultStub.java
+++ b/pki/base/common/test/com/netscape/certsrv/app/CMSEngineDefaultStub.java
@@ -126,11 +126,11 @@ public class CMSEngineDefaultStub implements ICMSEngine {
         return false;
     }
 
-    public Enumeration getSubsystemNames() {
+    public Enumeration <String> getSubsystemNames() {
         return null;
     }
 
-    public Enumeration getSubsystems() {
+    public Enumeration<ISubsystem> getSubsystems() {
         return null;
     }
 
@@ -459,17 +459,6 @@ public String getFingerPrints(byte[] certDer) throws NoSuchAlgorithmException {
         return null;
     }
 
-    public void getGeneralNameConfigDefaultParams(String name, boolean isValueConfigured, Vector params) {
-    }
-
-    public void getGeneralNamesConfigDefaultParams(String name, boolean isValueConfigured, Vector params) {
-    }
-
-    public void getGeneralNameConfigExtendedPluginInfo(String name, boolean isValueConfigured, Vector info) {
-    }
-
-    public void getGeneralNamesConfigExtendedPluginInfo(String name, boolean isValueConfigured, Vector info) {
-    }
 
     public IGeneralNamesConfig createGeneralNamesConfig(String name, IConfigStore config, boolean isValueConfigured, boolean isPolicyEnabled) throws EBaseException {
         return null;
@@ -483,11 +472,6 @@ public String getFingerPrints(byte[] certDer) throws NoSuchAlgorithmException {
         return null;
     }
 
-    public void getSubjAltNameConfigDefaultParams(String name, Vector params) {
-    }
-
-    public void getSubjAltNameConfigExtendedPluginInfo(String name, Vector params) {
-    }
 
     public ISubjAltNameConfig createSubjAltNameConfig(String name, IConfigStore config, boolean isValueConfigured) throws EBaseException {
         return null;
@@ -527,13 +511,6 @@ public String getFingerPrints(byte[] certDer) throws NoSuchAlgorithmException {
         return null;
     }
 
-    public IArgBlock createArgBlock(String realm, Hashtable httpReq) {
-        return null;
-    }
-
-    public IArgBlock createArgBlock(Hashtable httpReq) {
-        return null;
-    }
 
     public boolean isRevoked(X509Certificate[] certificates) {
         return false;
@@ -590,4 +567,59 @@ public String getFingerPrints(byte[] certDer) throws NoSuchAlgorithmException {
 		// TODO Auto-generated method stub
 		return null;
 	}
+
+	@Override
+	public void getGeneralNameConfigDefaultParams(String name,
+			boolean isValueConfigured, Vector<String> params) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public void getGeneralNamesConfigDefaultParams(String name,
+			boolean isValueConfigured, Vector<String> params) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public void getGeneralNameConfigExtendedPluginInfo(String name,
+			boolean isValueConfigured, Vector<String> info) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public void getGeneralNamesConfigExtendedPluginInfo(String name,
+			boolean isValueConfigured, Vector<String> info) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public void getSubjAltNameConfigDefaultParams(String name,
+			Vector<String> params) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public void getSubjAltNameConfigExtendedPluginInfo(String name,
+			Vector<String> params) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public IArgBlock createArgBlock(String realm,
+			Hashtable<String, String> httpReq) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	public IArgBlock createArgBlock(Hashtable<String, String> httpReq) {
+		// TODO Auto-generated method stub
+		return null;
+	}
 }
diff --git a/pki/base/common/test/com/netscape/cmscore/request/ExtDataHashtableTest.java b/pki/base/common/test/com/netscape/cmscore/request/ExtDataHashtableTest.java
index 7569ff20ad6afbf32f01232b61f9eb69dd151e50..c349b73d07c1f0c0f7e6d324434f3d2826bfcb47 100644
--- a/pki/base/common/test/com/netscape/cmscore/request/ExtDataHashtableTest.java
+++ b/pki/base/common/test/com/netscape/cmscore/request/ExtDataHashtableTest.java
@@ -9,14 +9,14 @@ import com.netscape.cmscore.test.CMSBaseTestCase;
 
 public class ExtDataHashtableTest extends CMSBaseTestCase {
 
-    ExtDataHashtable hash;
+    ExtDataHashtable<String> hash;
 
     public ExtDataHashtableTest(String name) {
         super(name);
     }
 
     public void cmsTestSetUp() {
-        hash = new ExtDataHashtable();
+        hash = new ExtDataHashtable<String>();
     }
 
     public void cmsTestTearDown() {
@@ -46,7 +46,7 @@ public class ExtDataHashtableTest extends CMSBaseTestCase {
     }
 
     public void testPutAll() {
-        Hashtable hash2 = new Hashtable();
+        Hashtable<String, String> hash2 = new Hashtable<String, String>();
         hash2.put("KEY1", "VAL1");
         hash2.put("KEY2", "val2");
 
@@ -67,11 +67,11 @@ public class ExtDataHashtableTest extends CMSBaseTestCase {
     }
 
     public void testMapConstructor() {
-        Hashtable hash2 = new Hashtable();
+        Hashtable<String, String> hash2 = new Hashtable<String, String>();
         hash2.put("KEY1", "VAL1");
         hash2.put("KEY2", "val2");
 
-        hash = new ExtDataHashtable(hash2);
+        hash = new ExtDataHashtable<String>(hash2);
 
         assertTrue(hash.containsKey("key1"));
         assertEquals("VAL1", hash.get("key1"));
diff --git a/pki/base/common/test/com/netscape/cmscore/request/RequestDefaultStub.java b/pki/base/common/test/com/netscape/cmscore/request/RequestDefaultStub.java
index f00eb8a748cf943d1398c05c65548dd2e248ab96..a835ba32c1d62819c407ef55354a3c33311b49b9 100644
--- a/pki/base/common/test/com/netscape/cmscore/request/RequestDefaultStub.java
+++ b/pki/base/common/test/com/netscape/cmscore/request/RequestDefaultStub.java
@@ -71,7 +71,7 @@ public class RequestDefaultStub implements IRequest {
         return null;
     }
 
-    public Enumeration getAttrNames() {
+    public Enumeration<String> getAttrNames() {
         return null;
     }
 
@@ -103,7 +103,7 @@ public class RequestDefaultStub implements IRequest {
         return false;
     }
 
-    public boolean setExtData(String key, Hashtable value) {
+    public boolean setExtData(String key, Hashtable<String, ?>  value) {
         return false;
     }
 
@@ -115,11 +115,11 @@ public class RequestDefaultStub implements IRequest {
         return null;
     }
 
-    public Hashtable getExtDataInHashtable(String key) {
+    public <V> Hashtable<String, V> getExtDataInHashtable(String key){
         return null;
     }
 
-    public Enumeration getExtDataKeys() {
+    public Enumeration<String> getExtDataKeys() {
         return null;
     }
 
@@ -223,11 +223,11 @@ public class RequestDefaultStub implements IRequest {
         return new RevokedCertImpl[0];
     }
 
-    public boolean setExtData(String key, Vector data) {
+    public boolean setExtData(String key, Vector<?> data) {
         return false;
     }
 
-    public Vector getExtDataInStringVector(String key) {
+    public Vector<String> getExtDataInStringVector(String key) {
         return null;
     }
 
diff --git a/pki/base/common/test/com/netscape/cmscore/request/RequestTest.java b/pki/base/common/test/com/netscape/cmscore/request/RequestTest.java
index 4000963183015942ee524d00791b8f24693b3c7b..dd1a16120d2e4006bfb51315dd6b9b9b015d321a 100644
--- a/pki/base/common/test/com/netscape/cmscore/request/RequestTest.java
+++ b/pki/base/common/test/com/netscape/cmscore/request/RequestTest.java
@@ -69,7 +69,7 @@ public class RequestTest extends CMSBaseTestCase {
 
     public void testIsSimpleExtDataValue() {
         request.mExtData.put("simple1", "foo");
-        request.mExtData.put("complex1", new Hashtable());
+        request.mExtData.put("complex1", new Hashtable<String, Object> ());
 
         assertTrue(request.isSimpleExtDataValue("simple1"));
         assertFalse(request.isSimpleExtDataValue("complex1"));
@@ -91,7 +91,8 @@ public class RequestTest extends CMSBaseTestCase {
         assertFalse(request.setExtData("key", (String)null));
     }
 
-    public void testVerifyValidExtDataHashtable() {
+    @SuppressWarnings({ "rawtypes", "unchecked" })
+	public void testVerifyValidExtDataHashtable() {
         Hashtable valueHash = new Hashtable();
 
         valueHash.put("key1", "val1");
@@ -103,8 +104,8 @@ public class RequestTest extends CMSBaseTestCase {
         assertFalse(request.isValidExtDataHashtableValue(valueHash));
 
         valueHash.clear();
-        valueHash.put(new Integer("0"), "bar");
-        assertFalse(request.isValidExtDataHashtableValue(valueHash));
+        //valueHash.put(new Integer("0"), "bar");
+        //assertFalse(request.isValidExtDataHashtableValue(valueHash));
 
         valueHash.clear();
         valueHash.put("okay", new Integer(5));
@@ -112,15 +113,16 @@ public class RequestTest extends CMSBaseTestCase {
 
     }
 
-    public void testSetExtHashtableData() {
-        Hashtable valueHash = new Hashtable();
+    @SuppressWarnings({ "unchecked", "rawtypes" })
+	public void testSetExtHashtableData() {
+        Hashtable<String, String> valueHash = new Hashtable<String, String>();
 
         valueHash.put("key1", "val1");
         valueHash.put("KEY2", "val2");
 
         request.setExtData("TOPKEY", valueHash);
 
-        Hashtable out = request.getExtDataInHashtable("topkey");
+        Hashtable<String, ?> out = request.getExtDataInHashtable("topkey");
         assertNotNull(out);
 
         assertTrue(out.containsKey("key1"));
@@ -137,7 +139,7 @@ public class RequestTest extends CMSBaseTestCase {
 
     public void testGetExtDataInString() {
         request.mExtData.put("strkey", "strval");
-        Hashtable hashValue = new Hashtable();
+        Hashtable<String, String> hashValue = new Hashtable<String, String>();
         hashValue.put("uh", "oh");
         request.mExtData.put("hashkey", hashValue);
 
@@ -150,11 +152,11 @@ public class RequestTest extends CMSBaseTestCase {
 
     public void testGetExtDataInHashtable() {
         request.mExtData.put("strkey", "strval");
-        Hashtable hashValue = new Hashtable();
+        Hashtable<String, String> hashValue = new Hashtable<String, String>();
         hashValue.put("uh", "oh");
         request.mExtData.put("hashkey", hashValue);
 
-        Hashtable out = request.getExtDataInHashtable("HASHKEY");
+        Hashtable<?, ?> out = request.getExtDataInHashtable("HASHKEY");
         assertNotNull(out);
         assertNull(request.getExtDataInHashtable("notfound"));
         assertNull(request.getExtDataInHashtable("strkey"));
@@ -171,7 +173,7 @@ public class RequestTest extends CMSBaseTestCase {
 
     public void testGetExtDataKeys() {
         request.setExtData("FOO", "val1");
-        request.setExtData("bar", new Hashtable());
+        request.setExtData("bar", new Hashtable<String, Object>());
 
         assertTrue(TestHelper.enumerationContains(request.getExtDataKeys(), "foo"));
         assertTrue(TestHelper.enumerationContains(request.getExtDataKeys(), "bar"));
@@ -181,14 +183,14 @@ public class RequestTest extends CMSBaseTestCase {
         // creates hashtable first time
         assertNull(request.getExtDataInHashtable("topkey"));
         request.setExtData("TOPKEY", "SUBKEY", "value");
-        Hashtable value = request.getExtDataInHashtable("topkey");
+        Hashtable<String, String> value = request.getExtDataInHashtable("topkey");
         assertNotNull(value);
         assertTrue(value.containsKey("subkey"));
         assertEquals("value", value.get("subkey"));
 
         // adds to existing hashtable
         assertNull(request.getExtDataInHashtable("topkey2"));
-        value = new Hashtable();
+        value = new Hashtable<String, String>();
         value.put("subkey2", "value2");
         request.setExtData("topkey2", value);
         request.setExtData("TOPKEY2", "subkey3", "value3");
@@ -219,7 +221,7 @@ public class RequestTest extends CMSBaseTestCase {
     }
 
     public void testGetExtDataSubkeyValue() {
-        Hashtable value = new Hashtable();
+        Hashtable<String, String> value = new Hashtable<String, String>();
         value.put("subkey", "value");
 
         request.setExtData("topkey", value);
@@ -259,7 +261,7 @@ public class RequestTest extends CMSBaseTestCase {
         assertEquals(data[2], retval[2]);
 
         // invalid conversion
-        Hashtable hashValue = new Hashtable();
+        Hashtable<String, String> hashValue = new Hashtable<String, String>();
         hashValue.put("0", "5");
         hashValue.put("1", "bar");
         request.setExtData("topkey2", hashValue);
@@ -298,7 +300,7 @@ public class RequestTest extends CMSBaseTestCase {
         assertEquals(data[2], retval[2]);
 
         // invalid conversion
-        Hashtable hashValue = new Hashtable();
+        Hashtable<String, String> hashValue = new Hashtable<String, String>();
         hashValue.put("0", "5");
         hashValue.put("1", "bar");
         request.setExtData("topkey2", hashValue);
@@ -357,7 +359,7 @@ public class RequestTest extends CMSBaseTestCase {
         };
 
         assertTrue(request.setExtData("key", vals));
-        Hashtable hashVals = (Hashtable)request.mExtData.get("key");
+        Hashtable<?, ?> hashVals = (Hashtable<?, ?>)request.mExtData.get("key");
         assertEquals(2, hashVals.keySet().size());
 
         assertFalse(cmsStub.aToBCalled);
@@ -376,7 +378,8 @@ public class RequestTest extends CMSBaseTestCase {
         assertTrue(request.setExtData("key", value));
 
         assertTrue(request.mExtData.containsKey("key"));
-        Hashtable hashValue = (Hashtable)request.mExtData.get("key");
+        @SuppressWarnings("unchecked")
+		Hashtable<String, String> hashValue = (Hashtable<String, String>)request.mExtData.get("key");
         assertTrue(hashValue.containsKey("0"));
         assertTrue(hashValue.containsKey("1"));
         assertTrue(hashValue.containsKey("2"));
@@ -394,7 +397,7 @@ public class RequestTest extends CMSBaseTestCase {
         assertEquals("orange", retval[3]);
 
         // Try with sparse input
-        hashValue = new Hashtable();
+        hashValue = new Hashtable<String, String>();
         hashValue.put("0", "square");
         hashValue.put("4", "triangle");
         hashValue.put("6", "octogon");
@@ -411,7 +414,7 @@ public class RequestTest extends CMSBaseTestCase {
         assertEquals("octogon", retval[6]);
 
         // invalid conversion
-        hashValue = new Hashtable();
+        hashValue = new Hashtable<String, String>();
         hashValue.put("0", "foo");
         hashValue.put("badkey", "bar");
         request.setExtData("cory", hashValue);
@@ -422,7 +425,7 @@ public class RequestTest extends CMSBaseTestCase {
     }
 
     public void testGetSetStringVector() {
-        Vector stringVector = new Vector();
+        Vector<String> stringVector = new Vector<String>();
         stringVector.add("blue");
         stringVector.add("green");
         stringVector.add("red");
@@ -431,7 +434,8 @@ public class RequestTest extends CMSBaseTestCase {
         assertTrue(request.setExtData("key", stringVector));
 
         assertTrue(request.mExtData.containsKey("key"));
-        Hashtable hashValue = (Hashtable)request.mExtData.get("key");
+        @SuppressWarnings("unchecked")
+		Hashtable<String, String> hashValue = (Hashtable<String, String>)request.mExtData.get("key");
         assertTrue(hashValue.containsKey("0"));
         assertTrue(hashValue.containsKey("1"));
         assertTrue(hashValue.containsKey("2"));
@@ -441,7 +445,7 @@ public class RequestTest extends CMSBaseTestCase {
         assertEquals("red", hashValue.get("2"));
         assertEquals("orange", hashValue.get("3"));
 
-        Vector retval = request.getExtDataInStringVector("key");
+        Vector<String> retval = request.getExtDataInStringVector("key");
         assertEquals(4, retval.size());
         assertEquals("blue", retval.elementAt(0));
         assertEquals("green", retval.elementAt(1));
@@ -449,13 +453,13 @@ public class RequestTest extends CMSBaseTestCase {
         assertEquals("orange", retval.elementAt(3));
 
         // invalid conversion
-        hashValue = new Hashtable();
+        hashValue = new Hashtable<String, String>();
         hashValue.put("0", "foo");
         hashValue.put("badkey", "bar");
         request.setExtData("cory", hashValue);
         assertNull(request.getExtDataInStringVector("cory"));
 
-        assertFalse(request.setExtData("key", (Vector)null));
+        assertFalse(request.setExtData("key", (Vector<?>)null));
     }
 
     public void testGetSetCertInfo() {
@@ -482,7 +486,7 @@ public class RequestTest extends CMSBaseTestCase {
         };
 
         assertTrue(request.setExtData("key", vals));
-        Hashtable hashVals = (Hashtable)request.mExtData.get("key");
+        Hashtable<?, ?> hashVals = (Hashtable<?, ?>)request.mExtData.get("key");
         assertEquals(2, hashVals.keySet().size());
 
         assertFalse(cmsStub.aToBCalled);
@@ -493,7 +497,7 @@ public class RequestTest extends CMSBaseTestCase {
     }
 
     public void testGetBoolean() {
-        Hashtable hashValue = new Hashtable();
+        Hashtable<String, String> hashValue = new Hashtable<String, String>();
         hashValue.put("one", "false");
         hashValue.put("two", "true");
         hashValue.put("three", "on");
@@ -532,7 +536,7 @@ public class RequestTest extends CMSBaseTestCase {
         };
 
         assertTrue(request.setExtData("key", vals));
-        Hashtable hashVals = (Hashtable)request.mExtData.get("key");
+        Hashtable<?, ?> hashVals = (Hashtable<?, ?>)request.mExtData.get("key");
         assertEquals(2, hashVals.keySet().size());
 
         assertFalse(cmsStub.aToBCalled);
diff --git a/pki/base/java-tools/src/com/netscape/cmstools/GenExtKeyUsage.java b/pki/base/java-tools/src/com/netscape/cmstools/GenExtKeyUsage.java
index af228b9bbd440bc381d851cb91fd8b9b2bc6de78..9fffce3f1c67fed9b144c58abc77007df0dc2414 100644
--- a/pki/base/java-tools/src/com/netscape/cmstools/GenExtKeyUsage.java
+++ b/pki/base/java-tools/src/com/netscape/cmstools/GenExtKeyUsage.java
@@ -56,7 +56,7 @@ public class GenExtKeyUsage {
             }
 
             // Generate vector of object identifiers from command line
-            Vector oids = new Vector();
+            Vector<ObjectIdentifier> oids = new Vector<ObjectIdentifier>();
 
             for (int i = 1; i < args.length; i++) {
                 ObjectIdentifier oid = new ObjectIdentifier(args[i]);
@@ -68,7 +68,7 @@ public class GenExtKeyUsage {
             DerOutputStream contents = new DerOutputStream();
 
             for (int i = 0; i < oids.size(); i++) {
-                contents.putOID((ObjectIdentifier) oids.elementAt(i));
+                contents.putOID(oids.elementAt(i));
             }
 
             // stuff the object identifiers into a SEQUENCE
diff --git a/pki/base/java-tools/src/com/netscape/cmstools/PrettyPrintCert.java b/pki/base/java-tools/src/com/netscape/cmstools/PrettyPrintCert.java
index 84cc54cbe069379e4120a5e95e8468a9d3226fef..f67f787e1aab7df029b2abfe8ce6802a279dc23d 100644
--- a/pki/base/java-tools/src/com/netscape/cmstools/PrettyPrintCert.java
+++ b/pki/base/java-tools/src/com/netscape/cmstools/PrettyPrintCert.java
@@ -191,7 +191,7 @@ public class PrettyPrintCert {
                 CertificateSubjectName csn = (CertificateSubjectName)
                     certinfo.get(X509CertInfo.SUBJECT);
 
-                Enumeration en = csn.getElements();
+                Enumeration<String> en = csn.getAttributeNames();
 
                 X500Name   dname = (X500Name) csn.get(CertificateSubjectName.DN_NAME);
 
diff --git a/pki/base/java-tools/src/com/netscape/cmstools/PrettyPrintCrl.java b/pki/base/java-tools/src/com/netscape/cmstools/PrettyPrintCrl.java
index b68f9fbc643d5d506c675f46eca2233b3640a6fa..b072867bbd616dd80561852bfb064465f11ce735 100644
--- a/pki/base/java-tools/src/com/netscape/cmstools/PrettyPrintCrl.java
+++ b/pki/base/java-tools/src/com/netscape/cmstools/PrettyPrintCrl.java
@@ -91,25 +91,25 @@ public class PrettyPrintCrl {
         try {
             OIDMap.addAttribute(DeltaCRLIndicatorExtension.class.getName(),
                 DeltaCRLIndicatorExtension.OID,
-                DeltaCRLIndicatorExtension.NAME);
+                DeltaCRLIndicatorExtension.class.getSimpleName());
         } catch (CertificateException e) {
         }
         try {
             OIDMap.addAttribute(HoldInstructionExtension.class.getName(),
                 HoldInstructionExtension.OID,
-                HoldInstructionExtension.NAME);
+                HoldInstructionExtension.class.getSimpleName());
         } catch (CertificateException e) {
         }
         try {
             OIDMap.addAttribute(InvalidityDateExtension.class.getName(),
                 InvalidityDateExtension.OID,
-                InvalidityDateExtension.NAME);
+                InvalidityDateExtension.class.getSimpleName());
         } catch (CertificateException e) {
         }
         try {
             OIDMap.addAttribute(IssuingDistributionPointExtension.class.getName(),
                 IssuingDistributionPointExtension.OID,
-                IssuingDistributionPointExtension.NAME);
+                IssuingDistributionPointExtension.class.getSimpleName());
         } catch (CertificateException e) {
         }
 
diff --git a/pki/base/silent/src/com/netscape/pkisilent/common/Utilities.java b/pki/base/silent/src/com/netscape/pkisilent/common/Utilities.java
index 192ba0564d70e40015b19ed8720badba9409c203..3d90c84142c16bbfa23009fc185ac4126b3ea3ff 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/common/Utilities.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/common/Utilities.java
@@ -19,7 +19,6 @@ package com.netscape.pkisilent.common;
 
 import java.io.DataInputStream;
 import java.io.FileInputStream;
-import java.util.Enumeration;
 
 import netscape.security.x509.CertificateSerialNumber;
 import netscape.security.x509.CertificateSubjectName;
@@ -32,10 +31,6 @@ import netscape.security.x509.X509CertInfo;
 import com.netscape.osutil.OSUtil;
 
 public class Utilities {
-    private static final String keyValueSeparators = "=: \t\r\n\f";
-    private static final String strictKeyValueSeparators = "=:";
-    private static final String specialSaveChars = " \t\r\n\f";
-    private static final String whiteSpaceChars = " \t\r\n\f";
 
     public Utilities() {// Do nothing
     }
@@ -326,10 +321,7 @@ public class Utilities {
 
             CertificateSubjectName csn1 = (CertificateSubjectName)
                     certinfo.get(X509CertInfo.SUBJECT);
-
-            @SuppressWarnings("unchecked")
-			Enumeration<String> en = csn1.getElements();
-
+            
             X500Name dname = (X500Name) csn1.get(CertificateSubjectName.DN_NAME);
 
             String pp = "";
diff --git a/pki/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java b/pki/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java
index e659da9b9018316635754a636ff76efe90a5b9d4..29a1ffb32ae75e69e4cd32b3c67ca4509c1a1c6c 100644
--- a/pki/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java
+++ b/pki/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java
@@ -954,10 +954,11 @@ public class CryptoUtil {
         throws CryptoManager.NotInitializedException,
                 TokenException {
         CryptoManager cm = CryptoManager.getInstance();
-        Enumeration enums = cm.getAllTokens();
+        @SuppressWarnings("unchecked")
+		Enumeration<CryptoToken> enums = cm.getAllTokens();
 
         while (enums.hasMoreElements()) {
-            CryptoToken token = (CryptoToken) enums.nextElement();
+            CryptoToken token =  enums.nextElement();
             String tokenName = token.getName();
             CryptoStore store = token.getCryptoStore();
             PrivateKey keys[] = store.getPrivateKeys(); 
@@ -979,9 +980,10 @@ public class CryptoUtil {
     public static X509CertImpl[] getAllUserCerts()
         throws CryptoManager.NotInitializedException,
                 TokenException {
-        Vector certs = new Vector();
+        Vector<X509CertImpl> certs = new Vector<X509CertImpl>();
         CryptoManager cm = CryptoManager.getInstance();
-        Enumeration enums = cm.getAllTokens();
+        @SuppressWarnings("unchecked")
+		Enumeration<CryptoToken> enums = cm.getAllTokens();
 
         while (enums.hasMoreElements()) {
             CryptoToken token = (CryptoToken) enums.nextElement();
diff --git a/pki/base/util/src/com/netscape/cmsutil/scep/CRSPKIMessage.java b/pki/base/util/src/com/netscape/cmsutil/scep/CRSPKIMessage.java
index 16406e2a70f67402aac6577c6e866f456c92e2c6..ae93d2b6d2740db68aa99e573a16d5d7fd9bb1f1 100644
--- a/pki/base/util/src/com/netscape/cmsutil/scep/CRSPKIMessage.java
+++ b/pki/base/util/src/com/netscape/cmsutil/scep/CRSPKIMessage.java
@@ -26,6 +26,8 @@ import java.security.PublicKey;
 import java.util.Arrays;
 import java.util.Hashtable;
 
+import netscape.security.pkcs.PKCS10;
+
 import org.mozilla.jss.asn1.ANY;
 import org.mozilla.jss.asn1.ASN1Util;
 import org.mozilla.jss.asn1.INTEGER;
@@ -193,9 +195,9 @@ public class CRSPKIMessage {
     private int            rsdVersion;
     private byte[]         rsdCert;         // certificate to send in response
 
-    private Object         myP10;
+    private PKCS10         myP10;
 
-    private Hashtable      attrs;           // miscellanous
+    private Hashtable<String, Object>      attrs;           // miscellanous
 
     //   *** END *** //
 
@@ -203,7 +205,7 @@ public class CRSPKIMessage {
     public void debug() {
     }
 
-    public void put(Object a, Object b) {
+    public void put(String a, Object b) {
         attrs.put(a, b);
     }
 
@@ -612,11 +614,11 @@ public class CRSPKIMessage {
         return aa_digest.toByteArray();
     }
      
-    public Object getP10() {
+    public PKCS10 getP10() {
         return myP10;
     }
    
-    public void setP10(Object p10) {
+    public void setP10(PKCS10 p10) {
         myP10 = p10;
     }
         
@@ -725,11 +727,11 @@ public class CRSPKIMessage {
     }
 
     public CRSPKIMessage() {
-        attrs = new Hashtable();
+        attrs = new Hashtable<String, Object>();
     }
         
     public CRSPKIMessage (ByteArrayInputStream bais) throws InvalidBERException, Exception {
-        attrs = new Hashtable();
+        attrs = new Hashtable<String, Object>();
         decodeCRSPKIMessage(bais);
     }
 
diff --git a/pki/base/util/src/netscape/security/extensions/AuthInfoAccessExtension.java b/pki/base/util/src/netscape/security/extensions/AuthInfoAccessExtension.java
index 108dab0701aa0f3b04743f0638eaefbb3daceb4c..5f21db5bae0881dbf603c69b5052b19ccae6a192 100644
--- a/pki/base/util/src/netscape/security/extensions/AuthInfoAccessExtension.java
+++ b/pki/base/util/src/netscape/security/extensions/AuthInfoAccessExtension.java
@@ -64,11 +64,8 @@ import netscape.security.x509.URIName;
  * @version $Revision$, $Date$
  */
 public class AuthInfoAccessExtension extends Extension implements CertAttrSet {
-    /**
-     *
-     */
     private static final long serialVersionUID = 7373316523212538446L;
-    public static final String NAME = "AuthInfoAccessExtension";
+
     public static final String NAME2 = "AuthorityInformationAccess";
 
     public static final int OID_OCSP[] = { 1, 3, 6, 1, 5, 5, 7, 48, 1 };
@@ -82,7 +79,7 @@ public class AuthInfoAccessExtension extends Extension implements CertAttrSet {
     public static final int OID[] = { 1, 3, 6, 1, 5, 5, 7, 1, 1 };
     public static final ObjectIdentifier ID = new ObjectIdentifier(OID);
 
-    private Vector mDesc = new Vector();
+    private Vector<AccessDescription> mDesc = new Vector<AccessDescription>();
 
     /**
      * Create the extension from the passed DER encoded value of the same.
@@ -138,17 +135,11 @@ public class AuthInfoAccessExtension extends Extension implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration getElements() {
+    public Enumeration<String> getAttributeNames() {
         // NOT USED
         return null;
     }
 
-    /**
-     * Return the name of this attribute.
-     */
-    public String getName() {
-        return NAME;
-    }
 
     /**
      * Adds Access Description.
@@ -161,7 +152,7 @@ public class AuthInfoAccessExtension extends Extension implements CertAttrSet {
     }
 
     public AccessDescription getAccessDescription(int pos) {
-        return (AccessDescription) mDesc.elementAt(pos);
+        return mDesc.elementAt(pos);
     }
 
     /**
@@ -192,7 +183,7 @@ public class AuthInfoAccessExtension extends Extension implements CertAttrSet {
 
         for (int i = 0; i < mDesc.size(); i++) {
             DerOutputStream tmp0 = new DerOutputStream();
-            AccessDescription ad = (AccessDescription) mDesc.elementAt(i);
+            AccessDescription ad = mDesc.elementAt(i);
 
             tmp0.putOID(ad.getMethod());
             ad.getLocation().encode(tmp0);
@@ -225,7 +216,7 @@ public class AuthInfoAccessExtension extends Extension implements CertAttrSet {
         String s = super.toString() + "AuthInfoAccess [\n";
 
         for (int i = 0; i < mDesc.size(); i++) {
-            AccessDescription ad = (AccessDescription) mDesc.elementAt(i);
+            AccessDescription ad = mDesc.elementAt(i);
 
             s += "(" + i + ")";
             s += " ";
diff --git a/pki/base/util/src/netscape/security/extensions/CertificateRenewalWindowExtension.java b/pki/base/util/src/netscape/security/extensions/CertificateRenewalWindowExtension.java
index 634e2d57923d121e4b8cef3edd36885a38df28ab..8a1e0a6fd72522eb81acc7e1df3ee281d135d5b2 100644
--- a/pki/base/util/src/netscape/security/extensions/CertificateRenewalWindowExtension.java
+++ b/pki/base/util/src/netscape/security/extensions/CertificateRenewalWindowExtension.java
@@ -45,11 +45,7 @@ import netscape.security.x509.Extension;
  */
 public class CertificateRenewalWindowExtension extends Extension 
     implements CertAttrSet {
-    /**
-     *
-     */
     private static final long serialVersionUID = 4470220533545299271L;
-    public static final String NAME = "CertificateRenewalWindow";
     public static final int OID[] = { 2, 16, 840, 1, 113730, 1, 15};
     public static final ObjectIdentifier ID = new ObjectIdentifier(OID);
 
@@ -79,10 +75,6 @@ public class CertificateRenewalWindowExtension extends Extension
         decodeThis();
     }
 
-    public String getName() {
-        return NAME;
-    }
-
     /**
      * Sets extension attribute.
      */
@@ -116,7 +108,7 @@ public class CertificateRenewalWindowExtension extends Extension
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration getElements() {
+    public Enumeration<String> getAttributeNames() {
         // NOT USED
         return null;
     }
diff --git a/pki/base/util/src/netscape/security/extensions/CertificateScopeOfUseExtension.java b/pki/base/util/src/netscape/security/extensions/CertificateScopeOfUseExtension.java
index b6b8a87ae332be3b5a1ca753e33b519fe25ae325..b50e55d9c668b0ad2f7400acbc69b30ffc1c05e1 100644
--- a/pki/base/util/src/netscape/security/extensions/CertificateScopeOfUseExtension.java
+++ b/pki/base/util/src/netscape/security/extensions/CertificateScopeOfUseExtension.java
@@ -54,7 +54,7 @@ public class CertificateScopeOfUseExtension extends Extension
     public static final int OID[] = { 2, 16, 840, 1, 113730, 1, 17};
     public static final ObjectIdentifier ID = new ObjectIdentifier(OID);
 
-    private Vector mEntries = null;
+    private Vector<CertificateScopeEntry> mEntries = null;
 
     static {
         try {
@@ -64,7 +64,7 @@ public class CertificateScopeOfUseExtension extends Extension
         }
     }
 
-    public CertificateScopeOfUseExtension(boolean critical, Vector scopeEntries)
+    public CertificateScopeOfUseExtension(boolean critical, Vector<CertificateScopeEntry> scopeEntries)
         throws IOException {
         this.extensionId = ID;
         this.critical = critical;
@@ -87,11 +87,7 @@ public class CertificateScopeOfUseExtension extends Extension
         decodeThis();
     }
 
-    public String getName() {
-        return NAME;
-    }
-
-    public Vector getCertificateScopeEntries() {
+    public Vector<CertificateScopeEntry> getCertificateScopeEntries() {
         return mEntries;
     }
 
@@ -128,7 +124,7 @@ public class CertificateScopeOfUseExtension extends Extension
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration getElements() {
+    public Enumeration<String> getAttributeNames() {
         // NOT USED
         return null;
     }
@@ -139,7 +135,7 @@ public class CertificateScopeOfUseExtension extends Extension
         if (val.tag != DerValue.tag_Sequence) {
             throw new IOException("Invalid encoding of CertificateWindow extension");
         }
-        mEntries = new Vector();
+        mEntries = new Vector<CertificateScopeEntry>();
         while (val.data.available() != 0) {
             mEntries.addElement(new CertificateScopeEntry(
                     val.data.getDerValue()));
diff --git a/pki/base/util/src/netscape/security/extensions/ExtendedKeyUsageExtension.java b/pki/base/util/src/netscape/security/extensions/ExtendedKeyUsageExtension.java
index 71ff031ff12ad6581dcb06ed23b7034dc268b86f..73602f6b3e1622849db880b601c80299a67cc9f3 100644
--- a/pki/base/util/src/netscape/security/extensions/ExtendedKeyUsageExtension.java
+++ b/pki/base/util/src/netscape/security/extensions/ExtendedKeyUsageExtension.java
@@ -43,7 +43,6 @@ public class ExtendedKeyUsageExtension extends Extension implements CertAttrSet
      */
     private static final long serialVersionUID = 765403075764697489L;
     public static final String OID = "2.5.29.37";
-    public static final String NAME = OIDMap.EXT_KEY_USAGE_NAME;
     public static final String OID_OCSPSigning = "1.3.6.1.5.5.7.3.9";
     public static final String OID_CODESigning = "1.3.6.1.5.5.7.3.3";
 
@@ -57,13 +56,13 @@ public class ExtendedKeyUsageExtension extends Extension implements CertAttrSet
     public static final ObjectIdentifier OID_CODE_SIGNING = new
         ObjectIdentifier(OID_OCSP_SIGNING_STR);
 
-    private Vector oidSet = null;
+    private Vector<ObjectIdentifier> oidSet = null;
     private byte mCached[] = null;
 
     static {
         try {
             OIDMap.addAttribute(ExtendedKeyUsageExtension.class.getName(),
-                OID, NAME);
+                OID, ExtendedKeyUsageExtension.class.getSimpleName());
         } catch (CertificateException e) {
         }
     }
@@ -72,7 +71,7 @@ public class ExtendedKeyUsageExtension extends Extension implements CertAttrSet
         this(false, null);
     }
 
-    public ExtendedKeyUsageExtension(boolean crit, Vector oids) {
+    public ExtendedKeyUsageExtension(boolean crit, Vector<ObjectIdentifier> oids) {
         try {
             extensionId = ObjectIdentifier.getObjectIdentifier(OID);
         } catch (IOException e) {	
@@ -80,9 +79,9 @@ public class ExtendedKeyUsageExtension extends Extension implements CertAttrSet
         }
         critical = crit;
         if (oids != null) {
-            oidSet = (Vector) oids.clone();
+            oidSet = new Vector<ObjectIdentifier>(oids);
         } else {
-            oidSet = new Vector();
+            oidSet = new Vector<ObjectIdentifier>();
         }
         encodeExtValue();
     }
@@ -102,7 +101,7 @@ public class ExtendedKeyUsageExtension extends Extension implements CertAttrSet
         }
     }
     
-    public Enumeration getOIDs() {
+    public Enumeration<ObjectIdentifier> getOIDs() {
         if (oidSet == null)
             return null;
         return oidSet.elements();
@@ -116,7 +115,7 @@ public class ExtendedKeyUsageExtension extends Extension implements CertAttrSet
 
     public void addOID(ObjectIdentifier oid) {
         if (oidSet == null) {
-            oidSet = new Vector();
+            oidSet = new Vector<ObjectIdentifier>();
         }
         
         if (oidSet.contains(oid)) return;
@@ -173,13 +172,10 @@ public class ExtendedKeyUsageExtension extends Extension implements CertAttrSet
         return null;
     }
 
-    public Enumeration getElements() {
+    public Enumeration<String> getAttributeNames() {
         return null;
     }
 
-    public String getName() {
-        return NAME;   
-    }
 
     public void delete(String name) 
         throws CertificateException, IOException {
@@ -194,7 +190,7 @@ public class ExtendedKeyUsageExtension extends Extension implements CertAttrSet
                 );
         }
         if (oidSet == null)
-            oidSet = new Vector();
+            oidSet = new Vector<ObjectIdentifier>();
         while (val.data.available() != 0) {
             DerValue oidVal = val.data.getDerValue();
 
@@ -207,7 +203,7 @@ public class ExtendedKeyUsageExtension extends Extension implements CertAttrSet
         DerOutputStream temp = new DerOutputStream();
  
         if (!oidSet.isEmpty()) {
-            Enumeration oidList = oidSet.elements();
+            Enumeration<ObjectIdentifier> oidList = oidSet.elements();
 
             try {
                 while (oidList.hasMoreElements()) {
diff --git a/pki/base/util/src/netscape/security/extensions/GenericASN1Extension.java b/pki/base/util/src/netscape/security/extensions/GenericASN1Extension.java
index bd0fd7e1f3a2405610b4990b1745318e6fe9cf9f..9caa8dc8a3833c9de92cf627d019fe2b75bdf5e2 100644
--- a/pki/base/util/src/netscape/security/extensions/GenericASN1Extension.java
+++ b/pki/base/util/src/netscape/security/extensions/GenericASN1Extension.java
@@ -34,7 +34,6 @@ import netscape.security.util.BigInt;
 import netscape.security.util.DerOutputStream;
 import netscape.security.util.DerValue;
 import netscape.security.util.ObjectIdentifier;
-
 import netscape.security.x509.CertAttrSet;
 import netscape.security.x509.Extension;
 import netscape.security.x509.OIDMap;
@@ -75,12 +74,13 @@ implements CertAttrSet {
      * Identifier for this attribute, to be used with the
      * get, set, delete methods of Certificate, x509 type.
      */  
-    public static String NAME = null;
+    private String name;
     public static String OID = null;
-    public static Hashtable mConfig = null;
+    public static Hashtable<String, String> mConfig = null;
     public static String pattern = null;
     private int index = 0;
 
+
     // Encode this value
     private void encodeThis() 
         throws IOException, ParseException
@@ -191,11 +191,11 @@ implements CertAttrSet {
      *
      * @param the values to be set for the extension.
      */
-    public GenericASN1Extension(String name, String oid, String pattern, boolean critical, Hashtable config)
+    public GenericASN1Extension(String name, String oid, String pattern, boolean critical, Hashtable<String, String> config)
         throws IOException, ParseException
     {
         ObjectIdentifier tmpid = new ObjectIdentifier(oid);
-        NAME = name;
+        this.name = name;
         OID = oid;
         mConfig = config;
         this.pattern = pattern;
@@ -216,18 +216,18 @@ implements CertAttrSet {
      *
      * @param the values to be set for the extension.
      */
-    public GenericASN1Extension(Hashtable config)
+    public GenericASN1Extension(Hashtable<String, String> config)
         throws IOException, ParseException
     {
         mConfig = config;
         ObjectIdentifier tmpid = new ObjectIdentifier((String)mConfig.get(PROP_OID));
-        NAME = (String)mConfig.get(PROP_NAME);
+        this.name = (String)mConfig.get(PROP_NAME);
         OID = (String)mConfig.get(PROP_OID);
         pattern = (String)mConfig.get(PROP_PATTERN);
         
         try {
             if (OIDMap.getName(tmpid) == null)
-                OIDMap.addAttribute("GenericASN1Extension", OID, NAME);
+                OIDMap.addAttribute("GenericASN1Extension", OID, this.name);
         } catch (CertificateException e) {}
 
         this.extensionId = tmpid;
@@ -323,17 +323,12 @@ implements CertAttrSet {
         out.write(tmp.toByteArray());
     }
 
-    /**
-     * Return the name of this attribute.
-     */
-    public String getName () {
-        return (NAME);
-    }
+  
     /**
      * Set the name of this attribute.
      */
     public void setName (String name) {
-        NAME = name;
+        this.name = name;
     }
     /**
      * Return the OID of this attribute.
@@ -351,7 +346,7 @@ implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration getElements () {
+    public Enumeration<String> getAttributeNames () {
         Vector<String> elements = new Vector<String>();
         elements.addElement("octet");
 
diff --git a/pki/base/util/src/netscape/security/extensions/InhibitAnyPolicyExtension.java b/pki/base/util/src/netscape/security/extensions/InhibitAnyPolicyExtension.java
index 626d126b4c7b8a20b4909a71d1d9c2bb5b7f34e8..ce1268ad3590f88f4ab51f376ae21f92cd31dacb 100644
--- a/pki/base/util/src/netscape/security/extensions/InhibitAnyPolicyExtension.java
+++ b/pki/base/util/src/netscape/security/extensions/InhibitAnyPolicyExtension.java
@@ -51,14 +51,13 @@ public class InhibitAnyPolicyExtension
      */
     private static final long serialVersionUID = -8963439897419343166L;
     public static final String OID = "2.5.29.54";
-    public static final String NAME = OIDMap.EXT_INHIBIT_ANY_POLICY_NAME;
 
     private BigInt mSkipCerts = new BigInt(-1);
 
     static {
         try {
             OIDMap.addAttribute(InhibitAnyPolicyExtension.class.getName(),
-                OID, NAME);
+                OID, InhibitAnyPolicyExtension.class.getSimpleName());
         } catch (CertificateException e) {
         }
     }
@@ -133,13 +132,10 @@ public class InhibitAnyPolicyExtension
         return null;
     }
 
-    public Enumeration getElements() {
+    public Enumeration<String> getAttributeNames() {
         return null;
     }
 
-    public String getName() {
-        return NAME;   
-    }
 
     public void delete(String name) 
         throws CertificateException, IOException {
diff --git a/pki/base/util/src/netscape/security/extensions/KerberosName.java b/pki/base/util/src/netscape/security/extensions/KerberosName.java
index c60ceb0decfc61e6ce9a716cbcd85248dd0834da..0aeda430db54012544e7cc7cc8e23a780f86b0a4 100644
--- a/pki/base/util/src/netscape/security/extensions/KerberosName.java
+++ b/pki/base/util/src/netscape/security/extensions/KerberosName.java
@@ -54,9 +54,9 @@ public class KerberosName {
   
     private String m_realm = null;
     private int m_name_type = 0;
-    private Vector m_name_strings = null;
+    private Vector<String> m_name_strings = null;
 
-    public KerberosName(String realm, int name_type, Vector name_strings) {
+    public KerberosName(String realm, int name_type, Vector<String> name_strings) {
         m_realm = realm;
         m_name_type = name_type;
         m_name_strings = name_strings;
@@ -120,7 +120,7 @@ public class KerberosName {
     }
 
     public static void main(String[] argv) {
-        Vector strings = new Vector();
+        Vector<String> strings = new Vector<String>();
         strings.addElement("name");
         KerberosName k = new KerberosName("realm", 0, strings);
 
diff --git a/pki/base/util/src/netscape/security/extensions/NSCertTypeExtension.java b/pki/base/util/src/netscape/security/extensions/NSCertTypeExtension.java
index e470d4dcf99ff06b121f79f6134d7ce77e10258d..f8b357e8e604cd3465e10871f299e40d8a14cba6 100644
--- a/pki/base/util/src/netscape/security/extensions/NSCertTypeExtension.java
+++ b/pki/base/util/src/netscape/security/extensions/NSCertTypeExtension.java
@@ -62,7 +62,6 @@ public class NSCertTypeExtension extends Extension implements CertAttrSet {
    /**
     * Attribute names.
     */
-   public static final String NAME = "NSCertType";
    public static final String SSL_CLIENT = "ssl_client";
    public static final String SSL_SERVER = "ssl_server";
    public static final String EMAIL = "email";
@@ -116,7 +115,7 @@ public class NSCertTypeExtension extends Extension implements CertAttrSet {
             new MapEntry(OBJECT_SIGNING_CA, 7),
         };
 
-    private static Vector mAttributeNames = new Vector();
+    private static Vector<String> mAttributeNames = new Vector<String>();
 
     static {
         for (int i = 0; i < mMapData.length; ++i) {
@@ -364,16 +363,10 @@ public class NSCertTypeExtension extends Extension implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration getElements() {
+    public Enumeration<String> getAttributeNames() {
         return mAttributeNames.elements();
     }
 
-    /**
-     * Return the name of this attribute.
-     */
-    public String getName() {
-        return (NAME);
-    }
 
     public static void main(String[] argv) {
     }
diff --git a/pki/base/util/src/netscape/security/extensions/OCSPNoCheckExtension.java b/pki/base/util/src/netscape/security/extensions/OCSPNoCheckExtension.java
index ec3dbbb865793e52de54a250c41b97334995195a..544d59599d7592a98287c2ae1f83b7b5e0dddd51 100644
--- a/pki/base/util/src/netscape/security/extensions/OCSPNoCheckExtension.java
+++ b/pki/base/util/src/netscape/security/extensions/OCSPNoCheckExtension.java
@@ -41,14 +41,13 @@ public class OCSPNoCheckExtension extends Extension implements CertAttrSet {
      */
     private static final long serialVersionUID = -4692759557964594790L;
     public static final String OID = "1.3.6.1.5.5.7.48.1.5";
-    public static final String NAME = "OCSPNoCheckExtension";
 
     private byte mCached[] = null;
 
     static {
         try {
             OIDMap.addAttribute(OCSPNoCheckExtension.class.getName(),
-                OID, NAME);
+                OID, OCSPNoCheckExtension.class.getSimpleName());
         } catch (CertificateException e) {
         }
     }
@@ -139,15 +138,11 @@ public class OCSPNoCheckExtension extends Extension implements CertAttrSet {
         return null;
     }
 
-    public Enumeration getElements() {
+    public Enumeration<String> getAttributeNames() {
         // NOT USED
         return null;
     }
 
-    public String getName() {
-        return NAME;   
-    }
-
     public void delete(String name) 
         throws CertificateException, IOException {
         // NOT USED
diff --git a/pki/base/util/src/netscape/security/extensions/PresenceServerExtension.java b/pki/base/util/src/netscape/security/extensions/PresenceServerExtension.java
index 084e1d6969694a1217bacf728a26074422f08e5d..ecd8f4f66ae2392ddbb9f197ea5a17e5852a3663 100644
--- a/pki/base/util/src/netscape/security/extensions/PresenceServerExtension.java
+++ b/pki/base/util/src/netscape/security/extensions/PresenceServerExtension.java
@@ -243,18 +243,11 @@ public class PresenceServerExtension extends Extension implements CertAttrSet
         throw new IOException("Method not to be called directly.");
     }
 
-    public Enumeration getElements () {
+    public Enumeration<String> getAttributeNames () {
 	return null;
     }
 
     /**
-     * Return the name of this attribute.
-     */
-    public String getName () {
-	return "PresenceServerExtension";
-    }
-
-    /**
      * Set the name of this attribute.
      */
     public void setName (String name) {
diff --git a/pki/base/util/src/netscape/security/extensions/SubjectInfoAccessExtension.java b/pki/base/util/src/netscape/security/extensions/SubjectInfoAccessExtension.java
index 26d048dc504266fd0a472eac13771e76e6418ce2..36be1fff52f902ff9bfbb13ab2f0f9500d640651 100644
--- a/pki/base/util/src/netscape/security/extensions/SubjectInfoAccessExtension.java
+++ b/pki/base/util/src/netscape/security/extensions/SubjectInfoAccessExtension.java
@@ -46,13 +46,8 @@ import netscape.security.x509.URIName;
  * @version $Revision$, $Date$
  */
 public class SubjectInfoAccessExtension extends Extension implements CertAttrSet {
-    /**
-     *
-     */
     private static final long serialVersionUID = 7237321566602583325L;
 
-    public static final String NAME = "SubjectInfoAccessExtension";
-
     public static final int OID_OCSP[] = { 1, 3, 6, 1, 5, 5, 7, 48, 1 };
     public static final ObjectIdentifier METHOD_OCSP = new 
         ObjectIdentifier(OID_OCSP);
@@ -64,7 +59,7 @@ public class SubjectInfoAccessExtension extends Extension implements CertAttrSet
     public static final int OID[] = { 1, 3, 6, 1, 5, 5, 7, 1, 11 };
     public static final ObjectIdentifier ID = new ObjectIdentifier(OID);
 
-    private Vector mDesc = new Vector();
+    private Vector<AccessDescription> mDesc = new Vector<AccessDescription>();
 
     /**
      * Create the extension from the passed DER encoded value of the same.
@@ -120,17 +115,11 @@ public class SubjectInfoAccessExtension extends Extension implements CertAttrSet
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration getElements() {
+    public Enumeration<String> getAttributeNames() {
         // NOT USED
         return null;
     }
 
-    /**
-     * Return the name of this attribute.
-     */
-    public String getName() {
-        return NAME;
-    }
 
     /**
      * Adds Access Description.
@@ -143,7 +132,7 @@ public class SubjectInfoAccessExtension extends Extension implements CertAttrSet
     }
 
     public AccessDescription getAccessDescription(int pos) {
-        return (AccessDescription) mDesc.elementAt(pos);
+        return mDesc.elementAt(pos);
     }
 
     /**
@@ -174,7 +163,7 @@ public class SubjectInfoAccessExtension extends Extension implements CertAttrSet
 
         for (int i = 0; i < mDesc.size(); i++) {
             DerOutputStream tmp0 = new DerOutputStream();
-            AccessDescription ad = (AccessDescription) mDesc.elementAt(i);
+            AccessDescription ad = mDesc.elementAt(i);
 
             tmp0.putOID(ad.getMethod());
             ad.getLocation().encode(tmp0);
@@ -207,7 +196,7 @@ public class SubjectInfoAccessExtension extends Extension implements CertAttrSet
         String s = super.toString() + "AuthInfoAccess [\n";
 
         for (int i = 0; i < mDesc.size(); i++) {
-            AccessDescription ad = (AccessDescription) mDesc.elementAt(i);
+            AccessDescription ad = mDesc.elementAt(i);
 
             s += "(" + i + ")";
             s += " ";
diff --git a/pki/base/util/src/netscape/security/pkcs/PKCS10Attribute.java b/pki/base/util/src/netscape/security/pkcs/PKCS10Attribute.java
index e3eee809987af83c578eb4ff05d7b814b4c63121..dd74ead908df8223de1a850111bee7f574be84e7 100644
--- a/pki/base/util/src/netscape/security/pkcs/PKCS10Attribute.java
+++ b/pki/base/util/src/netscape/security/pkcs/PKCS10Attribute.java
@@ -114,17 +114,18 @@ public class PKCS10Attribute implements DerEncoder, Serializable {
 			}
 		}
 		byte[] val = inAttrValue.toByteArray();
-        Class[] params = { Object.class };
+        Class<?>[] params = { Object.class };
         try {
-			Class extClass = OIDMap.getClass(attributeId);
+			@SuppressWarnings("unchecked")
+			Class<CertAttrSet> extClass = (Class<CertAttrSet>) OIDMap.getClass(attributeId);
 			if (extClass != null) {
-            	Constructor cons = extClass.getConstructor(params);
+            	Constructor<CertAttrSet> cons = (Constructor<CertAttrSet>) extClass.getConstructor(params);
 				Object value = Array.newInstance(byte.class,val.length);
 				for (int i = 0; i < val.length; i++) {
 					Array.setByte(value,i,val[i]);
 				}
 				Object[] passed = new Object[] {value};
-            	attributeValue = (CertAttrSet) cons.newInstance(passed);
+            	attributeValue =  cons.newInstance(passed);
 			} else {
 				// attribute classes are usable for PKCS10 attributes. 
 				// this is used where the attributes are not actual 
diff --git a/pki/base/util/src/netscape/security/pkcs/PKCS9Attribute.java b/pki/base/util/src/netscape/security/pkcs/PKCS9Attribute.java
index 683514a7fcd51cb9363678686ad3439beca3b813..fc25e8d8fc13bf6ed23631146e2dddb8bc0c13c3 100644
--- a/pki/base/util/src/netscape/security/pkcs/PKCS9Attribute.java
+++ b/pki/base/util/src/netscape/security/pkcs/PKCS9Attribute.java
@@ -112,7 +112,7 @@ public class PKCS9Attribute implements DerEncoder {
      * attributes to their OIDs. This table contains all name forms 
      * that occur in PKCS9, in lower case.
      */
-    private static final Hashtable NAME_OID_TABLE = new Hashtable(28);
+    private static final Hashtable<String, ObjectIdentifier> NAME_OID_TABLE = new Hashtable<String, ObjectIdentifier>(28);
 
     static { // static initializer for PCKS9_NAMES
 	NAME_OID_TABLE.put("emailaddress", PKCS9_OIDS[1]);
@@ -136,7 +136,7 @@ public class PKCS9Attribute implements DerEncoder {
      * Hashtable mapping attribute OIDs defined in PKCS9 to the
      * corresponding attribute value type.
      */
-    private static final Hashtable OID_NAME_TABLE = new Hashtable(14);
+    private static final Hashtable<ObjectIdentifier, String> OID_NAME_TABLE = new Hashtable<ObjectIdentifier, String>(14);
     static { 
 	OID_NAME_TABLE.put(PKCS9_OIDS[1], EMAIL_ADDRESS_STR);
 	OID_NAME_TABLE.put(PKCS9_OIDS[2], UNSTRUCTURED_NAME_STR);
@@ -298,15 +298,13 @@ public class PKCS9Attribute implements DerEncoder {
      *
      * </TABLE>
      */
-    private static final Class[] VALUE_CLASSES = new Class[15];
+    private static final Class<?>[] VALUE_CLASSES = new Class[15];
 
     static {
 	try {
-	    Class str = Class.forName("[Ljava.lang.String;");
-
 	    VALUE_CLASSES[0] = null;  // not used
-	    VALUE_CLASSES[1] = str;   // EMailAddress
-	    VALUE_CLASSES[2] = str;   // UnstructuredName
+	    VALUE_CLASSES[1] = java.lang.String.class;   // EMailAddress
+	    VALUE_CLASSES[2] = java.lang.String.class;   // UnstructuredName
 	    VALUE_CLASSES[3] =        // ContentType
 		Class.forName("netscape.security.util.ObjectIdentifier");
 	    VALUE_CLASSES[4] = Class.forName("[B"); // MessageDigest (byte[])
@@ -315,7 +313,7 @@ public class PKCS9Attribute implements DerEncoder {
 		Class.forName("[Lnetscape.security.pkcs.SignerInfo;");
 	    VALUE_CLASSES[7] =        // ChallengePassword
 		Class.forName("java.lang.String");   
-	    VALUE_CLASSES[8] = str;   // UnstructuredAddress
+	    VALUE_CLASSES[8] = java.lang.String.class;   // UnstructuredAddress
 	    VALUE_CLASSES[9] = null;  // ExtendedCertificateAttributes
 
 	    VALUE_CLASSES[10] = null;   // IssuerAndSerialNumber
diff --git a/pki/base/util/src/netscape/security/provider/X509CertificateFactory.java b/pki/base/util/src/netscape/security/provider/X509CertificateFactory.java
index 22d253297d47d44f03714a3386e7bc2d3ce7906d..8e21350bd56ceb962867efe905cd03c8d364aaf5 100644
--- a/pki/base/util/src/netscape/security/provider/X509CertificateFactory.java
+++ b/pki/base/util/src/netscape/security/provider/X509CertificateFactory.java
@@ -35,7 +35,7 @@ public class X509CertificateFactory  extends CertificateFactorySpi {
 		throws CertificateException {
 		return new X509CertImpl(inStream);
 	}
-    public Collection engineGenerateCertificates(InputStream inStream)
+    public Collection<Certificate> engineGenerateCertificates(InputStream inStream)
 		throws CertificateException {
 		return null;
 	}
@@ -53,7 +53,7 @@ public class X509CertificateFactory  extends CertificateFactorySpi {
 		return crl;
 	}
 
-	public Collection engineGenerateCRLs(InputStream inStream)
+	public Collection<CRL> engineGenerateCRLs(InputStream inStream)
 		throws CRLException {
 		return null;
 	}
diff --git a/pki/base/util/src/netscape/security/util/CrlPrettyPrint.java b/pki/base/util/src/netscape/security/util/CrlPrettyPrint.java
index ba74a0d73a1c68183cff0624c886515d17d4b7fd..ade2142093f779186cd47772d3d5ec9a5f236b83 100644
--- a/pki/base/util/src/netscape/security/util/CrlPrettyPrint.java
+++ b/pki/base/util/src/netscape/security/util/CrlPrettyPrint.java
@@ -27,7 +27,7 @@ import java.util.TimeZone;
 
 import netscape.security.x509.CRLExtensions;
 import netscape.security.x509.Extension;
-import netscape.security.x509.RevokedCertImpl;
+import netscape.security.x509.RevokedCertificate;
 import netscape.security.x509.X509CRLImpl;
 
 
@@ -177,15 +177,14 @@ public class CrlPrettyPrint
                 }
                 sb.append("\n");
 
-                Set revokedCerts = mCRL.getRevokedCertificates();
+                Set<RevokedCertificate> revokedCerts = mCRL.getRevokedCertificates();
 
                 if (revokedCerts != null) {
-                    Iterator i = revokedCerts.iterator();
+                    Iterator<RevokedCertificate> i = revokedCerts.iterator();
                     long l = 1;
 
                     while ((i.hasNext()) && ((crlSize == 0) || (pageStart + pageSize > l))) {
-                        RevokedCertImpl revokedCert =
-                            (RevokedCertImpl) i.next();
+                        RevokedCertificate revokedCert = i.next();
 
                         if ((crlSize == 0) || ((pageStart <= l) && (pageStart + pageSize > l))) {
                             sb.append(pp.indent(16) + resource.getString(
diff --git a/pki/base/util/src/netscape/security/util/ExtPrettyPrint.java b/pki/base/util/src/netscape/security/util/ExtPrettyPrint.java
index 2e57eac17c3dc0ac8588db5bf18570e31882689c..0c62012d54c575a559459c4ee7515056e7e81257 100644
--- a/pki/base/util/src/netscape/security/util/ExtPrettyPrint.java
+++ b/pki/base/util/src/netscape/security/util/ExtPrettyPrint.java
@@ -506,7 +506,7 @@ public class ExtPrettyPrint {
             sb.append(pp.indent(mIndentSize + 4) + mResource.getString(
                     PrettyPrintResources.TOKEN_EXTENDED_KEY_USAGE) + "\n");
             ExtendedKeyUsageExtension usage = (ExtendedKeyUsageExtension) mExt;
-            Enumeration e = usage.getOIDs();
+            Enumeration<ObjectIdentifier> e = usage.getOIDs();
 
             if (e != null) {
                 while (e.hasMoreElements()) {
@@ -969,12 +969,12 @@ public class ExtPrettyPrint {
             sb.append(pp.indent(mIndentSize + 4) + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL));
             CertificateScopeOfUseExtension ext = (CertificateScopeOfUseExtension) mExt;
 
-            if (((Extension) mExt).isCritical()) {
+            if (mExt.isCritical()) {
                 sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + "\n");
             } else {
                 sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + "\n");
             }
-            Vector entries = ext.getCertificateScopeEntries();
+            Vector<CertificateScopeEntry> entries = ext.getCertificateScopeEntries();
 
             if (entries != null) {
                 sb.append(pp.indent(mIndentSize + 4) +
@@ -1466,7 +1466,7 @@ public class ExtPrettyPrint {
             }
 
             PolicyMappingsExtension ext = (PolicyMappingsExtension) mExt;
-            Enumeration maps = ext.getMappings();
+            Enumeration<CertificatePolicyMap> maps = ext.getMappings();
 
             sb.append(pp.indent(mIndentSize + 4) +
                 mResource.getString(PrettyPrintResources.TOKEN_MAPPINGS));
@@ -1522,7 +1522,7 @@ public class ExtPrettyPrint {
 
             sb.append(pp.indent(mIndentSize + 4) +
                 mResource.getString(PrettyPrintResources.TOKEN_ATTRIBUTES));
-            Enumeration attrs = ext.getAttributesList();
+            Enumeration<Attribute> attrs = ext.getAttributesList();
 
             if (attrs == null || !attrs.hasMoreElements()) {
                 sb.append(
@@ -1542,7 +1542,7 @@ public class ExtPrettyPrint {
                     sb.append(pp.indent(mIndentSize + 12) +
                         mResource.getString(
                             PrettyPrintResources.TOKEN_VALUES));
-                    Enumeration values = attr.getValues();
+                    Enumeration<String> values = attr.getValues();
 
                     if (values == null || !values.hasMoreElements()) {
                         sb.append(mResource.getString(
@@ -1585,12 +1585,13 @@ public class ExtPrettyPrint {
             sb.append(pp.indent(mIndentSize + 4) + mResource.getString(
                     PrettyPrintResources.TOKEN_CERT_POLICIES) + "\n");
             CertificatePoliciesExtension cp = (CertificatePoliciesExtension) mExt;
-            Vector cpv = (Vector) cp.get("infos");
-            Enumeration e = cpv.elements();
+            @SuppressWarnings("unchecked")
+			Vector<CertificatePolicyInfo> cpv = (Vector<CertificatePolicyInfo>) cp.get("infos");
+            Enumeration<CertificatePolicyInfo> e = cpv.elements();
 
             if (e != null) {
                 while (e.hasMoreElements()) {
-                    CertificatePolicyInfo cpi = (CertificatePolicyInfo) e.nextElement();
+                    CertificatePolicyInfo cpi = e.nextElement();
 
                     sb.append(pp.indent(mIndentSize + 8) + "Policy Identifier: " + cpi.getPolicyIdentifier().getIdentifier().toString() + "\n");
                     PolicyQualifiers cpq = cpi.getPolicyQualifiers();
diff --git a/pki/base/util/src/netscape/security/x509/ACertAttrSet.java b/pki/base/util/src/netscape/security/x509/ACertAttrSet.java
index b5ce1773ce0cac8264770978473accd2d796e386..098a5f2d8dc318369f883b592958115923b16fcd 100755
--- a/pki/base/util/src/netscape/security/x509/ACertAttrSet.java
+++ b/pki/base/util/src/netscape/security/x509/ACertAttrSet.java
@@ -125,7 +125,7 @@ public class ACertAttrSet implements CertAttrSet {
      * 
      * @return an enumeration of the attribute names.
      */
-    public Enumeration getElements() {
+    public Enumeration<String> getAttributeNames() {
 		return null;
 	}
  
diff --git a/pki/base/util/src/netscape/security/x509/AuthorityKeyIdentifierExtension.java b/pki/base/util/src/netscape/security/x509/AuthorityKeyIdentifierExtension.java
index c0eff9b345f9ac27afed4141b06e85aaec261fb7..6e330f8a4a0eae33e0981f243e4f2d645bc5d8bd 100644
--- a/pki/base/util/src/netscape/security/x509/AuthorityKeyIdentifierExtension.java
+++ b/pki/base/util/src/netscape/security/x509/AuthorityKeyIdentifierExtension.java
@@ -66,7 +66,6 @@ implements CertAttrSet {
     /**
      * Attribute names.
      */
-    public static final String NAME = "AuthorityKeyIdentifier";
     public static final String KEY_ID = "key_id";
     public static final String AUTH_NAME = "auth_name";
     public static final String SERIAL_NUMBER = "serial_number";
@@ -321,7 +320,7 @@ implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements () {
+    public Enumeration<String> getAttributeNames () {
         Vector<String> elements = new Vector<String>();
         elements.addElement(KEY_ID);
         elements.addElement(AUTH_NAME);
@@ -330,10 +329,4 @@ implements CertAttrSet {
 	return (elements.elements());
     }
 
-    /**
-     * Return the name of this attribute.
-     */
-    public String getName () {
-        return (NAME);
-    }
 }
diff --git a/pki/base/util/src/netscape/security/x509/BasicConstraintsExtension.java b/pki/base/util/src/netscape/security/x509/BasicConstraintsExtension.java
index 7314c2ac038dbd6e94ff91e2b504476681806678..a92625a8736f55a5435ffa4f5e8802b4012055e6 100644
--- a/pki/base/util/src/netscape/security/x509/BasicConstraintsExtension.java
+++ b/pki/base/util/src/netscape/security/x509/BasicConstraintsExtension.java
@@ -62,7 +62,6 @@ implements CertAttrSet {
     /**
      * Attribute names.
      */
-    public static final String NAME = "BasicConstraints";
     public static final String IS_CA = "is_ca";
     public static final String PATH_LEN = "path_len";
 
@@ -277,7 +276,7 @@ implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(IS_CA);
         elements.addElement(PATH_LEN);
@@ -285,10 +284,4 @@ implements CertAttrSet {
 	return (elements.elements());
     }
 
-    /**
-     * Return the name of this attribute.
-     */
-    public String getName() {
-        return (NAME);
-    }
 }
diff --git a/pki/base/util/src/netscape/security/x509/CRLDistributionPointsExtension.java b/pki/base/util/src/netscape/security/x509/CRLDistributionPointsExtension.java
index aa8c20b822a511ba97d3159e49b6283d219de9ff..812d2e76f1271afe3e193d3bfd542a2401d422dd 100644
--- a/pki/base/util/src/netscape/security/x509/CRLDistributionPointsExtension.java
+++ b/pki/base/util/src/netscape/security/x509/CRLDistributionPointsExtension.java
@@ -177,17 +177,16 @@ public class CRLDistributionPointsExtension extends Extension
     // because it is so complicated. Therefore, we only provide a
     // minimal implementation.
     /////////////////////////////////////////////////////////////
-    public static final String NAME = "CRLDistributionPoints";
 
      static {
          try {
             OIDMap.addAttribute(CRLDistributionPointsExtension.class.getName(),
-                                OID, NAME);
+                                OID, CRLDistributionPointsExtension.class.getSimpleName());
         } catch (CertificateException e) {}
     }
 
     public String toString() {
-        return NAME;
+        return this.getClass().getSimpleName();
     }
 
     /**
@@ -231,15 +230,14 @@ public class CRLDistributionPointsExtension extends Extension
         throw new IOException("Attribute name not recognized by " + 
             "CertAttrSet:CRLDistributionPointsExtension");
     }
-
-    public Enumeration getElements() {
-        return (new Vector()).elements();
+    /*
+     *	TODO use an empty collection to generate these 
+     */
+    public Enumeration<String> getAttributeNames() {
+        return (new Vector<String>()).elements();
     }
 
 
-    public String getName() {
-        return NAME;
-    }
 
     /**
      * Test driver.
@@ -319,11 +317,11 @@ public class CRLDistributionPointsExtension extends Extension
 		    list.addElement(this);
         }
 
-        private static Hashtable map = new Hashtable();
-	    private static Vector list = new Vector();
+        private static Hashtable<String, Reason> map = new Hashtable<String, Reason>();
+	    private static Vector<Reason> list = new Vector<Reason>();
 
         public static Reason fromString(String name) {
-            return (Reason) map.get(name);
+            return  map.get(name);
         }
 
         public String getName() {
@@ -359,9 +357,9 @@ public class CRLDistributionPointsExtension extends Extension
 	    public static Reason[] bitArrayToReasonArray(byte[] bitFlags) {
 		    byte first = bitFlags[0];
 		    int size = list.size();
-		    Vector result = new Vector();
+		    Vector<Reason> result = new Vector<Reason>();
 		    for(int i = 0; i < size; i++) {
-			    Reason r = (Reason) list.elementAt(i);
+			    Reason r =  list.elementAt(i);
 			    byte b = r.getBitMask();
 			    if( (first & b) != 0 ) {
 				    result.addElement(r);
@@ -370,7 +368,7 @@ public class CRLDistributionPointsExtension extends Extension
 		    size = result.size();
 		    Reason[] retval = new Reason[size];
 		    for(int i=0; i < size; i++) {
-			    retval[i] = (Reason) result.elementAt(i);
+			    retval[i] =  result.elementAt(i);
 		    }
 		    return retval;
 	    }
diff --git a/pki/base/util/src/netscape/security/x509/CRLNumberExtension.java b/pki/base/util/src/netscape/security/x509/CRLNumberExtension.java
index 67baf106b6c8db99689dcb7a9104ddbeeae405ae..8376662fd856ec672698b6c09f07867569024a08 100755
--- a/pki/base/util/src/netscape/security/x509/CRLNumberExtension.java
+++ b/pki/base/util/src/netscape/security/x509/CRLNumberExtension.java
@@ -53,7 +53,6 @@ implements CertAttrSet {
     /**
      * Attribute name.
      */
-    public static final String NAME = "CRLNumber";
     public static final String NUMBER = "value";
 
     private BigInt crlNumber = null;
@@ -210,16 +209,10 @@ implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements () {
+    public Enumeration<String> getAttributeNames () {
         Vector<String> elements = new Vector<String>();
         elements.addElement(NUMBER);
 	return (elements.elements());
     }
 
-    /**
-     * Return the name of this attribute.
-     */
-    public String getName () {
-        return (NAME);
     }
-}
diff --git a/pki/base/util/src/netscape/security/x509/CRLReasonExtension.java b/pki/base/util/src/netscape/security/x509/CRLReasonExtension.java
index 8f10ac6abc35854722b13fd2ebd9995902140d63..363e54bfb0c9b9db19cd0cedf0f20d590b2e1ae9 100644
--- a/pki/base/util/src/netscape/security/x509/CRLReasonExtension.java
+++ b/pki/base/util/src/netscape/security/x509/CRLReasonExtension.java
@@ -61,7 +61,6 @@ public final class CRLReasonExtension  extends Extension implements CertAttrSet
     /**
      * Attribute names.
      */
-	public static final String NAME = "CRLReason";
 	public static final String REASON = "value";
 
     private RevocationReason mReason = null;
@@ -206,19 +205,13 @@ public final class CRLReasonExtension  extends Extension implements CertAttrSet
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements () {
+    public Enumeration<String> getAttributeNames () {
         Vector<String> elements = new Vector<String>();
         elements.addElement(REASON);
 
 	return (elements.elements());
     }
 
-    /**
-     * Return the name of this attribute.
-     */
-    public String getName () {
-        return (NAME);
-    }
 
 	public boolean equals(Object other) {
 		if (this == other)
diff --git a/pki/base/util/src/netscape/security/x509/CertAttrSet.java b/pki/base/util/src/netscape/security/x509/CertAttrSet.java
index 53401132fa8a3234fe733530f579927d212db766..4b9352c6497d36abace8abed72d3e850580aeb1d 100755
--- a/pki/base/util/src/netscape/security/x509/CertAttrSet.java
+++ b/pki/base/util/src/netscape/security/x509/CertAttrSet.java
@@ -111,8 +111,9 @@ public interface CertAttrSet {
      * 
      * @return an enumeration of the attribute names.
      */
-    Enumeration getElements();
+    Enumeration<String> getAttributeNames();
  
+        
     /**
      * Returns the name (identifier) of this CertAttrSet.
      * 
diff --git a/pki/base/util/src/netscape/security/x509/CertificateAlgorithmId.java b/pki/base/util/src/netscape/security/x509/CertificateAlgorithmId.java
index 48fcb454dab8afa2a8d1bf74161053b327c91e6b..676df900701c27819c8b8ecc6a9cabc3ddb20e7f 100644
--- a/pki/base/util/src/netscape/security/x509/CertificateAlgorithmId.java
+++ b/pki/base/util/src/netscape/security/x509/CertificateAlgorithmId.java
@@ -173,7 +173,7 @@ public class CertificateAlgorithmId implements CertAttrSet, Serializable {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(ALGORITHM);
         return (elements.elements());
diff --git a/pki/base/util/src/netscape/security/x509/CertificateExtensions.java b/pki/base/util/src/netscape/security/x509/CertificateExtensions.java
index 1f616d67293805f80b5785ad42936935d7343342..6075715aef02a74271aa71456e93f0c1f419859d 100644
--- a/pki/base/util/src/netscape/security/x509/CertificateExtensions.java
+++ b/pki/base/util/src/netscape/security/x509/CertificateExtensions.java
@@ -43,7 +43,7 @@ import netscape.security.util.DerValue;
  * @version 1.11
  * @see CertAttrSet
  */
-public class CertificateExtensions extends Vector
+public class CertificateExtensions extends Vector<Extension>
 implements CertAttrSet, Serializable {
     /**
      *
@@ -59,12 +59,13 @@ implements CertAttrSet, Serializable {
      */
     public static final String NAME = "extensions";
 
-    private Hashtable<String, Object> map;
+    private Hashtable<String, Extension> map;
 
     // Parse the encoded extension
     public void parseExtension(Extension ext) throws IOException {
         try {
-            Class extClass = OIDMap.getClass(ext.getExtensionId());
+            @SuppressWarnings("unchecked")
+			Class<Extension> extClass = (Class<Extension>) OIDMap.getClass(ext.getExtensionId());
             if (extClass == null) {   // Unsupported extension
                 if (ext.isCritical()) {
                     throw new IOException("Unsupported CRITICAL extension: "
@@ -75,8 +76,8 @@ implements CertAttrSet, Serializable {
                     return;
                 }
             }
-            Class[] params = {Boolean.class, Object.class};
-            Constructor cons = extClass.getConstructor(params);
+            Class<?>[] params = {Boolean.class, Object.class};
+            Constructor<Extension> cons = extClass.getConstructor(params);
 
             byte[] extData = ext.getExtensionValue();
             int extLen = extData.length;
@@ -87,7 +88,7 @@ implements CertAttrSet, Serializable {
             }
             Object[] passed = new Object[]{new Boolean(ext.isCritical()),
                     value};
-            CertAttrSet certExt = (CertAttrSet) cons.newInstance(passed);
+            Extension certExt = cons.newInstance(passed);
             if (certExt != null && certExt.getName() != null) {
                 map.put(certExt.getName(), (Extension) certExt);
                 addElement((Extension) certExt);
@@ -105,7 +106,7 @@ implements CertAttrSet, Serializable {
      * Default constructor for the certificate attribute.
      */
     public CertificateExtensions() {
-        map = new Hashtable();
+        map = new Hashtable<String, Extension> ();
     }
 
     /**
@@ -117,7 +118,7 @@ implements CertAttrSet, Serializable {
     public CertificateExtensions(DerInputStream in)
         throws IOException {
 
-        map = new Hashtable();
+        map = new Hashtable<String, Extension>();
         DerValue[] exts = in.getSequence(5);
 
         for (int i = 0; i < exts.length; i++) {
@@ -136,7 +137,7 @@ implements CertAttrSet, Serializable {
         DerValue val = new DerValue(in);
         DerInputStream str = val.toDerInputStream();
 
-        map = new Hashtable();
+        map = new Hashtable<String, Extension>();
         DerValue[] exts = str.getSequence(5);
 
         for (int i = 0; i < exts.length; i++) {
@@ -160,7 +161,7 @@ implements CertAttrSet, Serializable {
 	  str = val.toDerInputStream();
         }
 
-        map = new Hashtable();
+        map = new Hashtable<String, Extension>();
         DerValue[] exts = str.getSequence(5);
 
         for (int i = 0; i < exts.length; i++) {
@@ -216,8 +217,8 @@ implements CertAttrSet, Serializable {
      * @exception IOException if the object could not be cached.
      */
     public void set(String name, Object obj) throws IOException {
-        map.put(name,obj);
-        addElement(obj);
+        map.put(name,(Extension) obj);
+        addElement((Extension) obj);
     }
 
     /**
@@ -247,7 +248,7 @@ implements CertAttrSet, Serializable {
         removeElement(obj);
     }
 
-    public Enumeration getNames()
+    public Enumeration<String> getNames()
     {
 	return map.keys();
     }
@@ -256,10 +257,15 @@ implements CertAttrSet, Serializable {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration getElements () {
+    public Enumeration<Extension> getAttributes() {
         return (map.elements());
     }
 
+    
+    public Enumeration<String> getAttributeNames () {
+        return (map.keys());
+    }
+    
     /**
      * Return the name of this attribute.
      */
diff --git a/pki/base/util/src/netscape/security/x509/CertificateIssuerExtension.java b/pki/base/util/src/netscape/security/x509/CertificateIssuerExtension.java
index 73d9c1d1122ad6c32ace4bf239ed8a2ce6621c57..55f21d2a12c87d299cd2da3ec360aca785fc2959 100644
--- a/pki/base/util/src/netscape/security/x509/CertificateIssuerExtension.java
+++ b/pki/base/util/src/netscape/security/x509/CertificateIssuerExtension.java
@@ -51,7 +51,6 @@ public class CertificateIssuerExtension extends Extension
     /**
      * Attribute name.
      */
-    public static final String NAME = "CertificateIssuer";
     public static final String CERTIFICATE_ISSUER = "value";
 
     /**
@@ -65,7 +64,7 @@ public class CertificateIssuerExtension extends Extension
     static {
         try {
             OIDMap.addAttribute(CertificateIssuerExtension.class.getName(),
-                                OID, NAME);
+                                OID, CertificateIssuerExtension.class.getSimpleName());
         } catch (CertificateException e) {}
     }
 
@@ -231,18 +230,12 @@ public class CertificateIssuerExtension extends Extension
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(CERTIFICATE_ISSUER);
 
         return (elements.elements());
     }
 
-    /**
-     * Return the name of this attribute.
-     */
-    public String getName() {
-        return (NAME);
-    }
 }
 
diff --git a/pki/base/util/src/netscape/security/x509/CertificateIssuerName.java b/pki/base/util/src/netscape/security/x509/CertificateIssuerName.java
index 22d05d075c945365f357ffe953c1b8594d725d8f..47c44ed4f794b0c985f418e13dcf790866d382fe 100644
--- a/pki/base/util/src/netscape/security/x509/CertificateIssuerName.java
+++ b/pki/base/util/src/netscape/security/x509/CertificateIssuerName.java
@@ -155,7 +155,7 @@ public class CertificateIssuerName implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(DN_NAME);
 
diff --git a/pki/base/util/src/netscape/security/x509/CertificateIssuerUniqueIdentity.java b/pki/base/util/src/netscape/security/x509/CertificateIssuerUniqueIdentity.java
index 687aedb456f26666017df55bd2c9124f9ec3bcd2..52baa621b588fb49bf502d674f3bbb5de8c8f650 100644
--- a/pki/base/util/src/netscape/security/x509/CertificateIssuerUniqueIdentity.java
+++ b/pki/base/util/src/netscape/security/x509/CertificateIssuerUniqueIdentity.java
@@ -168,7 +168,7 @@ public class CertificateIssuerUniqueIdentity implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(ID);
 
diff --git a/pki/base/util/src/netscape/security/x509/CertificatePoliciesExtension.java b/pki/base/util/src/netscape/security/x509/CertificatePoliciesExtension.java
index 106cc4500f835ac9406e86e2599cb6bec0b9540e..19a986b3791ca8a78ed555f697efcfdd067c602e 100644
--- a/pki/base/util/src/netscape/security/x509/CertificatePoliciesExtension.java
+++ b/pki/base/util/src/netscape/security/x509/CertificatePoliciesExtension.java
@@ -21,6 +21,8 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.lang.reflect.Array;
+import java.util.Arrays;
+import java.util.Collections;
 import java.util.Enumeration;
 import java.util.Vector;
 
@@ -65,12 +67,11 @@ implements CertAttrSet {
     /**
      * Attribute names.
      */
-    public static final String NAME = "CertificatePolicies";
     public static final String INFOS = "infos"; 
 
 
     // Private data members 
-    private Vector mInfos;
+    private Vector<CertificatePolicyInfo> mInfos;
  
     // Encode this extension value
     private void encodeThis() throws IOException {
@@ -84,7 +85,7 @@ implements CertAttrSet {
         extensionValue = os.toByteArray();
     }
 
-    public CertificatePoliciesExtension(boolean critical, Vector infos) throws IOException {
+    public CertificatePoliciesExtension(boolean critical, Vector<CertificatePolicyInfo> infos) throws IOException {
         this.mInfos = infos;
         this.extensionId = PKIXExtensions.CertificatePolicies_Id;
         this.critical = critical;
@@ -96,7 +97,7 @@ implements CertAttrSet {
      *
      * @param infos the Vector of CertificatePolicyInfo.
      */
-    public CertificatePoliciesExtension(Vector infos) throws IOException {
+    public CertificatePoliciesExtension(Vector<CertificatePolicyInfo> infos) throws IOException {
         this.mInfos = infos;
         this.extensionId = PKIXExtensions.CertificatePolicies_Id;
         this.critical = false;
@@ -109,7 +110,7 @@ implements CertAttrSet {
 	public CertificatePoliciesExtension() {
         this.extensionId = PKIXExtensions.CertificatePolicies_Id; 
         critical = false;
-        mInfos  = new Vector(1,1);
+        mInfos  = new Vector<CertificatePolicyInfo>(1,1);
     }
 
     /**
@@ -135,7 +136,7 @@ implements CertAttrSet {
             throw new IOException("Invalid encoding for " +
                                   "CertificatePoliciesExtension.");
         }
-        mInfos = new Vector(1, 1);
+        mInfos = new Vector<CertificatePolicyInfo>(1, 1);
         while (val.data.available() != 0) {
             DerValue seq = val.data.getDerValue();
             CertificatePolicyInfo info = new CertificatePolicyInfo(seq);
@@ -184,14 +185,15 @@ implements CertAttrSet {
     /**
      * Set the attribute value.
      */
-    public void set(String name, Object obj) throws IOException {
+    @SuppressWarnings("unchecked")
+	public void set(String name, Object obj) throws IOException {
         clearValue();
         if (name.equalsIgnoreCase(INFOS)) {
             if (!(obj instanceof Vector)) {
               throw new IOException("Attribute value should be of" +
                                     " type Vector.");
             }
-            mInfos = (Vector)obj;
+            mInfos = (Vector<CertificatePolicyInfo>)obj;
         } else {
           throw new IOException("Attribute name not recognized by " +
                         "CertAttrSet:CertificatePoliciesExtension.");
@@ -223,22 +225,23 @@ implements CertAttrSet {
     }
  
     /**
-     * Return an enumeration of names of attributes existing within this
+     * Return an enumeration of attributes existing within this
      * attribute.
      */
-    public Enumeration getElements () {
-        Vector elements = new Vector();
+    public Enumeration<Vector<CertificatePolicyInfo>> getAttributes() {
+        Vector<Vector<CertificatePolicyInfo>> elements = new Vector<Vector<CertificatePolicyInfo>>();
         elements.addElement(mInfos);
         return (elements.elements());
     }
  
-    /**
-     * Return the name of this attribute.
-     */
-    public String getName () {
-        return (NAME);
-    }
-
+    private static final String[] NAMES = {INFOS};
+    @Override
+	public Enumeration<String> getAttributeNames() {
+		// TODO Auto-generated method stub
+		return Collections.enumeration(Arrays.asList(NAMES));
+	}
+    
+    
     	public static void main(String args[])
 	{
 
@@ -312,7 +315,7 @@ implements CertAttrSet {
 		qualifiers1.add(qualifierInfo1);
 		CertificatePolicyInfo info1 = new CertificatePolicyInfo(
 			plcyId1, qualifiers1);
-		Vector infos = new Vector();
+		Vector<CertificatePolicyInfo> infos = new Vector<CertificatePolicyInfo>();
 		infos.addElement(info0);
 		infos.addElement(info1);
 		try {
@@ -325,4 +328,6 @@ implements CertAttrSet {
 			System.out.println(e.toString());
 		}
 	}
+
+		
 }
diff --git a/pki/base/util/src/netscape/security/x509/CertificateSerialNumber.java b/pki/base/util/src/netscape/security/x509/CertificateSerialNumber.java
index eeebb873b6f34c4ea0ba692c53c7280655c7bd70..a73a9ec26e7e76c30e6728058cb93f2f835986ff 100644
--- a/pki/base/util/src/netscape/security/x509/CertificateSerialNumber.java
+++ b/pki/base/util/src/netscape/security/x509/CertificateSerialNumber.java
@@ -174,7 +174,7 @@ public class CertificateSerialNumber implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(NUMBER);
  
diff --git a/pki/base/util/src/netscape/security/x509/CertificateSubjectName.java b/pki/base/util/src/netscape/security/x509/CertificateSubjectName.java
index a4dac169767312f1967fb9b13c94fd99a66df490..e9c558efbf9ef71938b688d8f7f312b635ac2e94 100644
--- a/pki/base/util/src/netscape/security/x509/CertificateSubjectName.java
+++ b/pki/base/util/src/netscape/security/x509/CertificateSubjectName.java
@@ -186,7 +186,7 @@ public class CertificateSubjectName implements CertAttrSet, Serializable {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(DN_NAME);
 
diff --git a/pki/base/util/src/netscape/security/x509/CertificateSubjectUniqueIdentity.java b/pki/base/util/src/netscape/security/x509/CertificateSubjectUniqueIdentity.java
index c214546a310738ccd017e4b4e574a272302ee2c5..7a3294cb374db0e318ae195e6cc2db5611b2c0f5 100644
--- a/pki/base/util/src/netscape/security/x509/CertificateSubjectUniqueIdentity.java
+++ b/pki/base/util/src/netscape/security/x509/CertificateSubjectUniqueIdentity.java
@@ -168,7 +168,7 @@ public class CertificateSubjectUniqueIdentity implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(ID);
   
diff --git a/pki/base/util/src/netscape/security/x509/CertificateValidity.java b/pki/base/util/src/netscape/security/x509/CertificateValidity.java
index e0b26428234ffdc027b95abdf9df33e855a7e55f..8188e8b3d74bf149e5168e0fc86733bafe5f40ee 100644
--- a/pki/base/util/src/netscape/security/x509/CertificateValidity.java
+++ b/pki/base/util/src/netscape/security/x509/CertificateValidity.java
@@ -246,7 +246,7 @@ public class CertificateValidity implements CertAttrSet, Serializable {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(NOT_BEFORE);
         elements.addElement(NOT_AFTER);
diff --git a/pki/base/util/src/netscape/security/x509/CertificateVersion.java b/pki/base/util/src/netscape/security/x509/CertificateVersion.java
index d35a012ea9f851d630406d54055fe58d6a3ab031..951509c772bf03fc5a710237481d3a9bc337ce5b 100644
--- a/pki/base/util/src/netscape/security/x509/CertificateVersion.java
+++ b/pki/base/util/src/netscape/security/x509/CertificateVersion.java
@@ -224,7 +224,7 @@ public class CertificateVersion implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(VERSION);
 
diff --git a/pki/base/util/src/netscape/security/x509/CertificateX509Key.java b/pki/base/util/src/netscape/security/x509/CertificateX509Key.java
index cf888eea57a058b6de412dbf776efec574a51c44..f3507a14c3b74c5a33272313928c059f8dce9f22 100644
--- a/pki/base/util/src/netscape/security/x509/CertificateX509Key.java
+++ b/pki/base/util/src/netscape/security/x509/CertificateX509Key.java
@@ -173,7 +173,7 @@ public class CertificateX509Key implements CertAttrSet, Serializable {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(KEY);
 
diff --git a/pki/base/util/src/netscape/security/x509/DeltaCRLIndicatorExtension.java b/pki/base/util/src/netscape/security/x509/DeltaCRLIndicatorExtension.java
index 96f7167c64acdf26fcc19c9f176e3f6dd3409272..5a56547ab1359686acef50e6f28fc5f6f7f0264e 100755
--- a/pki/base/util/src/netscape/security/x509/DeltaCRLIndicatorExtension.java
+++ b/pki/base/util/src/netscape/security/x509/DeltaCRLIndicatorExtension.java
@@ -53,7 +53,6 @@ implements CertAttrSet {
     /**
      * Attribute name.
      */
-    public static final String NAME = "DeltaCRLIndicator";
     public static final String NUMBER = "value";
 
     /**
@@ -66,7 +65,7 @@ implements CertAttrSet {
     static {
         try {
             OIDMap.addAttribute(DeltaCRLIndicatorExtension.class.getName(),
-                                OID, NAME);
+                                OID, DeltaCRLIndicatorExtension.class.getSimpleName());
         } catch (CertificateException e) {}
     }
 
@@ -223,17 +222,11 @@ implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements () {
+    public Enumeration<String> getAttributeNames () {
         Vector<String> elements = new Vector<String>();
         elements.addElement(NUMBER);
         return (elements.elements());
     }
 
-    /**
-     * Return the name of this attribute.
-     */
-    public String getName () {
-        return (NAME);
-    }
 }
 
diff --git a/pki/base/util/src/netscape/security/x509/Extension.java b/pki/base/util/src/netscape/security/x509/Extension.java
index e52a0be70320fef8dbc366d58b9308528f7ff232..431a60f68fa4c3734dfb37cad094af5d8288c3eb 100644
--- a/pki/base/util/src/netscape/security/x509/Extension.java
+++ b/pki/base/util/src/netscape/security/x509/Extension.java
@@ -195,4 +195,9 @@ public class Extension implements Serializable {
         }
         return (s);
     }
+    
+    public final String getName(){
+    	return this.getClass().getSimpleName();
+    }
+    
 }
diff --git a/pki/base/util/src/netscape/security/x509/Extensions.java b/pki/base/util/src/netscape/security/x509/Extensions.java
index 1e728a0a8251848b5a402c6990a2f5838c85f31f..328f4a2ed8781752629e6f486a613f0baa9a2e6b 100644
--- a/pki/base/util/src/netscape/security/x509/Extensions.java
+++ b/pki/base/util/src/netscape/security/x509/Extensions.java
@@ -40,7 +40,7 @@ import netscape.security.util.DerValue;
  * @version 1.11
  * @see CertAttrSet
  */
-public class Extensions extends Vector
+public class Extensions extends Vector<Extension>
 implements CertAttrSet {
     /**
      *
@@ -56,12 +56,13 @@ implements CertAttrSet {
      */
     public static final String NAME = "extensions";
 
-    private Hashtable map;
+    private Hashtable<String, Extension> map;
 
     // Parse the encoded extension
     public void parseExtension(Extension ext) throws IOException {
         try {
-            Class extClass = OIDMap.getClass(ext.getExtensionId());
+            @SuppressWarnings("unchecked")
+			Class<Extension> extClass = (Class<Extension>) OIDMap.getClass(ext.getExtensionId());
             if (extClass == null) {   // Unsupported extension
                 if (ext.isCritical()) {
                     throw new IOException("Unsupported CRITICAL extension: "
@@ -72,8 +73,8 @@ implements CertAttrSet {
                     return;
                 }
             }
-            Class[] params = { Boolean.class, Object.class };
-            Constructor cons = extClass.getConstructor(params);
+            Class<?>[] params = { Boolean.class, Object.class };
+            Constructor<Extension> cons = extClass.getConstructor(params);
 
             byte[] extData = ext.getExtensionValue();
             int extLen = extData.length;
@@ -84,7 +85,7 @@ implements CertAttrSet {
 	    }
 	    Object[] passed = new Object[] {new Boolean(ext.isCritical()),
                                                         value};
-            CertAttrSet certExt = (CertAttrSet)cons.newInstance(passed);
+            Extension certExt = cons.newInstance(passed);
 	    map.put(certExt.getName(), certExt);
             addElement(certExt);
 
@@ -101,7 +102,7 @@ implements CertAttrSet {
      * Default constructor for the certificate attribute.
      */
     public Extensions() {
-        map = new Hashtable();
+        map = new Hashtable<String, Extension>();
     }
 
     /**
@@ -113,7 +114,7 @@ implements CertAttrSet {
     public Extensions(DerInputStream in)
         throws IOException {
 
-        map = new Hashtable();
+        map = new Hashtable<String, Extension>();
         DerValue[] exts = in.getSequence(5);
 
         for (int i = 0; i < exts.length; i++) {
@@ -132,7 +133,7 @@ implements CertAttrSet {
         DerValue val = new DerValue(in);
         DerInputStream str = val.toDerInputStream();
 
-        map = new Hashtable();
+        map = new Hashtable<String, Extension>();
         DerValue[] exts = str.getSequence(5);
 
         for (int i = 0; i < exts.length; i++) {
@@ -175,8 +176,8 @@ implements CertAttrSet {
      * @exception IOException if the object could not be cached.
      */
     public void set(String name, Object obj) throws IOException {
-        map.put(name,obj);
-        addElement(obj);
+        map.put(name,(Extension) obj);
+        addElement((Extension) obj);
     }
 
     /**
@@ -210,14 +211,14 @@ implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration getElements () {
-        return (map.elements());
+    public Enumeration<String> getAttributeNames () {
+        return map.keys();
     }
 
     /**
      * Return the name of this attribute.
      */
     public String getName () {
-        return (NAME);
+        return getClass().getSimpleName();
     }
 }
diff --git a/pki/base/util/src/netscape/security/x509/FreshestCRLExtension.java b/pki/base/util/src/netscape/security/x509/FreshestCRLExtension.java
index ac8e2504fcbdac80db644dfeaff82a6160bdc213..51ebe030983a6a7296400bb8e973689422e0a9e5 100644
--- a/pki/base/util/src/netscape/security/x509/FreshestCRLExtension.java
+++ b/pki/base/util/src/netscape/security/x509/FreshestCRLExtension.java
@@ -81,8 +81,6 @@ public class FreshestCRLExtension extends Extension
     // Cached DER-encoding to improve performance.
     private byte[] cachedEncoding=null;
 
-    // Attribute name
-    public static final String NAME = "FreshestCRL";
 
     // The Object Identifier for this extension.
     public static final String OID = "2.5.29.46";
@@ -90,7 +88,7 @@ public class FreshestCRLExtension extends Extension
     static {
         try {
             OIDMap.addAttribute(FreshestCRLExtension.class.getName(),
-                                OID, NAME);
+                                OID, FreshestCRLExtension.class.getSimpleName());
         } catch (CertificateException e) {}
     }
 
@@ -192,7 +190,7 @@ public class FreshestCRLExtension extends Extension
     // minimal implementation.
     /////////////////////////////////////////////////////////////
     public String toString() {
-        return NAME;
+        return FreshestCRLExtension.class.getSimpleName();
     }
 
     /**
@@ -237,15 +235,14 @@ public class FreshestCRLExtension extends Extension
             "CertAttrSet:FreshestCRLExtension");
     }
 
-    public Enumeration getElements() {
-        return (new Vector()).elements();
+    /*
+     * TODO replacewith empty collection
+     */
+    public Enumeration<String> getAttributeNames() {
+        return (new Vector<String>()).elements();
     }
 
 
-    public String getName() {
-        return NAME;
-    }
-
     /**
      * Test driver.
      */
@@ -324,11 +321,11 @@ public class FreshestCRLExtension extends Extension
 		    list.addElement(this);
         }
 
-        private static Hashtable map = new Hashtable();
-	    private static Vector list = new Vector();
+        private static Hashtable<String, Reason> map = new Hashtable<String, Reason>();
+	    private static Vector<Reason> list = new Vector<Reason>();
 
         public static Reason fromString(String name) {
-            return (Reason) map.get(name);
+            return  map.get(name);
         }
 
         public String getName() {
@@ -364,7 +361,7 @@ public class FreshestCRLExtension extends Extension
 	    public static Reason[] bitArrayToReasonArray(byte[] bitFlags) {
 		    byte first = bitFlags[0];
 		    int size = list.size();
-		    Vector result = new Vector();
+		    Vector<Reason> result = new Vector<Reason>();
 		    for(int i = 0; i < size; i++) {
 			    Reason r = (Reason) list.elementAt(i);
 			    byte b = r.getBitMask();
@@ -375,7 +372,7 @@ public class FreshestCRLExtension extends Extension
 		    size = result.size();
 		    Reason[] retval = new Reason[size];
 		    for(int i=0; i < size; i++) {
-			    retval[i] = (Reason) result.elementAt(i);
+			    retval[i] = result.elementAt(i);
 		    }
 		    return retval;
 	    }
diff --git a/pki/base/util/src/netscape/security/x509/HoldInstructionExtension.java b/pki/base/util/src/netscape/security/x509/HoldInstructionExtension.java
index ee93e4bece87d5cc0549f0bfc1c32cf4142ffea4..7f996250d90602d39d4f23a9dff21f10f2d84e38 100644
--- a/pki/base/util/src/netscape/security/x509/HoldInstructionExtension.java
+++ b/pki/base/util/src/netscape/security/x509/HoldInstructionExtension.java
@@ -54,7 +54,6 @@ implements CertAttrSet {
     /**
      * Attribute name.
      */
-    public static final String NAME = "HoldInstruction";
     public static final String HOLD_INSTRUCTION = "value";
 
     /**
@@ -90,7 +89,7 @@ implements CertAttrSet {
     static {
         try {
             OIDMap.addAttribute(HoldInstructionExtension.class.getName(),
-                                OID, NAME);
+                                OID, HoldInstructionExtension.class.getSimpleName());
         } catch (CertificateException e) {}
     }
 
@@ -351,17 +350,11 @@ implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements () {
+    public Enumeration<String> getAttributeNames () {
         Vector<String> elements = new Vector<String>();
         elements.addElement(HOLD_INSTRUCTION);
         return (elements.elements());
     }
 
-    /**
-     * Return the name of this attribute.
-     */
-    public String getName () {
-        return (NAME);
-    }
 }
 
diff --git a/pki/base/util/src/netscape/security/x509/InvalidityDateExtension.java b/pki/base/util/src/netscape/security/x509/InvalidityDateExtension.java
index cb568c7fa757965e5d94e632e391b9c8d2c1d20a..30909664a51bdb200e1295d8625012c74ab9999e 100755
--- a/pki/base/util/src/netscape/security/x509/InvalidityDateExtension.java
+++ b/pki/base/util/src/netscape/security/x509/InvalidityDateExtension.java
@@ -54,7 +54,6 @@ implements CertAttrSet {
     /**
      * Attribute name.
      */
-    public static final String NAME = "InvalidityDate";
     public static final String INVALIDITY_DATE = "value";
 
     /**
@@ -68,7 +67,7 @@ implements CertAttrSet {
     static {
         try {
             OIDMap.addAttribute(InvalidityDateExtension.class.getName(),
-                                OID, NAME);
+                                OID, InvalidityDateExtension.class.getSimpleName());
         } catch (CertificateException e) {}
     }
 
@@ -230,17 +229,11 @@ implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements () {
+    public Enumeration<String> getAttributeNames () {
         Vector<String> elements = new Vector<String>();
         elements.addElement(INVALIDITY_DATE);
         return (elements.elements());
     }
 
-    /**
-     * Return the name of this attribute.
-     */
-    public String getName () {
-        return (NAME);
-    }
 }
 
diff --git a/pki/base/util/src/netscape/security/x509/IssuerAlternativeNameExtension.java b/pki/base/util/src/netscape/security/x509/IssuerAlternativeNameExtension.java
index dd599ca6fa468c677e8dd4b669761ed2ac31cb08..eeb05c9136fa2e76a5378065df871e128dc025ea 100644
--- a/pki/base/util/src/netscape/security/x509/IssuerAlternativeNameExtension.java
+++ b/pki/base/util/src/netscape/security/x509/IssuerAlternativeNameExtension.java
@@ -59,7 +59,6 @@ extends Extension implements CertAttrSet {
     /**
      * Attribute names.
      */
-    public static final String NAME = "IssuerAlternativeName";
     public static final String ISSUER_NAME = "issuer_name";
 
     // private data members
@@ -223,17 +222,11 @@ extends Extension implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(ISSUER_NAME);
 
 	return (elements.elements());
     }
 
-    /**
-     * Return the name of this attribute.
-     */
-    public String getName() {
-        return (NAME);
-    }
 }
diff --git a/pki/base/util/src/netscape/security/x509/IssuingDistributionPointExtension.java b/pki/base/util/src/netscape/security/x509/IssuingDistributionPointExtension.java
index 51b7001e97b60eb5b34f0324142decaa5cddd55f..2477591e704154b893bb04a2a1ba26f73d553583 100644
--- a/pki/base/util/src/netscape/security/x509/IssuingDistributionPointExtension.java
+++ b/pki/base/util/src/netscape/security/x509/IssuingDistributionPointExtension.java
@@ -106,7 +106,6 @@ public class IssuingDistributionPointExtension extends Extension
     /**
      * Attribute names.
      */
-    public static final String NAME = "IssuingDistributionPoint";
     public static final String ISSUING_DISTRIBUTION_POINT = "issuing_distribution_point";
 
     // Private data members
@@ -119,7 +118,7 @@ public class IssuingDistributionPointExtension extends Extension
     static {
         try {
             OIDMap.addAttribute(IssuingDistributionPointExtension.class.getName(),
-                                OID, NAME);
+                                OID, IssuingDistributionPointExtension.class.getSimpleName());
         } catch (CertificateException e) {}
     }
 
@@ -285,7 +284,7 @@ public class IssuingDistributionPointExtension extends Extension
      */
 
     public String toString() {
-        return NAME;
+        return IssuingDistributionPointExtension.class.getSimpleName();
     }
 
     /**
@@ -345,7 +344,7 @@ public class IssuingDistributionPointExtension extends Extension
         }
     }
 
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(ISSUING_DISTRIBUTION_POINT);
         return (elements.elements());
@@ -353,10 +352,6 @@ public class IssuingDistributionPointExtension extends Extension
     }
 
 
-    public String getName() {
-        return NAME;
-    }
-
     /**
      * Test driver.
      */
diff --git a/pki/base/util/src/netscape/security/x509/KeyUsageExtension.java b/pki/base/util/src/netscape/security/x509/KeyUsageExtension.java
index 7cef592374ec71db5e36b2c69a127fa7055606d3..8d3aa21fc6d05802de9555ec391eff704a3987bd 100644
--- a/pki/base/util/src/netscape/security/x509/KeyUsageExtension.java
+++ b/pki/base/util/src/netscape/security/x509/KeyUsageExtension.java
@@ -58,7 +58,6 @@ implements CertAttrSet {
     /**
      * Attribute names.
      */
-    public static final String NAME = "KeyUsage";
     public static final String DIGITAL_SIGNATURE = "digital_signature";
     public static final String NON_REPUDIATION = "non_repudiation";
     public static final String KEY_ENCIPHERMENT = "key_encipherment";
@@ -386,7 +385,7 @@ implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements () {
+    public Enumeration<String> getAttributeNames () {
         Vector<String> elements = new Vector<String>();
         elements.addElement(DIGITAL_SIGNATURE);
         elements.addElement(NON_REPUDIATION);
@@ -406,10 +405,4 @@ implements CertAttrSet {
 	return (boolean[]) bitString.clone();
     }
 
-    /**
-     * Return the name of this attribute.
-     */
-    public String getName () {
-        return (NAME);
-    }
 }
diff --git a/pki/base/util/src/netscape/security/x509/NSCCommentExtension.java b/pki/base/util/src/netscape/security/x509/NSCCommentExtension.java
index 040126bfed892300a457783bac86db0a9316fced..bc68dadcd1d6777f7853312fbbbb3d072991694b 100644
--- a/pki/base/util/src/netscape/security/x509/NSCCommentExtension.java
+++ b/pki/base/util/src/netscape/security/x509/NSCCommentExtension.java
@@ -51,7 +51,6 @@ implements CertAttrSet {
     /**
      * Attribute names.
      */
-    public static final String NAME = "NSCCommentExtension";
     public static final String INFOS = "infos"; 
     public static final ObjectIdentifier OID = 
        new ObjectIdentifier("2.16.840.1.113730.1.13");
@@ -59,7 +58,7 @@ implements CertAttrSet {
 
 
     // Private data members 
-    private Vector mInfos;
+    private Vector<Object> mInfos;
 
     private PrettyPrintFormat pp = new PrettyPrintFormat(":");
  
@@ -91,7 +90,7 @@ implements CertAttrSet {
         public NSCCommentExtension(boolean critical) {
         this.extensionId = new ObjectIdentifier("2.16.840.1.113730.1.13");
         this.critical = critical;
-        mInfos  = new Vector(1,1);
+        mInfos  = new Vector<Object>(1,1);
     }
 
     /**
@@ -170,14 +169,15 @@ implements CertAttrSet {
     /**
      * Set the attribute value.
      */
-    public void set(String name, Object obj) throws IOException {
+    @SuppressWarnings("unchecked")
+	public void set(String name, Object obj) throws IOException {
         clearValue();
         if (name.equalsIgnoreCase(INFOS)) {
             if (!(obj instanceof Vector)) {
               throw new IOException("Attribute value should be of" +
                                     " type Vector.");
             }
-            mInfos = (Vector)obj;
+            mInfos = (Vector<Object>)obj;
         } else {
           throw new IOException("Attribute name not recognized by " +
                         "CertAttrSet:NSCCommentExtension.");
@@ -212,17 +212,11 @@ implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration getElements () {
-        Vector elements = new Vector();
-        elements.addElement(mInfos);
+    public Enumeration<String> getAttributeNames () {
+        Vector<String> elements = new Vector<String>();
+        elements.addElement(INFOS);
         return (elements.elements());
     }
  
-    /**
-     * Return the name of this attribute.
-     */
-    public String getName () {
-        return (NAME);
-    }
 
 }
diff --git a/pki/base/util/src/netscape/security/x509/NameConstraintsExtension.java b/pki/base/util/src/netscape/security/x509/NameConstraintsExtension.java
index 9a2ac91cefa6148deb6625779604000a52e75c1b..c7928b857e4a917e92bf199430bb40630f380069 100644
--- a/pki/base/util/src/netscape/security/x509/NameConstraintsExtension.java
+++ b/pki/base/util/src/netscape/security/x509/NameConstraintsExtension.java
@@ -73,7 +73,6 @@ implements CertAttrSet {
     /**
      * Attribute names.
      */
-    public static final String NAME = "NameConstraints";
     public static final String PERMITTED_SUBTREES = "permitted_subtrees";
     public static final String EXCLUDED_SUBTREES = "excluded_subtrees";
 
@@ -301,7 +300,7 @@ implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements () {
+    public Enumeration<String> getAttributeNames () {
         Vector<String> elements = new Vector<String>();
         elements.addElement(PERMITTED_SUBTREES);
         elements.addElement(EXCLUDED_SUBTREES);
@@ -309,10 +308,4 @@ implements CertAttrSet {
 	return (elements.elements());
     }
 
-    /**
-     * Return the name of this attribute.
-     */
-    public String getName () {
-        return (NAME);
-    }
 }
diff --git a/pki/base/util/src/netscape/security/x509/OIDMap.java b/pki/base/util/src/netscape/security/x509/OIDMap.java
index 082ecc4fd31630dca2e471ff3017917083c2a2f7..97e8d26e080ffbbc886012549bd42f151026832f 100644
--- a/pki/base/util/src/netscape/security/x509/OIDMap.java
+++ b/pki/base/util/src/netscape/security/x509/OIDMap.java
@@ -21,8 +21,8 @@ import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.security.cert.CertificateException;
-import java.util.Enumeration;
 import java.util.Hashtable;
+import java.util.Iterator;
 import java.util.Properties;
 
 import netscape.security.util.ObjectIdentifier;
@@ -58,42 +58,42 @@ public class OIDMap {
                                  X509CertInfo.NAME + "." +
                                  X509CertInfo.EXTENSIONS;
     private static final String AUTH_KEY_IDENTIFIER = ROOT + "." +
-                                          AuthorityKeyIdentifierExtension.NAME;
+                                          AuthorityKeyIdentifierExtension.class.getSimpleName();
     private static final String SUB_KEY_IDENTIFIER  = ROOT + "." +
-                                          SubjectKeyIdentifierExtension.NAME;
+                                          SubjectKeyIdentifierExtension.class.getSimpleName();
     private static final String KEY_USAGE           = ROOT + "." +
-                                          KeyUsageExtension.NAME;
+                                          KeyUsageExtension.class.getSimpleName();
     private static final String PRIVATE_KEY_USAGE   = ROOT + "." +
-                                          PrivateKeyUsageExtension.NAME;
+                                          PrivateKeyUsageExtension.class.getSimpleName();
     private static final String POLICY_MAPPINGS     = ROOT + "." +
-                                          PolicyMappingsExtension.NAME;
+                                          PolicyMappingsExtension.class.getSimpleName();
     private static final String SUB_ALT_NAME        = ROOT + "." +
-                                          SubjectAlternativeNameExtension.NAME;
+                                          SubjectAlternativeNameExtension.class.getSimpleName();
     private static final String ISSUER_ALT_NAME     = ROOT + "." +
-                                          IssuerAlternativeNameExtension.NAME;
+                                          IssuerAlternativeNameExtension.class.getSimpleName();
     private static final String BASIC_CONSTRAINTS   = ROOT + "." +
-                                          BasicConstraintsExtension.NAME;
+                                          BasicConstraintsExtension.class.getSimpleName();
     private static final String NAME_CONSTRAINTS    = ROOT + "." +
-                                          NameConstraintsExtension.NAME;
+                                          NameConstraintsExtension.class.getSimpleName();
     private static final String POLICY_CONSTRAINTS  = ROOT + "." +
-                                          PolicyConstraintsExtension.NAME;
+                                          PolicyConstraintsExtension.class.getSimpleName();
     private static final String CERT_POLICIES  = //ROOT + "." +
-                                          CertificatePoliciesExtension.NAME;
+                                          CertificatePoliciesExtension.class.getSimpleName();
     private static final String SUBJ_DIR_ATTR  = //ROOT + "." +
-                                          SubjectDirAttributesExtension.NAME;
+                                          SubjectDirAttributesExtension.class.getSimpleName();
     public static final String EXT_KEY_USAGE_NAME = "ExtendedKeyUsageExtension";
     public static final String EXT_INHIBIT_ANY_POLICY_NAME = "InhibitAnyPolicyExtension";
     private static final String EXT_KEY_USAGE = //ROOT + "." +
                                           EXT_KEY_USAGE_NAME;
 
     private static final String CRL_NUMBER  = ROOT + "." +
-                                          CRLNumberExtension.NAME;
+                                          CRLNumberExtension.class.getSimpleName();
     private static final String CRL_REASON  = ROOT + "." +
-                                          CRLReasonExtension.NAME;
+                                          CRLReasonExtension.class.getSimpleName();
 
-    private static final Hashtable oid2Name = new Hashtable();
-    private static final Hashtable name2OID = new Hashtable();
-    private static final Hashtable name2Class = new Hashtable();
+    private static final Hashtable<ObjectIdentifier, String> oid2Name = new Hashtable<ObjectIdentifier, String>();
+    private static final Hashtable<String, ObjectIdentifier> name2OID = new Hashtable<String, ObjectIdentifier>();
+    private static final Hashtable<String, String> name2Class = new Hashtable<String, String>();
 
     // Initialize recognized extensions from EXTENSIONS_{OIDS/CLASSES} files
     static {
@@ -174,9 +174,9 @@ public class OIDMap {
             }
         }
 
-        Enumeration names = props.propertyNames();
-        while (names.hasMoreElements()) {
-            String name = (String)names.nextElement();
+        Iterator<String> names = props.stringPropertyNames().iterator();
+        while (names.hasNext()) {
+            String name = names.next();
             String oidName = props.getProperty(name);
             ObjectIdentifier oid = new ObjectIdentifier(oidName);
 
@@ -201,9 +201,9 @@ public class OIDMap {
             }
         }
 
-        Enumeration names = props.propertyNames();
-        while (names.hasMoreElements()) {
-            String name = (String)names.nextElement();
+        Iterator<String> names = props.stringPropertyNames().iterator();
+        while (names.hasNext()) {
+            String name = names.next();
             String className = props.getProperty(name);
 
             name2Class.put(name, className);
@@ -265,12 +265,12 @@ public class OIDMap {
      * @param name the user friendly name.
      * @exception CertificateException if class cannot be instantiated.
      */
-    public static Class getClass(String name) throws CertificateException {
+    public static Class<?> getClass(String name) throws CertificateException {
         String className = (String)name2Class.get(name);
         if (className == null)
             return null;
         try {
-            Class extClass = Class.forName(className);
+            Class<?> extClass = Class.forName(className);
 	    return (extClass);
 	} catch (Exception e) {
 	  throw new CertificateException("Error instantiating class for "
@@ -284,7 +284,7 @@ public class OIDMap {
      * @param oid the name of the object identifier to be returned.
      * @exception CertificateException if class cannot be instatiated.
      */
-    public static Class getClass(ObjectIdentifier oid)
+    public static Class<?> getClass(ObjectIdentifier oid)
     throws CertificateException {
         String name = getName(oid);
         if (name == null)
@@ -293,7 +293,7 @@ public class OIDMap {
         if (className == null)
             return null;
         try {
-            Class extClass = Class.forName(className);
+            Class<?> extClass = Class.forName(className);
 	    return (extClass);
 	} catch (Exception e) {
 	    throw new CertificateException("Error instantiating class for "
diff --git a/pki/base/util/src/netscape/security/x509/PolicyConstraintsExtension.java b/pki/base/util/src/netscape/security/x509/PolicyConstraintsExtension.java
index 681d449b2845b8766e29a6b6246d88e6a9dac6fd..39e7fbfb92f286d65b5dd773f3229522381a4294 100644
--- a/pki/base/util/src/netscape/security/x509/PolicyConstraintsExtension.java
+++ b/pki/base/util/src/netscape/security/x509/PolicyConstraintsExtension.java
@@ -67,7 +67,6 @@ implements CertAttrSet {
     /**
      * Attribute names.
      */
-    public static final String NAME = "PolicyConstraints";
     public static final String REQUIRE = "require";
     public static final String INHIBIT = "inhibit";
 
@@ -275,7 +274,7 @@ implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements () {
+    public Enumeration<String> getAttributeNames () {
         Vector<String> elements = new Vector<String>();
         elements.addElement(REQUIRE);
         elements.addElement(INHIBIT);
@@ -283,12 +282,6 @@ implements CertAttrSet {
 	return (elements.elements());
     }
 
-    /**
-     * Return the name of this attribute.
-     */
-    public String getName () {
-        return (NAME);
-    }
 
     /**
      * returns the requireExplicitMapping parameter.
diff --git a/pki/base/util/src/netscape/security/x509/PolicyMappingsExtension.java b/pki/base/util/src/netscape/security/x509/PolicyMappingsExtension.java
index 90dd5267dca72364159944447c675b34632cfedf..c31acf92b40d694669d0c9903c1610e65577faec 100644
--- a/pki/base/util/src/netscape/security/x509/PolicyMappingsExtension.java
+++ b/pki/base/util/src/netscape/security/x509/PolicyMappingsExtension.java
@@ -61,11 +61,10 @@ implements CertAttrSet {
     /**
      * Attribute names.
      */
-    public static final String NAME = "PolicyMappings";
     public static final String MAP = "map";
 
     // Private data members
-    private Vector maps = null;
+    private Vector<CertificatePolicyMap> maps = null;
 
     // Encode this extension value
     private void encodeThis() throws IOException {
@@ -84,7 +83,7 @@ implements CertAttrSet {
      *
      * @param maps the Vector of CertificatePolicyMap.
      */
-    public PolicyMappingsExtension(Vector map) throws IOException {
+    public PolicyMappingsExtension(Vector<CertificatePolicyMap> map) throws IOException {
 		init(false, map);
     }
 
@@ -93,7 +92,7 @@ implements CertAttrSet {
      *
      * @param maps the Vector of CertificatePolicyMap.
      */
-    public PolicyMappingsExtension(boolean critical, Vector map) 
+    public PolicyMappingsExtension(boolean critical, Vector<CertificatePolicyMap> map) 
 	throws IOException {
 		init(critical, map);
 	}
@@ -101,7 +100,7 @@ implements CertAttrSet {
 	/**
 	 * init policy with criticality and map.
 	 */
-    private void init(boolean critical, Vector map) throws IOException {
+    private void init(boolean critical, Vector<CertificatePolicyMap> map) throws IOException {
         this.maps = map;
         this.extensionId = PKIXExtensions.PolicyMappings_Id;
         this.critical = critical;
@@ -114,7 +113,7 @@ implements CertAttrSet {
     public PolicyMappingsExtension() {
         extensionId = PKIXExtensions.PolicyMappings_Id;
         critical = false;
-        maps = new Vector(1,1);
+        maps = new Vector<CertificatePolicyMap>(1,1);
     }
 
     /**
@@ -140,7 +139,7 @@ implements CertAttrSet {
             throw new IOException("Invalid encoding for " +
                                   "PolicyMappingsExtension.");
         }
-        maps = new Vector(1, 1);
+        maps = new Vector<CertificatePolicyMap>(1, 1);
         while (val.data.available() != 0) {
             DerValue seq = val.data.getDerValue();
             CertificatePolicyMap map = new CertificatePolicyMap(seq);
@@ -189,14 +188,15 @@ implements CertAttrSet {
     /**
      * Set the attribute value.
      */
-    public void set(String name, Object obj) throws IOException {
+	@SuppressWarnings("unchecked")
+	public void set(String name, Object obj) throws IOException {
 	clearValue();
 	if (name.equalsIgnoreCase(MAP)) {
 	    if (!(obj instanceof Vector)) {
 	      throw new IOException("Attribute value should be of" +
                                     " type Vector.");
 	    }
-	    maps = (Vector)obj;
+	    maps = (Vector<CertificatePolicyMap>)obj;
 	} else {
 	  throw new IOException("Attribute name not recognized by " + 
 			"CertAttrSet:PolicyMappingsExtension.");
@@ -231,24 +231,18 @@ implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements () {
+    public Enumeration<String> getAttributeNames () {
         Vector<String> elements = new Vector<String>();
         elements.addElement(MAP);
 
 	return (elements.elements());
     }
 
-    /**
-     * Return the name of this attribute.
-     */
-    public String getName () {
-        return (NAME);
-    }
 
     /**
      * Returns an enumeration of the mappings in the extension.
      */
-    public Enumeration getMappings() {
+    public Enumeration<CertificatePolicyMap> getMappings() {
 	if (maps == null) 
 		return null;
 	return maps.elements();
diff --git a/pki/base/util/src/netscape/security/x509/PrivateKeyUsageExtension.java b/pki/base/util/src/netscape/security/x509/PrivateKeyUsageExtension.java
index 30944495d672e11f508102d910de84512e8150dd..98a7a4d3c020cae647f2bb146fed37a86f1f1bde 100644
--- a/pki/base/util/src/netscape/security/x509/PrivateKeyUsageExtension.java
+++ b/pki/base/util/src/netscape/security/x509/PrivateKeyUsageExtension.java
@@ -70,7 +70,6 @@ implements CertAttrSet {
     /**
      * Sub attributes name for this CertAttrSet.
      */
-    public static final String NAME = "PrivateKeyUsage";
     public static final String NOT_BEFORE = "not_before";
     public static final String NOT_AFTER = "not_after";
 
@@ -321,7 +320,7 @@ implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
 	elements.addElement(NOT_BEFORE);
 	elements.addElement(NOT_AFTER);
@@ -329,10 +328,5 @@ implements CertAttrSet {
 	return(elements.elements());
     }
 
-    /**
-     * Return the name of this attribute.
-     */
-    public String getName() {
-      return(NAME);
-    }
+    
 }
diff --git a/pki/base/util/src/netscape/security/x509/RevokedCertImpl.java b/pki/base/util/src/netscape/security/x509/RevokedCertImpl.java
index 99bd1665df66858634d4ba71eba2d4c82d9bffd0..5782f5303b479f4f3c42deb3e4c19768088dcb7d 100755
--- a/pki/base/util/src/netscape/security/x509/RevokedCertImpl.java
+++ b/pki/base/util/src/netscape/security/x509/RevokedCertImpl.java
@@ -36,10 +36,11 @@ import netscape.security.util.DerValue;
 import netscape.security.util.ObjectIdentifier;
 
 /**
- * <p>Abstract class for a revoked certificate in a CRL.
- * This class is for each entry in the <code>revokedCertificates</code>,
- * so it deals with the inner <em>SEQUENCE</em>.
- * The ASN.1 definition for this is:
+ * <p>
+ * Abstract class for a revoked certificate in a CRL. This class is for each
+ * entry in the <code>revokedCertificates</code>, so it deals with the inner
+ * <em>SEQUENCE</em>. The ASN.1 definition for this is:
+ * 
  * <pre>
  * revokedCertificates    SEQUENCE OF SEQUENCE  {
  *     userCertificate    CertificateSerialNumber,
@@ -47,11 +48,11 @@ import netscape.security.util.ObjectIdentifier;
  *     crlEntryExtensions Extensions OPTIONAL
  *                        -- if present, must be v2
  * }  OPTIONAL
- *
+ * 
  * CertificateSerialNumber  ::=  INTEGER
- *
+ * 
  * Extensions  ::=  SEQUENCE SIZE (1..MAX) OF Extension
- *
+ * 
  * Extension  ::=  SEQUENCE  {
  *     extnId        OBJECT IDENTIFIER,
  *     critical      BOOLEAN DEFAULT FALSE,
@@ -61,65 +62,70 @@ import netscape.security.util.ObjectIdentifier;
  *                   -- the extnId object identifier value
  * }
  * </pre>
- *
+ * 
  * @author Hemma Prafullchandra
  * @version 1.6 97/12/10
  */
 
-public class RevokedCertImpl extends RevokedCertificate
- implements Serializable{
+public class RevokedCertImpl extends RevokedCertificate implements Serializable{
 
     /**
      *
      */
-    private static final long serialVersionUID = -3449642360223397701L;
-    private SerialNumber serialNumber;
-    private Date revocationDate;
-    private CRLExtensions extensions = null;
-    private byte[] revokedCert;
-    private final static boolean isExplicit = false;
+        private static final long serialVersionUID = -3449642360223397701L;
+    
 
-    /**
-     * Default constructor.
-     */
-    public RevokedCertImpl() { }
+	private SerialNumber serialNumber;
+	private Date revocationDate;
+	private CRLExtensions extensions = null;
+	private byte[] revokedCert;
+	private final static boolean isExplicit = false;
 
-    /**
-     * Constructs a revoked certificate entry using the
-     * serial number and revocation date.
-     *
-     * @param num the serial number of the revoked certificate.
-     * @param date the Date on which revocation took place.
-     */
-    public RevokedCertImpl(BigInteger num, Date date) {
-        this.serialNumber = new SerialNumber(num);
-        this.revocationDate = date;
-    }
+	/**
+	 * Default constructor.
+	 */
+	public RevokedCertImpl() {
+	}
 
-    /**
-     * Constructs a revoked certificate entry using the
-     * serial number, revocation date and the entry
-     * extensions.
-     *
-     * @param num the serial number of the revoked certificate.
-     * @param date the Date on which revocation took place.
-     * @param crlEntryExts the extensions for this entry.
-     */
-    public RevokedCertImpl(BigInteger num, Date date,
-                           CRLExtensions crlEntryExts) {
-        this.serialNumber = new SerialNumber(num);
-        this.revocationDate = date;
-        this.extensions = crlEntryExts;
-    }
+	/**
+	 * Constructs a revoked certificate entry using the serial number and
+	 * revocation date.
+	 * 
+	 * @param num
+	 *            the serial number of the revoked certificate.
+	 * @param date
+	 *            the Date on which revocation took place.
+	 */
+	public RevokedCertImpl(BigInteger num, Date date) {
+		this.serialNumber = new SerialNumber(num);
+		this.revocationDate = date;
+	}
+
+	/**
+	 * Constructs a revoked certificate entry using the serial number,
+	 * revocation date and the entry extensions.
+	 * 
+	 * @param num
+	 *            the serial number of the revoked certificate.
+	 * @param date
+	 *            the Date on which revocation took place.
+	 * @param crlEntryExts
+	 *            the extensions for this entry.
+	 */
+	public RevokedCertImpl(BigInteger num, Date date, CRLExtensions crlEntryExts) {
+		this.serialNumber = new SerialNumber(num);
+		this.revocationDate = date;
+		this.extensions = crlEntryExts;
+	}
 
 	public byte[] getEncoded() throws CRLException {
 		// XXX NOT IMPLEMENTED
 		if (revokedCert == null) {
-    			DerOutputStream os = new DerOutputStream();
+			DerOutputStream os = new DerOutputStream();
 			try {
 				encode(os);
 			} catch (Exception e) {
-				//	revokedCert = null;
+				// revokedCert = null;
 			}
 			revokedCert = os.toByteArray();
 		}
@@ -131,316 +137,326 @@ public class RevokedCertImpl extends RevokedCertificate
 		return true;
 	}
 
-    /**
-     * Sets extensions for this impl.
-     *
-     * @param crlEntryExts CRLExtensions
-     */
-    public void setExtensions(CRLExtensions crlEntryExts) {
-        this.extensions = crlEntryExts;
-    }
+	/**
+	 * Sets extensions for this impl.
+	 * 
+	 * @param crlEntryExts
+	 *            CRLExtensions
+	 */
+	public void setExtensions(CRLExtensions crlEntryExts) {
+		this.extensions = crlEntryExts;
+	}
 
-    /**
-     * Unmarshals a revoked certificate from its encoded form.
-     *
-     * @param revokedCert the encoded bytes.
-     * @exception CRLException on parsing errors.
-     * @exception X509ExtensionException on extension handling errors.
-     */
-    public RevokedCertImpl(byte[] revokedCert)
-    throws CRLException, X509ExtensionException {
-        try {
-            DerValue derValue = new DerValue(revokedCert);
-            parse(derValue);
-        } catch (IOException e) {
-            throw new CRLException("Parsing error: " + e.toString());
-        }
-    }
+	/**
+	 * Unmarshals a revoked certificate from its encoded form.
+	 * 
+	 * @param revokedCert
+	 *            the encoded bytes.
+	 * @exception CRLException
+	 *                on parsing errors.
+	 * @exception X509ExtensionException
+	 *                on extension handling errors.
+	 */
+	public RevokedCertImpl(byte[] revokedCert) throws CRLException,
+			X509ExtensionException {
+		try {
+			DerValue derValue = new DerValue(revokedCert);
+			parse(derValue);
+		} catch (IOException e) {
+			throw new CRLException("Parsing error: " + e.toString());
+		}
+	}
 
-    /**
-     * Unmarshals a revoked certificate from its encoded form.
-     *
-     * @param derValue the DER value containing the revoked certificate.
-     * @exception CRLException on parsing errors.
-     * @exception X509ExtensionException on extension handling errors.
-     */
-    public RevokedCertImpl(DerValue derValue)
-    throws CRLException, X509ExtensionException {
-        parse(derValue);
-    }
+	/**
+	 * Unmarshals a revoked certificate from its encoded form.
+	 * 
+	 * @param derValue
+	 *            the DER value containing the revoked certificate.
+	 * @exception CRLException
+	 *                on parsing errors.
+	 * @exception X509ExtensionException
+	 *                on extension handling errors.
+	 */
+	public RevokedCertImpl(DerValue derValue) throws CRLException,
+			X509ExtensionException {
+		parse(derValue);
+	}
 
-    /**
-     * Returns true if this revoked certificate entry has
-     * extensions, otherwise false.
-     *
-     * @return true if this CRL entry has extensions, otherwise
-     * false.
-     */
-    public boolean hasExtensions() {
-        if (extensions == null)
-            return false;
-        else
-            return true;
-    }
+	/**
+	 * Returns true if this revoked certificate entry has extensions, otherwise
+	 * false.
+	 * 
+	 * @return true if this CRL entry has extensions, otherwise false.
+	 */
+	public boolean hasExtensions() {
+		if (extensions == null)
+			return false;
+		else
+			return true;
+	}
 
-    /**
-     * Decode a revoked certificate from an input stream.
-     *
-     * @param inStrm an input stream holding at least one revoked
-     * certificate
-     * @exception CRLException on parsing errors.
-     * @exception X509ExtensionException on extension handling errors.
-     */
-    public void decode(InputStream inStrm)
-    throws CRLException, X509ExtensionException {
-        try {
-            DerValue derValue = new DerValue(inStrm);
-            parse(derValue);
-        } catch (IOException e) {
-            throw new CRLException("Parsing error: " + e.toString());
-        }
-    }
+	/**
+	 * Decode a revoked certificate from an input stream.
+	 * 
+	 * @param inStrm
+	 *            an input stream holding at least one revoked certificate
+	 * @exception CRLException
+	 *                on parsing errors.
+	 * @exception X509ExtensionException
+	 *                on extension handling errors.
+	 */
+	public void decode(InputStream inStrm) throws CRLException,
+			X509ExtensionException {
+		try {
+			DerValue derValue = new DerValue(inStrm);
+			parse(derValue);
+		} catch (IOException e) {
+			throw new CRLException("Parsing error: " + e.toString());
+		}
+	}
 
-    /**
-     * Encodes the revoked certificate to an output stream.
-     *
-     * @param outStrm an output stream to which the encoded revoked
-     * certificate is written.
-     * @exception CRLException on encoding errors.
-     * @exception X509ExtensionException on extension handling errors.
-     */
-    public void encode(DerOutputStream outStrm)
-    throws CRLException, X509ExtensionException {
-        try {
-            if (revokedCert == null) {
-                DerOutputStream tmp = new DerOutputStream();
-                // sequence { serialNumber, revocationDate, extensions }
-                serialNumber.encode(tmp);
+	/**
+	 * Encodes the revoked certificate to an output stream.
+	 * 
+	 * @param outStrm
+	 *            an output stream to which the encoded revoked certificate is
+	 *            written.
+	 * @exception CRLException
+	 *                on encoding errors.
+	 * @exception X509ExtensionException
+	 *                on extension handling errors.
+	 */
+	public void encode(DerOutputStream outStrm) throws CRLException,
+			X509ExtensionException {
+		try {
+			if (revokedCert == null) {
+				DerOutputStream tmp = new DerOutputStream();
+				// sequence { serialNumber, revocationDate, extensions }
+				serialNumber.encode(tmp);
 
-                // from 2050 should encode GeneralizedTime
-                tmp.putUTCTime(revocationDate);
+				// from 2050 should encode GeneralizedTime
+				tmp.putUTCTime(revocationDate);
 
-                if (extensions != null)
-                    extensions.encode(tmp, isExplicit);
+				if (extensions != null)
+					extensions.encode(tmp, isExplicit);
 
-                DerOutputStream seq = new DerOutputStream();
-                seq.write(DerValue.tag_Sequence, tmp);
+				DerOutputStream seq = new DerOutputStream();
+				seq.write(DerValue.tag_Sequence, tmp);
 
-                revokedCert = seq.toByteArray();
-            }
-            outStrm.write(revokedCert);
-        } catch (IOException e) {
-             throw new CRLException("Encoding error: " + e.toString());
-        }
-    }
+				revokedCert = seq.toByteArray();
+			}
+			outStrm.write(revokedCert);
+		} catch (IOException e) {
+			throw new CRLException("Encoding error: " + e.toString());
+		}
+	}
 
-    /**
-     * Gets the serial number for this RevokedCertificate,
-     * the <em>userCertificate</em>.
-     *
-     * @return the serial number.
-     */
-    public BigInteger getSerialNumber() {
-        return ((BigInt)serialNumber.getNumber()).toBigInteger();
-    }
+	/**
+	 * Gets the serial number for this RevokedCertificate, the
+	 * <em>userCertificate</em>.
+	 * 
+	 * @return the serial number.
+	 */
+	public BigInteger getSerialNumber() {
+		return ((BigInt) serialNumber.getNumber()).toBigInteger();
+	}
 
-    /**
-     * Gets the revocation date for this RevokedCertificate,
-     * the <em>revocationDate</em>.
-     *
-     * @return the revocation date.
-     */
-    public Date getRevocationDate() {
-        return (new Date(revocationDate.getTime()));
-    }
+	/**
+	 * Gets the revocation date for this RevokedCertificate, the
+	 * <em>revocationDate</em>.
+	 * 
+	 * @return the revocation date.
+	 */
+	public Date getRevocationDate() {
+		return (new Date(revocationDate.getTime()));
+	}
 
-    /**
-     * Returns extensions for this impl.
-     *
-     * @return the CRLExtensions
-     */
-    public CRLExtensions getExtensions() {
-        return extensions;
-    }
+	/**
+	 * Returns extensions for this impl.
+	 * 
+	 * @return the CRLExtensions
+	 */
+	public CRLExtensions getExtensions() {
+		return extensions;
+	}
 
+	/**
+	 * Returns a printable string of this revoked certificate.
+	 * 
+	 * @return value of this revoked certificate in a printable form.
+	 */
+	public String toString() {
+		StringBuffer sb = new StringBuffer();
 
-    /**
-     * Returns a printable string of this revoked certificate.
-     *
-     * @return value of this revoked certificate in a printable form.
-     */
-    public String toString() {
-        StringBuffer sb = new StringBuffer();
+		sb.append(serialNumber.toString());
+		sb.append("  On: " + revocationDate.toString());
+		if (extensions != null) {
+			sb.append("\n");
+			for (int i = 0; i < extensions.size(); i++)
+				sb.append("Entry Extension[" + i + "]: "
+						+ ((Extension) (extensions.elementAt(i))).toString());
+		}
+		sb.append("\n");
+		return (sb.toString());
+	}
 
-        sb.append(serialNumber.toString());
-        sb.append("  On: " + revocationDate.toString());
-        if (extensions != null) {
-            sb.append("\n");
-            for (int i = 0; i < extensions.size(); i++)
-                sb.append("Entry Extension[" + i + "]: " +
-                     ((Extension)(extensions.elementAt(i))).toString());
-        }
-        sb.append("\n");
-        return (sb.toString());
-    }
+	/**
+	 * Gets a Set of the extension(s) marked CRITICAL in the RevokedCertificate
+	 * by OID strings.
+	 * 
+	 * @return a set of the extension oid strings in the Object that are marked
+	 *         critical.
+	 */
+	public Set<String> getCriticalExtensionOIDs() {
+		if (extensions == null)
+			return null;
+		Set<String> extSet = new TreeSet<String>();
+		Extension ex;
+		for (Enumeration<Extension> e = extensions.getElements(); e
+				.hasMoreElements();) {
+			ex = (Extension) e.nextElement();
+			if (ex.isCritical())
+				extSet.add(((ObjectIdentifier) ex.getExtensionId()).toString());
+		}
+		return extSet;
+	}
 
-    /**
-     * Gets a Set of the extension(s) marked CRITICAL in the
-     * RevokedCertificate by OID strings.
-     *
-     * @return a set of the extension oid strings in the
-     * Object that are marked critical.
-     */
-    public Set getCriticalExtensionOIDs() {
-        if (extensions == null)
-            return null;
-        Set extSet = new TreeSet();
-        Extension ex;
-            for (Enumeration e = extensions.getElements();
-                                          e.hasMoreElements();) {
-            ex = (Extension)e.nextElement();
-                if (ex.isCritical())
-                extSet.add(((ObjectIdentifier)ex.getExtensionId()).toString());
-            }
-        return extSet;
-    }
+	/**
+	 * Gets a Set of the extension(s) marked NON-CRITICAL in the
+	 * RevokedCertificate by OID strings.
+	 * 
+	 * @return a set of the extension oid strings in the Object that are marked
+	 *         critical.
+	 */
+	public Set<String> getNonCriticalExtensionOIDs() {
+		if (extensions == null)
+			return null;
+		Set<String> extSet = new TreeSet<String>();
+		Extension ex;
+		for (Enumeration<Extension> e = extensions.getElements(); e
+				.hasMoreElements();) {
+			ex = (Extension) e.nextElement();
+			if (!ex.isCritical())
+				extSet.add(ex.getExtensionId().toString());
+		}
+		return extSet;
+	}
 
-    /**
-     * Gets a Set of the extension(s) marked NON-CRITICAL in the
-     * RevokedCertificate by OID strings.
-     *
-     * @return a set of the extension oid strings in the
-     * Object that are marked critical.
-     */
-    public Set getNonCriticalExtensionOIDs() {
-        if (extensions == null)
-            return null;
-        Set extSet = new TreeSet();
-        Extension ex;
-            for (Enumeration e = extensions.getElements();
-                                          e.hasMoreElements();) {
-            ex = (Extension)e.nextElement();
-                if ( ! ex.isCritical())
-                extSet.add(((ObjectIdentifier)ex.getExtensionId()).toString());
-            }
-        return extSet;
-    }
+	/**
+	 * Gets the DER encoded OCTET string for the extension value (
+	 * <em>extnValue</em>) identified by the passed in oid String. The
+	 * <code>oid</code> string is represented by a set of positive whole number
+	 * separated by ".", that means,<br>
+	 * &lt;positive whole number&gt;.&lt;positive whole number&gt;.&lt;positive
+	 * whole number&gt;.&lt;...&gt;
+	 * 
+	 * @param oid
+	 *            the Object Identifier value for the extension.
+	 * @return the DER encoded octet string of the extension value.
+	 */
+	public byte[] getExtensionValue(String oid) {
+		if (extensions == null)
+			return null;
+		try {
+			String extAlias = OIDMap.getName(new ObjectIdentifier(oid));
+			Extension crlExt = null;
 
-    /**
-     * Gets the DER encoded OCTET string for the extension value
-     * (<em>extnValue</em>) identified by the passed in oid String.
-     * The <code>oid</code> string is
-     * represented by a set of positive whole number separated
-     * by ".", that means,<br>
-     * &lt;positive whole number&gt;.&lt;positive whole number&gt;.&lt;positive
-     * whole number&gt;.&lt;...&gt;
-     *
-     * @param oid the Object Identifier value for the extension.
-     * @return the DER encoded octet string of the extension value.
-     */
-    public byte[] getExtensionValue(String oid) {
-        if (extensions == null)
-            return null;
-            try {
-                String extAlias = OIDMap.getName(new ObjectIdentifier(oid));
-            Extension crlExt = null;
+			if (extAlias == null) { // may be unknown
+				ObjectIdentifier findOID = new ObjectIdentifier(oid);
+				Extension ex = null;
+				ObjectIdentifier inCertOID;
+				for (Enumeration<Extension> e = extensions.getElements(); e
+						.hasMoreElements();) {
+					ex = (Extension) e.nextElement();
+					inCertOID = ex.getExtensionId();
+					if (inCertOID.equals(findOID)) {
+						crlExt = ex;
+						break;
+					}
+				}
+			} else
+				crlExt = extensions.get(extAlias);
+			if (crlExt == null)
+				return null;
+			byte[] extData = crlExt.getExtensionValue();
+			if (extData == null)
+				return null;
 
-            if (extAlias == null) { // may be unknown
-                ObjectIdentifier findOID = new ObjectIdentifier(oid);
-                Extension ex = null;
-                ObjectIdentifier inCertOID;
-                for (Enumeration e=extensions.getElements();
-                                                 e.hasMoreElements();) {
-                    ex = (Extension)e.nextElement();
-                    inCertOID = ex.getExtensionId();
-                    if (inCertOID.equals(findOID)) {
-                        crlExt = ex;
-                        break;
-                    }
-                }
-            } else
-                crlExt = extensions.get(extAlias);
-                if (crlExt == null)
-                return null;
-                byte[] extData = crlExt.getExtensionValue();
-            if (extData == null)
-                return null;
+			DerOutputStream out = new DerOutputStream();
+			out.putOctetString(extData);
+			return out.toByteArray();
+		} catch (Exception e) {
+			return null;
+		}
+	}
 
-                    DerOutputStream out = new DerOutputStream();
-                    out.putOctetString(extData);
-            return out.toByteArray();
-        } catch (Exception e) {
-            return null;
-            }
-    }
+	private void parse(DerValue derVal) throws CRLException,
+			X509ExtensionException {
 
-    private void parse(DerValue derVal)
-    throws CRLException, X509ExtensionException  {
+		if (derVal.tag != DerValue.tag_Sequence) {
+			throw new CRLException("Invalid encoded RevokedCertificate, "
+					+ "starting sequence tag missing.");
+		}
+		if (derVal.data.available() == 0)
+			throw new CRLException("No data encoded for RevokedCertificates");
 
-       if (derVal.tag != DerValue.tag_Sequence) {
-            throw new CRLException("Invalid encoded RevokedCertificate, " +
-                                  "starting sequence tag missing.");
-        }
-        if (derVal.data.available() == 0)
-            throw new CRLException("No data encoded for RevokedCertificates");
+		// serial number
+		try {
+			DerInputStream in = derVal.toDerInputStream();
+			DerValue val = in.getDerValue();
+			this.serialNumber = new SerialNumber(val);
+		} catch (IOException e) {
+			throw new CRLException("Parsing Serial Number error: "
+					+ e.toString());
+		}
 
-        // serial number
-        try {
-            DerInputStream in = derVal.toDerInputStream();
-            DerValue val = in.getDerValue();
-            this.serialNumber = new SerialNumber(val);
-        } catch (IOException e) {
-            throw new CRLException("Parsing Serial Number error: "
-                                   + e.toString());
-        }
+		// revocationDate
+		try {
+			int nextByte = derVal.data.peekByte();
+			if ((byte) nextByte == DerValue.tag_UtcTime) {
+				this.revocationDate = derVal.data.getUTCTime();
+			} else if ((byte) nextByte == DerValue.tag_GeneralizedTime) {
+				this.revocationDate = derVal.data.getGeneralizedTime();
+			} else {
+				throw new CRLException(
+						"Invalid encoding for RevokedCertificates");
+			}
+		} catch (IOException e) {
+			throw new CRLException("Parsing Revocation Date error: "
+					+ e.toString());
+		}
 
-        // revocationDate
-        try {
-            int nextByte = derVal.data.peekByte();
-            if ((byte)nextByte == DerValue.tag_UtcTime) {
-                this.revocationDate = derVal.data.getUTCTime();
-            } else if ((byte)nextByte == DerValue.tag_GeneralizedTime) {
-                this.revocationDate = derVal.data.getGeneralizedTime();
-            } else {
-                throw new CRLException("Invalid encoding for RevokedCertificates");
-            }
-        } catch (IOException e) {
-            throw new CRLException("Parsing Revocation Date error: "
-                                   + e.toString());
-        }
+		if (derVal.data.available() == 0)
+			return; // no extensions
 
-        if (derVal.data.available() == 0)
-            return;  // no extensions
+		// crlEntryExtensions
+		try {
+			this.extensions = new CRLExtensions(derVal.toDerInputStream());
+		} catch (IOException e) {
+			throw new CRLException("Parsing CRL Entry Extensions error: "
+					+ e.toString());
+		}
+	}
 
-        // crlEntryExtensions
-        try {
-            this.extensions = new CRLExtensions(derVal.toDerInputStream());
-        } catch (IOException e) {
-            throw new CRLException("Parsing CRL Entry Extensions error: "
-                                   + e.toString());
-        }
-    }
+	/**
+	 * Serialization write ... X.509 certificates serialize as themselves, and
+	 * they're parsed when they get read back. (Actually they serialize as some
+	 * type data from the serialization subsystem, then the cert data.)
+	 */
+	private synchronized void writeObject(ObjectOutputStream stream)
+			throws CRLException, X509ExtensionException, IOException {
+		DerOutputStream dos = new DerOutputStream();
+		encode(dos);
+		dos.derEncode(stream);
+	}
 
-    /**
-     * Serialization write ... X.509 certificates serialize as
-     * themselves, and they're parsed when they get read back.
-     * (Actually they serialize as some type data from the
-     * serialization subsystem, then the cert data.)
-     */
-    private synchronized void writeObject(ObjectOutputStream stream)
-    throws CRLException, X509ExtensionException, IOException {
-        DerOutputStream dos = new DerOutputStream();
-        encode(dos);
-        dos.derEncode(stream);
-    }
-
-    /**
-     * Serialization read ... X.509 certificates serialize as
-     * themselves, and they're parsed when they get read back.
-     */
-    private synchronized void readObject(ObjectInputStream stream)
-    throws CRLException, X509ExtensionException, IOException {
-        decode(stream);
-    }
+	/**
+	 * Serialization read ... X.509 certificates serialize as themselves, and
+	 * they're parsed when they get read back.
+	 */
+	private synchronized void readObject(ObjectInputStream stream)
+			throws CRLException, X509ExtensionException, IOException {
+		decode(stream);
+	}
 
 }
diff --git a/pki/base/util/src/netscape/security/x509/RevokedCertificate.java b/pki/base/util/src/netscape/security/x509/RevokedCertificate.java
index 41f18d9b4bb0cc7a2569319e2a6b10d30c64e7ea..7db553ade5ca2b364e432835b22f13464df147b2 100644
--- a/pki/base/util/src/netscape/security/x509/RevokedCertificate.java
+++ b/pki/base/util/src/netscape/security/x509/RevokedCertificate.java
@@ -82,10 +82,15 @@ public abstract class RevokedCertificate extends X509CRLEntry {
      */
     public abstract boolean hasExtensions();
 
+    
+    
     /**
      * Returns a string representation of this revoked certificate.
      *
      * @return a string representation of this revoked certificate.
      */
     public abstract String toString();
+    
+    public abstract CRLExtensions getExtensions();
+
 }
diff --git a/pki/base/util/src/netscape/security/x509/SubjectAlternativeNameExtension.java b/pki/base/util/src/netscape/security/x509/SubjectAlternativeNameExtension.java
index 5c3ad35e9db8a3169fb6965ca9e30c5f0c182e8d..53f4eadb44d8efbfc2d83a96e17dfff9134ab0ff 100644
--- a/pki/base/util/src/netscape/security/x509/SubjectAlternativeNameExtension.java
+++ b/pki/base/util/src/netscape/security/x509/SubjectAlternativeNameExtension.java
@@ -64,7 +64,6 @@ implements CertAttrSet {
     /**
      * Attribute names.
      */
-    public static final String NAME = "SubjectAlternativeName";
     public static final String SUBJECT_NAME = "subject_name";
 
     // private data members
@@ -222,17 +221,11 @@ implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements () {
+    public Enumeration<String> getAttributeNames () {
         Vector<String> elements = new Vector<String>();
         elements.addElement(SUBJECT_NAME);
 
 	return (elements.elements());
     }
 
-    /**
-     * Return the name of this attribute.
-     */
-    public String getName () {
-        return (NAME);
-    }
 }
diff --git a/pki/base/util/src/netscape/security/x509/SubjectDirAttributesExtension.java b/pki/base/util/src/netscape/security/x509/SubjectDirAttributesExtension.java
index da9170f3fa3c821ea63ba449bf4722987bb86537..134f0435ea7c41689e1aac05e2b03913a16f68e0 100644
--- a/pki/base/util/src/netscape/security/x509/SubjectDirAttributesExtension.java
+++ b/pki/base/util/src/netscape/security/x509/SubjectDirAttributesExtension.java
@@ -74,10 +74,9 @@ implements CertAttrSet {
     /**
      * Attribute names.
      */
-    public static final String NAME = "SubjectDirectoryAttributes";
 
     // Private data members
-    private Vector attrList = new Vector();
+    private Vector<Attribute> attrList = new Vector<Attribute>();
 
     // Encode this extension value
     private void encodeThis() throws IOException {
@@ -85,9 +84,9 @@ implements CertAttrSet {
         DerOutputStream tmp = new DerOutputStream();
 
 		//encoding the attributes
-		Enumeration attrs = attrList.elements();
+		Enumeration<Attribute> attrs = attrList.elements();
 		while (attrs.hasMoreElements()) {
-            Attribute attr = (Attribute) attrs.nextElement();
+            Attribute attr =  attrs.nextElement();
 		    attr.encode(tmp);
 		}
 
@@ -104,7 +103,7 @@ implements CertAttrSet {
         }
 
         if (derVal.data.available() == 0) {
-            throw new IOException(NAME+" No data available in "
+            throw new IOException(this.getClass().getSimpleName()+" No data available in "
                                    + "passed DER encoded value.");
         }
 
@@ -161,7 +160,7 @@ implements CertAttrSet {
         this.critical = crit.booleanValue();
 
         if (!(value instanceof byte[]))
-            throw new IOException(NAME+"Illegal argument type");
+            throw new IOException(this.getClass().getSimpleName()+"Illegal argument type");
         int len = Array.getLength(value);
         byte[] extValue = new byte[len];
         System.arraycopy(value, 0, extValue, 0, len);
@@ -199,9 +198,9 @@ implements CertAttrSet {
     public String toString() {
         String s = super.toString() + "SubjectDirectoryAttributes:[\n";
 
-	Enumeration attrs = attrList.elements();
+	Enumeration<Attribute> attrs = attrList.elements();
 	while (attrs.hasMoreElements()) {
-	    Attribute attr = (Attribute) attrs.nextElement();
+	    Attribute attr = attrs.nextElement();
 	    s += attr.toString();
 	}
 
@@ -263,22 +262,16 @@ implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
 	return (elements.elements());
     }
 
-    /**
-     * Return the name of this attribute.
-     */
-    public String getName() {
-        return (NAME);
-    }
 
     /**
      * Returns an enumeration of attributes in the extension.
      */
-    public Enumeration getAttributesList() {
+    public Enumeration<Attribute> getAttributesList() {
 	if (attrList == null) 
 		return null;
 	return attrList.elements();
diff --git a/pki/base/util/src/netscape/security/x509/SubjectKeyIdentifierExtension.java b/pki/base/util/src/netscape/security/x509/SubjectKeyIdentifierExtension.java
index fc65ec31ea4dddc9e439643fd51b444e25878a79..cbaf2ce5237ad26ee87f407db5ee92c4cfe6f0c8 100644
--- a/pki/base/util/src/netscape/security/x509/SubjectKeyIdentifierExtension.java
+++ b/pki/base/util/src/netscape/security/x509/SubjectKeyIdentifierExtension.java
@@ -64,7 +64,6 @@ implements CertAttrSet {
     /**
      * Attribute names.
      */
-    public static final String NAME = "SubjectKeyIdentifier";
     public static final String KEY_ID = "key_id";
 
     // Private data member
@@ -203,17 +202,11 @@ implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements () {
+    public Enumeration<String> getAttributeNames () {
         Vector<String> elements = new Vector<String>();
         elements.addElement(KEY_ID);
 
 	return (elements.elements());
     }
 
-    /**
-     * Return the name of this attribute.
-     */
-    public String getName () {
-        return (NAME);
-    }
 }
diff --git a/pki/base/util/src/netscape/security/x509/X509CertImpl.java b/pki/base/util/src/netscape/security/x509/X509CertImpl.java
index bb1b441a0d0e48aae978a6ebec28b6b2432cce99..220f32d82b81e21a2d0aa9ca20b405572472b309 100755
--- a/pki/base/util/src/netscape/security/x509/X509CertImpl.java
+++ b/pki/base/util/src/netscape/security/x509/X509CertImpl.java
@@ -905,7 +905,7 @@ implements Serializable, DerEncoder {
      * @return a set of the extension oid strings in the
      * certificate that are marked critical.
      */
-    public Set getCriticalExtensionOIDs() {
+    public Set<String> getCriticalExtensionOIDs() {
         if (info == null)
             return null;
             try {
@@ -913,10 +913,10 @@ implements Serializable, DerEncoder {
                                              CertificateExtensions.NAME);
                 if (exts == null)
                 return null;
-            Set<String> extSet = new TreeSet();
+            Set<String> extSet = new TreeSet<String>();
             Extension ex;
-                for (Enumeration e = exts.getElements(); e.hasMoreElements(); ) {
-                ex = (Extension)e.nextElement();
+                for (Enumeration<Extension> e = exts.getAttributes(); e.hasMoreElements(); ) {
+                ex = e.nextElement();
                     if (ex.isCritical())
                     extSet.add(((ObjectIdentifier)ex.getExtensionId()).toString());
                 }
@@ -933,7 +933,7 @@ implements Serializable, DerEncoder {
      * @return a set of the extension oid strings in the
      * certificate that are NOT marked critical.
      */
-    public Set getNonCriticalExtensionOIDs() {
+    public Set<String> getNonCriticalExtensionOIDs() {
         if (info == null)
             return null;
             try {
@@ -942,10 +942,10 @@ implements Serializable, DerEncoder {
                 if (exts == null)
                 return null;
 
-            Set extSet = new TreeSet();
+            Set<String> extSet = new TreeSet<String>();
             Extension ex;
-                for (Enumeration e = exts.getElements(); e.hasMoreElements(); ) {
-                ex = (Extension)e.nextElement();
+                for (Enumeration<Extension> e = exts.getAttributes(); e.hasMoreElements(); ) {
+                ex = e.nextElement();
                     if ( ! ex.isCritical())
                     extSet.add(((ObjectIdentifier)ex.getExtensionId()).toString());
                 }
@@ -964,8 +964,8 @@ implements Serializable, DerEncoder {
                ObjectIdentifier findOID = new ObjectIdentifier(oid);
                Extension ex = null;;
                ObjectIdentifier inCertOID;
-               for (Enumeration e=exts.getElements(); e.hasMoreElements();) {
-                   ex = (Extension)e.nextElement();
+               for (Enumeration<Extension> e=exts.getAttributes(); e.hasMoreElements();) {
+                   ex = e.nextElement();
                    inCertOID = ex.getExtensionId();
                    if (inCertOID.equals(findOID)) {
                        return ex;
@@ -997,8 +997,8 @@ implements Serializable, DerEncoder {
                ObjectIdentifier findOID = new ObjectIdentifier(oid);
                Extension ex = null;;
                ObjectIdentifier inCertOID;
-               for (Enumeration e=exts.getElements(); e.hasMoreElements();) {
-                   ex = (Extension)e.nextElement();
+               for (Enumeration<Extension> e=exts.getAttributes(); e.hasMoreElements();) {
+                   ex = e.nextElement();
                    inCertOID = ex.getExtensionId();
                    if (inCertOID.equals(findOID)) {
                        certExt = ex;
diff --git a/pki/base/util/src/netscape/security/x509/X509CertInfo.java b/pki/base/util/src/netscape/security/x509/X509CertInfo.java
index 4ece0df829df2afdadc8f9078dcf77bbb0956901..1178d6a37bdbe28d25920419a393f51605abcca9 100644
--- a/pki/base/util/src/netscape/security/x509/X509CertInfo.java
+++ b/pki/base/util/src/netscape/security/x509/X509CertInfo.java
@@ -222,7 +222,7 @@ public class X509CertInfo implements CertAttrSet, Serializable {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(VERSION);
         elements.addElement(SERIAL_NUMBER);
-- 
1.7.7.5

