From 6cbba681d2513d1d634285e1e96b0495a7c8a535 Mon Sep 17 00:00:00 2001
From: Adam Young <ayoung@redhat.com>
Date: Mon, 17 Oct 2011 22:20:12 -0400
Subject: [PATCH] code cleanup com.netscape.cmsutil dead code removal removed
 unused imports import cleanup added explict generated
 serial version id static members accessed staticall removed
 unused fields, methods, variables
 https://bugzilla.redhat.com/show_bug.cgi?id=728303

---
 .../com/netscape/cmsutil/crypto/CryptoUtil.java    |  216 ++++++++++++--------
 .../src/com/netscape/cmsutil/crypto/Module.java    |    4 +-
 .../src/com/netscape/cmsutil/crypto/Token.java     |    4 +-
 .../com/netscape/cmsutil/http/ConnectAsync.java    |   10 +-
 .../src/com/netscape/cmsutil/http/HttpClient.java  |   16 +-
 .../netscape/cmsutil/http/HttpEofException.java    |    2 +
 .../src/com/netscape/cmsutil/http/HttpMessage.java |    6 +-
 .../cmsutil/http/HttpProtocolException.java        |    2 +
 .../src/com/netscape/cmsutil/http/HttpRequest.java |   14 +-
 .../com/netscape/cmsutil/http/HttpResponse.java    |    6 +-
 .../netscape/cmsutil/http/JssSSLSocketFactory.java |   29 ++--
 .../src/com/netscape/cmsutil/ldap/LDAPUtil.java    |   16 ++-
 .../com/netscape/cmsutil/net/ISocketFactory.java   |    6 +-
 .../netscape/cmsutil/ocsp/BasicOCSPResponse.java   |   30 ++-
 .../util/src/com/netscape/cmsutil/ocsp/CertID.java |   26 ++-
 .../src/com/netscape/cmsutil/ocsp/CertStatus.java  |    5 +-
 .../src/com/netscape/cmsutil/ocsp/GoodInfo.java    |   20 ++-
 .../src/com/netscape/cmsutil/ocsp/KeyHashID.java   |   19 ++-
 .../util/src/com/netscape/cmsutil/ocsp/NameID.java |   17 +-
 .../src/com/netscape/cmsutil/ocsp/OCSPRequest.java |   25 ++-
 .../com/netscape/cmsutil/ocsp/OCSPResponse.java    |   25 ++-
 .../netscape/cmsutil/ocsp/OCSPResponseStatus.java  |   24 ++-
 .../src/com/netscape/cmsutil/ocsp/Request.java     |   25 ++-
 .../src/com/netscape/cmsutil/ocsp/ResponderID.java |    4 +-
 .../src/com/netscape/cmsutil/ocsp/Response.java    |    4 +-
 .../com/netscape/cmsutil/ocsp/ResponseBytes.java   |   26 ++-
 .../com/netscape/cmsutil/ocsp/ResponseData.java    |   35 ++--
 .../src/com/netscape/cmsutil/ocsp/RevokedInfo.java |   20 ++-
 .../src/com/netscape/cmsutil/ocsp/Signature.java   |   28 ++-
 .../com/netscape/cmsutil/ocsp/SingleResponse.java  |   22 ++-
 .../src/com/netscape/cmsutil/ocsp/TBSRequest.java  |   31 ++-
 .../src/com/netscape/cmsutil/ocsp/UnknownInfo.java |   23 ++-
 .../netscape/cmsutil/password/IPasswordReader.java |    4 +-
 .../netscape/cmsutil/password/IPasswordStore.java  |    4 +-
 .../netscape/cmsutil/password/IPasswordWriter.java |    3 +-
 .../cmsutil/password/PlainPasswordFile.java        |   10 +-
 .../cmsutil/password/PlainPasswordReader.java      |    7 +-
 .../cmsutil/password/PlainPasswordWriter.java      |    7 +-
 .../com/netscape/cmsutil/radius/AccessAccept.java  |    6 +-
 .../netscape/cmsutil/radius/AccessChallenge.java   |    6 +-
 .../com/netscape/cmsutil/radius/AccessReject.java  |    6 +-
 .../com/netscape/cmsutil/radius/AccessRequest.java |    7 +-
 .../src/com/netscape/cmsutil/radius/Attribute.java |    7 +-
 .../netscape/cmsutil/radius/AttributeFactory.java  |    6 +-
 .../com/netscape/cmsutil/radius/AttributeSet.java  |    7 +-
 .../com/netscape/cmsutil/radius/Authenticator.java |    6 +-
 .../cmsutil/radius/CHAPChallengeAttribute.java     |    8 +-
 .../cmsutil/radius/CHAPPasswordAttribute.java      |   10 +-
 .../cmsutil/radius/CallbackIdAttribute.java        |   10 +-
 .../cmsutil/radius/CallbackNumberAttribute.java    |   10 +-
 .../cmsutil/radius/CallerStationIdAttribute.java   |   10 +-
 .../cmsutil/radius/CallingStationIdAttribute.java  |   10 +-
 .../cmsutil/radius/ChallengeException.java         |    7 +-
 .../netscape/cmsutil/radius/FilterIdAttribute.java |   10 +-
 .../radius/FramedAppleTalkLinkAttribute.java       |   10 +-
 .../radius/FramedAppleTalkNetworkAttribute.java    |   10 +-
 .../radius/FramedAppleTalkZoneAttribute.java       |   10 +-
 .../cmsutil/radius/FramedCompressionAttribute.java |   10 +-
 .../cmsutil/radius/FramedIPAddressAttribute.java   |   12 +-
 .../cmsutil/radius/FramedIPNetmaskAttribute.java   |   10 +-
 .../cmsutil/radius/FramedIPXNetworkAttribute.java  |   10 +-
 .../cmsutil/radius/FramedMTUAttribute.java         |   10 +-
 .../cmsutil/radius/FramedProtocolAttribute.java    |   10 +-
 .../cmsutil/radius/FramedRouteAttribute.java       |   10 +-
 .../cmsutil/radius/FramedRoutingAttribute.java     |   10 +-
 .../netscape/cmsutil/radius/GenericAttribute.java  |    6 +-
 .../cmsutil/radius/IdleTimeoutAttribute.java       |   10 +-
 .../cmsutil/radius/LoginIPHostAttribute.java       |   10 +-
 .../cmsutil/radius/LoginLATGroupAttribute.java     |   10 +-
 .../cmsutil/radius/LoginLATNodeAttribute.java      |   10 +-
 .../cmsutil/radius/LoginLATPortAttribute.java      |   10 +-
 .../cmsutil/radius/LoginLATServiceAttribute.java   |   10 +-
 .../cmsutil/radius/LoginServiceAttribute.java      |   10 +-
 .../cmsutil/radius/LoginTCPPortAttribute.java      |   10 +-
 .../netscape/cmsutil/radius/NASClassAttribute.java |   10 +-
 .../cmsutil/radius/NASIPAddressAttribute.java      |   14 +-
 .../cmsutil/radius/NASIdentifierAttribute.java     |   10 +-
 .../src/com/netscape/cmsutil/radius/NASPacket.java |    9 +-
 .../netscape/cmsutil/radius/NASPortAttribute.java  |   10 +-
 .../cmsutil/radius/NASPortTypeAttribute.java       |    8 +-
 .../src/com/netscape/cmsutil/radius/Packet.java    |    5 -
 .../com/netscape/cmsutil/radius/PacketFactory.java |    6 +-
 .../cmsutil/radius/PortLimitAttribute.java         |   11 +-
 .../cmsutil/radius/ProxyStateAttribute.java        |   10 +-
 .../com/netscape/cmsutil/radius/RadiusConn.java    |   20 +-
 .../netscape/cmsutil/radius/RejectException.java   |    6 +-
 .../cmsutil/radius/ReplyMessageAttribute.java      |   10 +-
 .../cmsutil/radius/RequestAuthenticator.java       |    9 +-
 .../cmsutil/radius/ResponseAuthenticator.java      |    6 +-
 .../com/netscape/cmsutil/radius/ServerPacket.java  |    6 +-
 .../cmsutil/radius/ServiceTypeAttribute.java       |   10 +-
 .../cmsutil/radius/SessionTimeoutAttribute.java    |   10 +-
 .../netscape/cmsutil/radius/StateAttribute.java    |   12 +-
 .../cmsutil/radius/TerminationActionAttribute.java |   10 +-
 .../netscape/cmsutil/radius/UserNameAttribute.java |   10 +-
 .../cmsutil/radius/UserPasswordAttribute.java      |   10 +-
 .../cmsutil/radius/VendorSpecificAttribute.java    |   10 +-
 .../com/netscape/cmsutil/scep/CRSPKIMessage.java   |  136 +++++++------
 .../util/src/com/netscape/cmsutil/util/Cert.java   |   29 ++--
 .../util/src/com/netscape/cmsutil/util/Fmt.java    |  130 ++++++------
 .../src/com/netscape/cmsutil/util/HMACDigest.java  |   23 +-
 .../util/src/com/netscape/cmsutil/util/Utils.java  |   31 ++-
 .../src/com/netscape/cmsutil/xml/XMLObject.java    |   36 +++-
 103 files changed, 816 insertions(+), 890 deletions(-)

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 0083dc92da506cc319e82a2d88d998cd541b00ce..427fd017b324032f908b2009d527dfbab6732d81 100644
--- a/pki/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java
+++ b/pki/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java
@@ -18,44 +18,84 @@
 package com.netscape.cmsutil.crypto;
 
 
-import java.net.*;
-import java.io.*;
-import java.util.*;
-import java.text.*;
-import java.math.*;
-
-import java.security.*;
-import java.security.cert.CertificateException;
-import java.security.cert.CertificateEncodingException;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.CharConversionException;
+import java.io.FilterOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.math.BigInteger;
+import java.security.InvalidKeyException;
+import java.security.KeyPair;
 import java.security.NoSuchAlgorithmException;
-import java.security.interfaces.RSAPublicKey;
-import java.security.interfaces.DSAPublicKey;
+import java.security.NoSuchProviderException;
+import java.security.PublicKey;
+import java.security.SignatureException;
+import java.security.cert.CertificateEncodingException;
+import java.security.cert.CertificateException;
 import java.security.interfaces.DSAParams;
-import java.security.cert.*;
+import java.security.interfaces.DSAPublicKey;
+import java.security.interfaces.RSAPublicKey;
+import java.util.Date;
+import java.util.Enumeration;
+import java.util.StringTokenizer;
+import java.util.Vector;
 
-//import sun.misc.BASE64Encoder;
-//import sun.misc.BASE64Decoder;
-import org.mozilla.jss.*;
-import org.mozilla.jss.asn1.*;
-import org.mozilla.jss.util.*;
-import org.mozilla.jss.pkix.primitive.*;
-import org.mozilla.jss.pkix.crmf.*;
-import org.mozilla.jss.pkcs7.ContentInfo;
-import org.mozilla.jss.pkcs7.*;
-import org.mozilla.jss.pkcs11.*;
-import org.mozilla.jss.pkcs11.PK11KeyPairGenerator;
-import org.mozilla.jss.crypto.*;
+import netscape.security.pkcs.PKCS10;
+import netscape.security.pkcs.PKCS7;
+import netscape.security.util.BigInt;
+import netscape.security.util.DerInputStream;
+import netscape.security.util.DerOutputStream;
+import netscape.security.util.DerValue;
+import netscape.security.util.ObjectIdentifier;
+import netscape.security.x509.AlgorithmId;
+import netscape.security.x509.CertificateAlgorithmId;
+import netscape.security.x509.CertificateChain;
+import netscape.security.x509.CertificateExtensions;
+import netscape.security.x509.CertificateIssuerName;
+import netscape.security.x509.CertificateSerialNumber;
+import netscape.security.x509.CertificateSubjectName;
+import netscape.security.x509.CertificateValidity;
+import netscape.security.x509.CertificateVersion;
+import netscape.security.x509.CertificateX509Key;
+import netscape.security.x509.X500Name;
+import netscape.security.x509.X500Signer;
+import netscape.security.x509.X509CertImpl;
+import netscape.security.x509.X509CertInfo;
+import netscape.security.x509.X509Key;
+
+import org.mozilla.jss.CryptoManager;
+import org.mozilla.jss.NoSuchTokenException;
+import org.mozilla.jss.asn1.ASN1Util;
+import org.mozilla.jss.asn1.InvalidBERException;
+import org.mozilla.jss.asn1.OBJECT_IDENTIFIER;
+import org.mozilla.jss.asn1.SEQUENCE;
+import org.mozilla.jss.crypto.Algorithm;
+import org.mozilla.jss.crypto.CryptoStore;
+import org.mozilla.jss.crypto.CryptoToken;
+import org.mozilla.jss.crypto.DigestAlgorithm;
+import org.mozilla.jss.crypto.InternalCertificate;
+import org.mozilla.jss.crypto.InvalidKeyFormatException;
+import org.mozilla.jss.crypto.KeyGenAlgorithm;
+import org.mozilla.jss.crypto.KeyGenerator;
+import org.mozilla.jss.crypto.KeyPairAlgorithm;
 import org.mozilla.jss.crypto.KeyPairGenerator;
+import org.mozilla.jss.crypto.NoSuchItemOnTokenException;
+import org.mozilla.jss.crypto.ObjectNotFoundException;
 import org.mozilla.jss.crypto.PrivateKey;
 import org.mozilla.jss.crypto.Signature;
+import org.mozilla.jss.crypto.SignatureAlgorithm;
+import org.mozilla.jss.crypto.SymmetricKey;
+import org.mozilla.jss.crypto.TokenException;
 import org.mozilla.jss.crypto.X509Certificate;
+import org.mozilla.jss.pkix.crmf.CertReqMsg;
+import org.mozilla.jss.pkix.crmf.CertRequest;
+import org.mozilla.jss.pkix.crmf.CertTemplate;
+import org.mozilla.jss.pkix.primitive.Name;
+import org.mozilla.jss.pkix.primitive.SubjectPublicKeyInfo;
 import org.mozilla.jss.util.Base64OutputStream;
 
-import netscape.security.util.*;
-import netscape.security.pkcs.*;
-import netscape.security.x509.*;
 import com.netscape.cmsutil.util.Cert;
-
 import com.netscape.osutil.OSUtil;
 
 public class CryptoUtil {
@@ -123,7 +163,7 @@ public class CryptoUtil {
                 NoSuchTokenException,
                 NoSuchAlgorithmException,
                 TokenException {
-        CryptoToken t = getTokenByName(token);
+        CryptoToken t = CryptoUtil.getTokenByName(token);
         KeyPairGenerator g = t.getKeyPairGenerator(KeyPairAlgorithm.RSA);
 
         g.initialize(keysize);
@@ -150,7 +190,7 @@ public class CryptoUtil {
                 NoSuchTokenException,
                 NoSuchAlgorithmException,
                 TokenException {
-        return generateECCKeyPair(token, keysize, null, null);
+        return CryptoUtil.generateECCKeyPair(token, keysize, null, null);
     }
 
     public static KeyPair generateECCKeyPair(String token, int keysize,
@@ -160,7 +200,7 @@ public class CryptoUtil {
                 NoSuchTokenException,
                 NoSuchAlgorithmException,
                 TokenException {
-        CryptoToken t = getTokenByName(token);
+        CryptoToken t = CryptoUtil.getTokenByName(token);
 
         KeyPairAlgorithm alg = KeyPairAlgorithm.EC;
         KeyPairGenerator g = t.getKeyPairGenerator(alg);
@@ -181,7 +221,7 @@ public class CryptoUtil {
                 NoSuchTokenException,
                 NoSuchAlgorithmException,
                 TokenException {
-        return generateECCKeyPair(token, curveName, null, null);
+        return CryptoUtil.generateECCKeyPair(token, curveName, null, null);
     }
 
     public static KeyPair generateECCKeyPair(CryptoToken token, String curveName)
@@ -189,7 +229,7 @@ public class CryptoUtil {
                 NoSuchTokenException,
                 NoSuchAlgorithmException,
                 TokenException {
-        return generateECCKeyPair(token, curveName, null, null);
+        return CryptoUtil.generateECCKeyPair(token, curveName, null, null);
     }
 
     public static KeyPair generateECCKeyPair(String token, String curveName,
@@ -199,8 +239,8 @@ public class CryptoUtil {
                 NoSuchTokenException,
                 NoSuchAlgorithmException,
                 TokenException {
-        CryptoToken t = getTokenByName(token);
-        return generateECCKeyPair(t, curveName, usage_ops, usage_mask);
+        CryptoToken t = CryptoUtil.getTokenByName(token);
+        return CryptoUtil.generateECCKeyPair(t, curveName, usage_ops, usage_mask);
     }
 
     public static KeyPair generateECCKeyPair(CryptoToken token, String curveName,
@@ -271,20 +311,18 @@ public class CryptoUtil {
      * formats a cert request
      */
     public static String reqFormat(String content) {
-        int beginIndex = CERTREQ_BEGIN_HEADING.length();
-        int endIndex = CERTREQ_END_HEADING.length();
+        CryptoUtil.CERTREQ_BEGIN_HEADING.length();
+        CryptoUtil.CERTREQ_END_HEADING.length();
                                                                                 
-        String result = CERTREQ_BEGIN_HEADING + "\n";
-        int index = 0;
-                                                                                
-        while (content.length() >= LINE_COUNT) {
-            result = result + content.substring(0, LINE_COUNT) + "\n";
-            content = content.substring(LINE_COUNT);
+        String result = CryptoUtil.CERTREQ_BEGIN_HEADING + "\n";
+        while (content.length() >= CryptoUtil.LINE_COUNT) {
+            result = result + content.substring(0, CryptoUtil.LINE_COUNT) + "\n";
+            content = content.substring(CryptoUtil.LINE_COUNT);
         }
         if (content.length() > 0) {
-            result = result + content + "\n" + CERTREQ_END_HEADING;
+            result = result + content + "\n" + CryptoUtil.CERTREQ_END_HEADING;
         } else {
-            result = result + CERTREQ_END_HEADING;
+            result = result + CryptoUtil.CERTREQ_END_HEADING;
         }
                                                                                 
         return result;
@@ -301,9 +339,9 @@ public class CryptoUtil {
                      CryptoManager.NotInitializedException,
                      NoSuchAlgorithmException
     {
-        X509Key x509key = getPublicX509Key(modulus, exponent);
-        PrivateKey prik = findPrivateKeyFromID(prikdata);
-        PKCS10 pkcs10 = createCertificationRequest(dn, x509key, prik);
+        X509Key x509key = CryptoUtil.getPublicX509Key(modulus, exponent);
+        PrivateKey prik = CryptoUtil.findPrivateKeyFromID(prikdata);
+        PKCS10 pkcs10 = CryptoUtil.createCertificationRequest(dn, x509key, prik);
         ByteArrayOutputStream bs = new ByteArrayOutputStream();
         PrintStream ps = new PrintStream(bs);
         pkcs10.print(ps);
@@ -321,9 +359,9 @@ public class CryptoUtil {
                      CryptoManager.NotInitializedException,
                      NoSuchAlgorithmException
     {
-        X509Key x509key = getPublicX509Key(modulus, exponent);
-        PrivateKey prik = findPrivateKeyFromID(prikdata);
-        PKCS10 pkcs10 = createCertificationRequest(dn, x509key, prik, alg);
+        X509Key x509key = CryptoUtil.getPublicX509Key(modulus, exponent);
+        PrivateKey prik = CryptoUtil.findPrivateKeyFromID(prikdata);
+        PKCS10 pkcs10 = CryptoUtil.createCertificationRequest(dn, x509key, prik, alg);
         ByteArrayOutputStream bs = new ByteArrayOutputStream();
         PrintStream ps = new PrintStream(bs);
         pkcs10.print(ps);
@@ -337,20 +375,18 @@ public class CryptoUtil {
         if (content == null || content.length() == 0) {
             return "";
         }
-        int beginIndex = CERT_BEGIN_HEADING.length();
-        int endIndex = CERT_END_HEADING.length();
+        CryptoUtil.CERT_BEGIN_HEADING.length();
+        CryptoUtil.CERT_END_HEADING.length();
                                                                                 
-        String result = CERT_BEGIN_HEADING + "\n";
-        int index = 0;
-                                                                                
-        while (content.length() >= LINE_COUNT) {
-            result = result + content.substring(0, LINE_COUNT) + "\n";
-            content = content.substring(LINE_COUNT);
+        String result = CryptoUtil.CERT_BEGIN_HEADING + "\n";
+        while (content.length() >= CryptoUtil.LINE_COUNT) {
+            result = result + content.substring(0, CryptoUtil.LINE_COUNT) + "\n";
+            content = content.substring(CryptoUtil.LINE_COUNT);
         }
         if (content.length() > 0) {
-            result = result + content + "\n" + CERT_END_HEADING;
+            result = result + content + "\n" + CryptoUtil.CERT_END_HEADING;
         } else {
-            result = result + CERT_END_HEADING;
+            result = result + CryptoUtil.CERT_END_HEADING;
         }
                                                                                 
         return result;
@@ -367,7 +403,7 @@ public class CryptoUtil {
             return s;
         }
                                                                                 
-        if (s.startsWith(CERT_BEGIN_HEADING) && s.endsWith(CERT_END_HEADING)) {
+        if (s.startsWith(CryptoUtil.CERT_BEGIN_HEADING) && s.endsWith(CryptoUtil.CERT_END_HEADING)) {
             return (s.substring(27, (s.length() - 25)));
         }
                                                                                 
@@ -446,7 +482,7 @@ public class CryptoUtil {
                     CertificateEncodingException,
                     CertificateException
     {
-        byte[] blah = base64Decode(certchain);
+        byte[] blah = CryptoUtil.base64Decode(certchain);
         CryptoManager manager = CryptoManager.getInstance();
         PKCS7 pkcs7 = null;
         try {  
@@ -505,7 +541,7 @@ public class CryptoUtil {
         CertTemplate certTemplate = certreq.getCertTemplate();
         SubjectPublicKeyInfo spkinfo = certTemplate.getPublicKey();
         PublicKey pkey = spkinfo.toPublicKey();
-        X509Key x509key = convertPublicKeyToX509Key(pkey);
+        X509Key x509key = CryptoUtil.convertPublicKeyToX509Key(pkey);
         return x509key;
     }
 
@@ -572,7 +608,7 @@ public class CryptoUtil {
         throws IOException, 
                 CertificateException, 
                 InvalidKeyException {
-        return createX509CertInfo(convertPublicKeyToX509Key(pair.getPublic()), 
+        return CryptoUtil.createX509CertInfo(CryptoUtil.convertPublicKeyToX509Key(pair.getPublic()), 
                 serialno, issuername, subjname, notBefore, notAfter);
     }
 
@@ -582,7 +618,7 @@ public class CryptoUtil {
         throws IOException, 
                 CertificateException, 
                 InvalidKeyException {
-        return createX509CertInfo(convertPublicKeyToX509Key(publickey), serialno,
+        return CryptoUtil.createX509CertInfo(CryptoUtil.convertPublicKeyToX509Key(publickey), serialno,
                 issuername, subjname, notBefore, notAfter);
     }
 
@@ -595,7 +631,7 @@ public class CryptoUtil {
         // set default; use the other call with "alg" to set algorithm
         String alg = "SHA256withRSA";
         try {
-        return createX509CertInfo (x509key, serialno, issuername, subjname, notBefore, notAfter, alg);
+        return CryptoUtil.createX509CertInfo (x509key, serialno, issuername, subjname, notBefore, notAfter, alg);
         } catch (NoSuchAlgorithmException ex) {
           // for those that calls the old call without alg
           throw new CertificateException("createX509CertInfo old call should not be here");
@@ -621,10 +657,10 @@ public class CryptoUtil {
                 CertificateSubjectName(new X500Name(subjname)));
         info.set(X509CertInfo.VALIDITY, new
                 CertificateValidity(notBefore, notAfter));
-        AlgorithmId sigAlgId = new AlgorithmId();
+        new AlgorithmId();
 
         info.set(X509CertInfo.ALGORITHM_ID, new
-                CertificateAlgorithmId(sigAlgId.get(alg)));
+                CertificateAlgorithmId(AlgorithmId.get(alg)));
         info.set(X509CertInfo.KEY, new CertificateX509Key(x509key));
         info.set(X509CertInfo.EXTENSIONS, new CertificateExtensions());
         return info;
@@ -645,7 +681,7 @@ public class CryptoUtil {
     {
         // set default; use the other call with "alg" to specify algorithm
         String alg = "SHA256withEC";
-        return signECCCert(privateKey, certInfo, alg);
+        return CryptoUtil.signECCCert(privateKey, certInfo, alg);
     }
 
     public static X509CertImpl signECCCert(PrivateKey privateKey, 
@@ -660,7 +696,7 @@ public class CryptoUtil {
                 IOException,
                 CertificateException
     {
-       return signCert(privateKey, certInfo, 
+       return CryptoUtil.signCert(privateKey, certInfo, 
                 Cert.mapAlgorithmToJss(alg));
     }
 
@@ -678,7 +714,7 @@ public class CryptoUtil {
                 SignatureException,
                 IOException,
                 CertificateException {
-        return signCert (privateKey, certInfo,
+        return CryptoUtil.signCert (privateKey, certInfo,
                  Cert.mapAlgorithmToJss(alg));
     }
 
@@ -701,7 +737,7 @@ public class CryptoUtil {
                new CertificateAlgorithmId(aid));
                                                                                 
         org.mozilla.jss.crypto.PrivateKey priKey = 
-              (org.mozilla.jss.crypto.PrivateKey) privateKey;
+              privateKey;
         CryptoToken token = priKey.getOwningToken();
                                                                                 
         DerOutputStream tmp = new DerOutputStream();
@@ -732,10 +768,10 @@ public class CryptoUtil {
                 SignatureException {
         // give default
         String alg = "SHA256withRSA";
-        if (isECCKey(pubk)) {
+        if (CryptoUtil.isECCKey(pubk)) {
           alg = "SHA256withEC";
         }
-        return createCertificationRequest(subjectName, pubk, prik, alg);
+        return CryptoUtil.createCertificationRequest(subjectName, pubk, prik, alg);
     }
 
     public static PKCS10 createCertificationRequest(String subjectName,
@@ -766,16 +802,16 @@ public class CryptoUtil {
                 SignatureException {
         String alg;
         PublicKey pubk = keyPair.getPublic();
-        X509Key key = convertPublicKeyToX509Key(pubk);
+        X509Key key = CryptoUtil.convertPublicKeyToX509Key(pubk);
         if (pubk instanceof RSAPublicKey) {
             alg = "SHA256withRSA";
-        } else if (isECCKey(key)) {
+        } else if (CryptoUtil.isECCKey(key)) {
             alg = "SHA256withEC";
         } else {
             // Assert.assert(pubk instanceof DSAPublicKey);
             alg = "DSA";
         }
-        return createCertificationRequest(subjectName,keyPair, alg);
+        return CryptoUtil.createCertificationRequest(subjectName,keyPair, alg);
     }
 
     public static PKCS10 createCertificationRequest(String subjectName,
@@ -784,7 +820,7 @@ public class CryptoUtil {
                 InvalidKeyException, IOException, CertificateException,
                 SignatureException {
         PublicKey pubk = keyPair.getPublic();
-        X509Key key = convertPublicKeyToX509Key(pubk);
+        X509Key key = CryptoUtil.convertPublicKeyToX509Key(pubk);
                                                                                 
         java.security.Signature sig = java.security.Signature.getInstance(alg,
                 "Mozilla-JSS");
@@ -822,7 +858,7 @@ public class CryptoUtil {
             return;
         }
         for (int i = 0; i < certs.length; i++) {
-            trustCert((InternalCertificate) certs[i]);
+            CryptoUtil.trustCert((InternalCertificate) certs[i]);
         }
     }
 
@@ -844,8 +880,8 @@ public class CryptoUtil {
      * what we referring.
      */
     public static boolean isCertTrusted(InternalCertificate cert) {
-        if (isTrust(cert.getSSLTrust()) && isTrust(cert.getObjectSigningTrust())
-                && isTrust(cert.getEmailTrust())) {
+        if (CryptoUtil.isTrust(cert.getSSLTrust()) && CryptoUtil.isTrust(cert.getObjectSigningTrust())
+                && CryptoUtil.isTrust(cert.getEmailTrust())) {
             return true;
         } else {
             return false;
@@ -920,13 +956,13 @@ public class CryptoUtil {
 
         while (enums.hasMoreElements()) {
             CryptoToken token = (CryptoToken) enums.nextElement();
-            String tokenName = token.getName();
+            token.getName();
             CryptoStore store = token.getCryptoStore();
             PrivateKey keys[] = store.getPrivateKeys(); 
 
             if (keys != null) {
                 for (int i = 0; i < keys.length; i++) {
-                    if (compare(keys[i].getUniqueID(), id)) {
+                    if (CryptoUtil.compare(keys[i].getUniqueID(), id)) {
                         return keys[i];
                     }
                 }
@@ -947,14 +983,14 @@ public class CryptoUtil {
 
         while (enums.hasMoreElements()) {
             CryptoToken token = (CryptoToken) enums.nextElement();
-            String tokenName = token.getName();
+            token.getName();
                                                                                 
             CryptoStore store = token.getCryptoStore();
             org.mozilla.jss.crypto.X509Certificate list[] = store.getCertificates();
                                                                                
             for (int i = 0; i < list.length; i++) {
                 try {
-                    PrivateKey key = cm.findPrivKeyByCert(list[i]);
+                    cm.findPrivKeyByCert(list[i]);
                     X509CertImpl impl = null;
 
                     try {
@@ -985,7 +1021,7 @@ public class CryptoUtil {
      */
     public static void deletePrivateKey(PrivateKey prikey)
         throws CryptoManager.NotInitializedException, TokenException {
-        CryptoManager cm = CryptoManager.getInstance();
+        CryptoManager.getInstance();
 
         try {
             CryptoToken token = prikey.getOwningToken();
@@ -1049,7 +1085,7 @@ public class CryptoUtil {
         CryptoManager cm = CryptoManager.getInstance();
         X509Certificate cert = cm.importCertPackage(c.getBytes(), nickname);
 
-        trustCertByNickname(nickname);
+        CryptoUtil.trustCertByNickname(nickname);
         return cert;
     }
 
@@ -1066,7 +1102,7 @@ public class CryptoUtil {
         CryptoManager cm = CryptoManager.getInstance();
 
         cm.importUserCACertPackage(cert.getEncoded(), nickname);
-        trustCertByNickname(nickname);
+        CryptoUtil.trustCertByNickname(nickname);
     }
 
     public static void importUserCertificate(X509CertImpl cert, String nickname,
@@ -1081,7 +1117,7 @@ public class CryptoUtil {
 
         cm.importUserCACertPackage(cert.getEncoded(), nickname);
         if (trust)
-            trustCertByNickname(nickname);
+            CryptoUtil.trustCertByNickname(nickname);
     }
 
     public static java.security.cert.X509Certificate[] getX509CertificateFromPKCS7(byte[] b) throws IOException {
diff --git a/pki/base/util/src/com/netscape/cmsutil/crypto/Module.java b/pki/base/util/src/com/netscape/cmsutil/crypto/Module.java
index 9a4fa800d2ec4ae22a5eb2496063b2fe53dc60da..e7971ea78db4de825feb6f9990231729685fad00 100644
--- a/pki/base/util/src/com/netscape/cmsutil/crypto/Module.java
+++ b/pki/base/util/src/com/netscape/cmsutil/crypto/Module.java
@@ -17,9 +17,9 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmsutil.crypto;
 
-import org.mozilla.jss.crypto.*;
+import java.util.Vector;
 
-import java.util.*;
+import org.mozilla.jss.crypto.CryptoToken;
 
 public class Module {
     // Common Name is the name given when module is added
diff --git a/pki/base/util/src/com/netscape/cmsutil/crypto/Token.java b/pki/base/util/src/com/netscape/cmsutil/crypto/Token.java
index 8014726767488247621e496421ce93b591d5b5ff..f86e49bdcc5378d9ef7d84f8c882eb738122b918 100644
--- a/pki/base/util/src/com/netscape/cmsutil/crypto/Token.java
+++ b/pki/base/util/src/com/netscape/cmsutil/crypto/Token.java
@@ -17,9 +17,7 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmsutil.crypto;
 
-import java.util.*;
-import org.mozilla.jss.*;
-import org.mozilla.jss.crypto.*;
+import org.mozilla.jss.crypto.CryptoToken;
 
 public class Token {
     CryptoToken mToken;
diff --git a/pki/base/util/src/com/netscape/cmsutil/http/ConnectAsync.java b/pki/base/util/src/com/netscape/cmsutil/http/ConnectAsync.java
index 61d6d785f1eae6edda676cc33d8db05ae49f7a67..8922f38dd35f6b81dffc3f83b108e6c4476e1e46 100644
--- a/pki/base/util/src/com/netscape/cmsutil/http/ConnectAsync.java
+++ b/pki/base/util/src/com/netscape/cmsutil/http/ConnectAsync.java
@@ -18,15 +18,9 @@
 package com.netscape.cmsutil.http;
 
 
-import java.net.*;
-import java.io.*;
-import netscape.ldap.*;
-import org.mozilla.jss.ssl.*;
+import java.net.SocketException;
 
-import com.netscape.cmsutil.net.*;
-import org.mozilla.jss.CryptoManager;
-import org.mozilla.jss.crypto.X509Certificate;
-import org.mozilla.jss.crypto.X509Certificate;
+import com.netscape.cmsutil.net.ISocketFactory;
 
 
 public class ConnectAsync extends Thread {
diff --git a/pki/base/util/src/com/netscape/cmsutil/http/HttpClient.java b/pki/base/util/src/com/netscape/cmsutil/http/HttpClient.java
index 2efc72674dcc56f4f1ef5354875f345ac0289518..5924745c1209a291c2acbf4ecb05c68eaf08a660 100644
--- a/pki/base/util/src/com/netscape/cmsutil/http/HttpClient.java
+++ b/pki/base/util/src/com/netscape/cmsutil/http/HttpClient.java
@@ -17,10 +17,17 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmsutil.http;
 
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
 import java.net.Socket;
-import java.io.*;
-import com.netscape.cmsutil.net.*;
-import org.mozilla.jss.ssl.*;
+
+import org.mozilla.jss.ssl.SSLCertificateApprovalCallback;
+
+import com.netscape.cmsutil.net.ISocketFactory;
 
 /**
  * basic http client.
@@ -192,9 +199,6 @@ public class HttpClient {
         //System.out.println(content);
 
         if (args.length >= 4 && args[3].equalsIgnoreCase("keep-alive")) {
-            int len;
-            char[] msgbody;
-
             for (int i = 0; i < 2; i++) {
                 if (i == 1) req.setHeader("Connection", "Close");
                 resp = c.send(req);
diff --git a/pki/base/util/src/com/netscape/cmsutil/http/HttpEofException.java b/pki/base/util/src/com/netscape/cmsutil/http/HttpEofException.java
index 6944b386aa1b518af2d1cc912b2a79f90f59c6b7..706321fabf7d1eb5fc347b04b0fbc446b0ff8b44 100644
--- a/pki/base/util/src/com/netscape/cmsutil/http/HttpEofException.java
+++ b/pki/base/util/src/com/netscape/cmsutil/http/HttpEofException.java
@@ -22,6 +22,8 @@ import java.io.IOException;
 
 
 public class HttpEofException extends IOException {
+    private static final long serialVersionUID = 433303354049669059L;
+
     public HttpEofException() {
         super();
     }
diff --git a/pki/base/util/src/com/netscape/cmsutil/http/HttpMessage.java b/pki/base/util/src/com/netscape/cmsutil/http/HttpMessage.java
index 56c4a27f9af3cbb22d4ee06a0aa6b3f2fb0d8bc9..93eeef68c14d62d08de570b807e4835980b9de5b 100644
--- a/pki/base/util/src/com/netscape/cmsutil/http/HttpMessage.java
+++ b/pki/base/util/src/com/netscape/cmsutil/http/HttpMessage.java
@@ -18,9 +18,11 @@
 package com.netscape.cmsutil.http;
 
 
-import java.io.*;
-import java.util.Hashtable;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
 import java.util.Enumeration;
+import java.util.Hashtable;
 
 
 /**
diff --git a/pki/base/util/src/com/netscape/cmsutil/http/HttpProtocolException.java b/pki/base/util/src/com/netscape/cmsutil/http/HttpProtocolException.java
index 8a52f4f78d07e13998bdefeffddba8c538f1eb49..116f725998ca7269ab2cbbe5e3f9cf34bb636786 100644
--- a/pki/base/util/src/com/netscape/cmsutil/http/HttpProtocolException.java
+++ b/pki/base/util/src/com/netscape/cmsutil/http/HttpProtocolException.java
@@ -22,6 +22,8 @@ import java.io.IOException;
 
 
 public class HttpProtocolException extends IOException {
+    private static final long serialVersionUID = -953002842302351684L;
+
     public HttpProtocolException() {
         super();
     }
diff --git a/pki/base/util/src/com/netscape/cmsutil/http/HttpRequest.java b/pki/base/util/src/com/netscape/cmsutil/http/HttpRequest.java
index f22c5045230efc478478bed64b7924d192229f46..848b07f349fac36030182a012fc261ba1d2a5833 100644
--- a/pki/base/util/src/com/netscape/cmsutil/http/HttpRequest.java
+++ b/pki/base/util/src/com/netscape/cmsutil/http/HttpRequest.java
@@ -18,9 +18,9 @@
 package com.netscape.cmsutil.http;
 
 
-import java.io.*;
-import java.util.Hashtable;
-import java.util.Enumeration;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
 
 
 /**
@@ -49,8 +49,8 @@ public class HttpRequest extends HttpMessage {
      */
     public void setMethod(String method)
         throws HttpProtocolException {
-        if (!method.equals(GET) && !method.equals(HEAD) && 
-            !method.equals(POST))
+        if (!method.equals(HttpRequest.GET) && !method.equals(HttpRequest.HEAD) && 
+            !method.equals(HttpRequest.POST))
             throw new HttpProtocolException("No such method " + method);
         mMethod = method;
     }
@@ -89,8 +89,8 @@ public class HttpRequest extends HttpMessage {
         int method = mLine.indexOf(Http.SP);
 
         mMethod = mLine.substring(0, method);
-        if (!mMethod.equals(GET) && !mMethod.equals(POST) && 
-            !mMethod.equals(HEAD)) {
+        if (!mMethod.equals(HttpRequest.GET) && !mMethod.equals(HttpRequest.POST) && 
+            !mMethod.equals(HttpRequest.HEAD)) {
             reset();
             throw new HttpProtocolException("Bad Http request method");
         }	
diff --git a/pki/base/util/src/com/netscape/cmsutil/http/HttpResponse.java b/pki/base/util/src/com/netscape/cmsutil/http/HttpResponse.java
index 9309f2bb10cd098f010406946724201acd85d4fb..09d8e562d1ca27c7eb32c787e75ffe37f5b27888 100644
--- a/pki/base/util/src/com/netscape/cmsutil/http/HttpResponse.java
+++ b/pki/base/util/src/com/netscape/cmsutil/http/HttpResponse.java
@@ -18,9 +18,9 @@
 package com.netscape.cmsutil.http;
 
 
-import java.io.*;
-import java.util.Hashtable;
-import java.util.Enumeration;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
 
 
 /**
diff --git a/pki/base/util/src/com/netscape/cmsutil/http/JssSSLSocketFactory.java b/pki/base/util/src/com/netscape/cmsutil/http/JssSSLSocketFactory.java
index f72c34badac876a66d2e201697633c2f189a9d6d..2b78a230f43f341cb6af6dce0e716a662b57fb35 100644
--- a/pki/base/util/src/com/netscape/cmsutil/http/JssSSLSocketFactory.java
+++ b/pki/base/util/src/com/netscape/cmsutil/http/JssSSLSocketFactory.java
@@ -18,14 +18,19 @@
 package com.netscape.cmsutil.http;
 
 
-import java.net.*;
-import java.io.*;
-import netscape.ldap.*;
-import org.mozilla.jss.ssl.*;
+import java.io.IOException;
+import java.net.Socket;
+import java.net.SocketException;
+import java.net.UnknownHostException;
+
 import org.mozilla.jss.CryptoManager;
-import org.mozilla.jss.crypto.X509Certificate;
+import org.mozilla.jss.ssl.SSLCertificateApprovalCallback;
+import org.mozilla.jss.ssl.SSLClientCertificateSelectionCallback;
+import org.mozilla.jss.ssl.SSLHandshakeCompletedEvent;
+import org.mozilla.jss.ssl.SSLHandshakeCompletedListener;
+import org.mozilla.jss.ssl.SSLSocket;
 
-import com.netscape.cmsutil.net.*;
+import com.netscape.cmsutil.net.ISocketFactory;
 
 /**
  * Uses NSS ssl socket.
@@ -85,9 +90,9 @@ public class JssSSLSocketFactory implements ISocketFactory {
             } catch( SocketException e) {
             }
         }
-        for (i = 0; cipherSuites[i] != 0; ++i) {
+        for (i = 0; JssSSLSocketFactory.cipherSuites[i] != 0; ++i) {
             try {
-                SSLSocket.setCipherPreferenceDefault(cipherSuites[i], true);
+                SSLSocket.setCipherPreferenceDefault(JssSSLSocketFactory.cipherSuites[i], true);
             } catch( SocketException e) {
             }
         }
@@ -115,7 +120,7 @@ public class JssSSLSocketFactory implements ISocketFactory {
 
             s.setUseClientMode(true);
             s.enableSSL2(false);
-            s.enableSSL2Default(false);
+            SSLSocket.enableSSL2Default(false);
             s.enableV2CompatibleHello(false);
 
             SSLHandshakeCompletedListener listener = null;
@@ -124,11 +129,7 @@ public class JssSSLSocketFactory implements ISocketFactory {
             s.addHandshakeCompletedListener(listener);
 
             if (mClientAuthCertNickname != null) {
-                // 052799 setClientCertNickname does not
-                // report error if the nickName is invalid.
-                // So we check this ourself using
-                // findCertByNickname
-                X509Certificate cert = CryptoManager.getInstance().findCertByNickname(mClientAuthCertNickname);
+                CryptoManager.getInstance().findCertByNickname(mClientAuthCertNickname);
 
                 s.setClientCertNickname(mClientAuthCertNickname);
             }
diff --git a/pki/base/util/src/com/netscape/cmsutil/ldap/LDAPUtil.java b/pki/base/util/src/com/netscape/cmsutil/ldap/LDAPUtil.java
index 9f0884833922bdb354623b3a24fbedf163bfd3d5..eaae00074295a8bf0eb8ab4cd2627df57ef8f64c 100644
--- a/pki/base/util/src/com/netscape/cmsutil/ldap/LDAPUtil.java
+++ b/pki/base/util/src/com/netscape/cmsutil/ldap/LDAPUtil.java
@@ -17,9 +17,19 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmsutil.ldap;
 
-import netscape.ldap.*;
-import netscape.ldap.util.*;
-import java.io.*;
+import java.io.IOException;
+
+import netscape.ldap.LDAPAttribute;
+import netscape.ldap.LDAPAttributeSet;
+import netscape.ldap.LDAPConnection;
+import netscape.ldap.LDAPEntry;
+import netscape.ldap.LDAPException;
+import netscape.ldap.LDAPModification;
+import netscape.ldap.util.LDIF;
+import netscape.ldap.util.LDIFAttributeContent;
+import netscape.ldap.util.LDIFContent;
+import netscape.ldap.util.LDIFModifyContent;
+import netscape.ldap.util.LDIFRecord;
 
 public class LDAPUtil {
     public static void importLDIF(LDAPConnection conn, String filename) throws IOException {
diff --git a/pki/base/util/src/com/netscape/cmsutil/net/ISocketFactory.java b/pki/base/util/src/com/netscape/cmsutil/net/ISocketFactory.java
index 3bbe2303a6f109a6684a31454830a7d34a1de49b..9227f5911bb4be8f9d55f1e1801c3619f2705650 100644
--- a/pki/base/util/src/com/netscape/cmsutil/net/ISocketFactory.java
+++ b/pki/base/util/src/com/netscape/cmsutil/net/ISocketFactory.java
@@ -17,10 +17,12 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmsutil.net;
 
-import java.net.Socket;
 import java.io.IOException;
+import java.net.Socket;
 import java.net.UnknownHostException;
-import org.mozilla.jss.ssl.*;
+
+import org.mozilla.jss.ssl.SSLCertificateApprovalCallback;
+import org.mozilla.jss.ssl.SSLClientCertificateSelectionCallback;
 
 public interface ISocketFactory 
 {
diff --git a/pki/base/util/src/com/netscape/cmsutil/ocsp/BasicOCSPResponse.java b/pki/base/util/src/com/netscape/cmsutil/ocsp/BasicOCSPResponse.java
index b59854a2f739dcc27b0445ab794fa0f80ef945df..73c981682f15491ed2c86d4b4dd106908ca0acf1 100644
--- a/pki/base/util/src/com/netscape/cmsutil/ocsp/BasicOCSPResponse.java
+++ b/pki/base/util/src/com/netscape/cmsutil/ocsp/BasicOCSPResponse.java
@@ -17,13 +17,21 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmsutil.ocsp;
 
-import java.io.*;
-import org.mozilla.jss.asn1.*;
-import java.security.Signer;
-import org.mozilla.jss.asn1.OCTET_STRING;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import org.mozilla.jss.asn1.ASN1Template;
+import org.mozilla.jss.asn1.ASN1Value;
 import org.mozilla.jss.asn1.BIT_STRING;
-import org.mozilla.jss.pkix.primitive.AlgorithmIdentifier;
+import org.mozilla.jss.asn1.EXPLICIT;
+import org.mozilla.jss.asn1.InvalidBERException;
+import org.mozilla.jss.asn1.OCTET_STRING;
+import org.mozilla.jss.asn1.SEQUENCE;
+import org.mozilla.jss.asn1.Tag;
 import org.mozilla.jss.pkix.cert.Certificate;
+import org.mozilla.jss.pkix.primitive.AlgorithmIdentifier;
 
 /**
  * RFC 2560:
@@ -66,7 +74,7 @@ public class BasicOCSPResponse implements Response
 
         // extract _rd, _signAlg, _signature and _certs
         try {
-            BasicOCSPResponse resp = (BasicOCSPResponse) getTemplate().decode(new ByteArrayInputStream(data));
+            BasicOCSPResponse resp = (BasicOCSPResponse) BasicOCSPResponse.getTemplate().decode(new ByteArrayInputStream(data));
             _rd = resp.getResponseData();
             _signAlg = resp.getSignatureAlgorithm();
             _signature = resp.getSignature();
@@ -80,7 +88,7 @@ public class BasicOCSPResponse implements Response
 
     public Tag getTag()
     {
-        return TAG;
+        return BasicOCSPResponse.TAG;
     }
 
     public void encode(Tag t, OutputStream os) throws IOException
@@ -106,7 +114,7 @@ public class BasicOCSPResponse implements Response
 
     public void encode(OutputStream os) throws IOException
     {
-        encode(TAG, os);
+        encode(BasicOCSPResponse.TAG, os);
     }
 
     public OCTET_STRING getBytes()
@@ -147,7 +155,7 @@ public class BasicOCSPResponse implements Response
     private static final Template templateInstance = new Template();
 
     public static Template getTemplate() {
-        return templateInstance;
+        return BasicOCSPResponse.templateInstance;
     }
 
     /**
@@ -170,13 +178,13 @@ public class BasicOCSPResponse implements Response
 
          public boolean tagMatch(Tag tag)
          {
-             return TAG.equals(tag);
+             return BasicOCSPResponse.TAG.equals(tag);
          }
 
          public ASN1Value decode(InputStream istream)
              throws InvalidBERException, IOException
          {
-             return decode(TAG, istream);
+             return decode(BasicOCSPResponse.TAG, istream);
          }
 
          public ASN1Value decode(Tag implicitTag, InputStream istream)
diff --git a/pki/base/util/src/com/netscape/cmsutil/ocsp/CertID.java b/pki/base/util/src/com/netscape/cmsutil/ocsp/CertID.java
index 36bf42e808b9f69d9a71e6ab6dd16de62645cbd9..1d458946fa2b80894e08587f2039cdb99a3f301f 100644
--- a/pki/base/util/src/com/netscape/cmsutil/ocsp/CertID.java
+++ b/pki/base/util/src/com/netscape/cmsutil/ocsp/CertID.java
@@ -17,9 +17,18 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmsutil.ocsp;
 
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import org.mozilla.jss.asn1.ASN1Template;
+import org.mozilla.jss.asn1.ASN1Value;
+import org.mozilla.jss.asn1.INTEGER;
+import org.mozilla.jss.asn1.InvalidBERException;
+import org.mozilla.jss.asn1.OCTET_STRING;
+import org.mozilla.jss.asn1.SEQUENCE;
+import org.mozilla.jss.asn1.Tag;
 import org.mozilla.jss.pkix.primitive.AlgorithmIdentifier;
-import org.mozilla.jss.asn1.*;
-import java.io.*;
 
 /**
  * RFC 2560:
@@ -69,7 +78,8 @@ public class CertID implements ASN1Value
 	///////////////////////////////////////////////////////////////////////
 	// Constructors
 	///////////////////////////////////////////////////////////////////////
-	private CertID() { }
+	@SuppressWarnings("unused")
+    private CertID() { }
 
 	public CertID(AlgorithmIdentifier hashAlgorithm,
 		OCTET_STRING issuerNameHash, OCTET_STRING issuerKeyHash,
@@ -98,12 +108,12 @@ public class CertID implements ASN1Value
 
 	public Tag getTag()
 	{
-		return TAG;
+		return CertID.TAG;
 	}
 
 	public void encode(OutputStream ostream) throws IOException
 	{
-		encode(TAG, ostream);
+		encode(CertID.TAG, ostream);
 	}
 
 	public void encode(Tag implicitTag, OutputStream ostream)
@@ -115,7 +125,7 @@ public class CertID implements ASN1Value
 	private static final Template templateInstance = new Template();
 
 	public static Template getTemplate() {
-		return templateInstance;
+		return CertID.templateInstance;
 	}
 
 	/**
@@ -137,13 +147,13 @@ public class CertID implements ASN1Value
 
 		public boolean tagMatch(Tag tag)
 		{
-			return TAG.equals(tag);
+			return CertID.TAG.equals(tag);
 		}
 
 		public ASN1Value decode(InputStream istream)
 			throws InvalidBERException, IOException
 		{
-			return decode(TAG, istream);
+			return decode(CertID.TAG, istream);
 		}
 
 		public ASN1Value decode(Tag implicitTag, InputStream istream)
diff --git a/pki/base/util/src/com/netscape/cmsutil/ocsp/CertStatus.java b/pki/base/util/src/com/netscape/cmsutil/ocsp/CertStatus.java
index ba1ccbb8f276b5c6f316e4aa7135ce704d48690f..c6fe4b510dee19c764d9b53af118d983fb098efb 100644
--- a/pki/base/util/src/com/netscape/cmsutil/ocsp/CertStatus.java
+++ b/pki/base/util/src/com/netscape/cmsutil/ocsp/CertStatus.java
@@ -17,10 +17,7 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmsutil.ocsp;
 
-import java.io.*;
-import org.mozilla.jss.pkix.primitive.Name;
-import org.mozilla.jss.asn1.*;
-import org.mozilla.jss.pkix.cert.Extension;
+import org.mozilla.jss.asn1.ASN1Value;
 
 /**
  * RFC 2560:
diff --git a/pki/base/util/src/com/netscape/cmsutil/ocsp/GoodInfo.java b/pki/base/util/src/com/netscape/cmsutil/ocsp/GoodInfo.java
index b60a568b9b867177eb70ecb12f9a811b9bdad3cf..2577499e9a3645a20c41e94d04c59a2552f248b4 100644
--- a/pki/base/util/src/com/netscape/cmsutil/ocsp/GoodInfo.java
+++ b/pki/base/util/src/com/netscape/cmsutil/ocsp/GoodInfo.java
@@ -17,10 +17,16 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmsutil.ocsp;
 
-import java.io.*;
-import org.mozilla.jss.asn1.*;
-import org.mozilla.jss.pkix.primitive.Name;
-import org.mozilla.jss.pkix.cert.Extension;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import org.mozilla.jss.asn1.ASN1Template;
+import org.mozilla.jss.asn1.ASN1Value;
+import org.mozilla.jss.asn1.InvalidBERException;
+import org.mozilla.jss.asn1.NULL;
+import org.mozilla.jss.asn1.SEQUENCE;
+import org.mozilla.jss.asn1.Tag;
 
 /**
  * RFC 2560:
@@ -60,7 +66,7 @@ public class GoodInfo implements CertStatus
         private static final Template templateInstance = new Template();
 
         public static Template getTemplate() {
-                return templateInstance;
+                return GoodInfo.templateInstance;
         }
 
         /**
@@ -80,13 +86,13 @@ public class GoodInfo implements CertStatus
 
                 public boolean tagMatch(Tag tag)
                 {
-                        return TAG.equals(tag);
+                        return GoodInfo.TAG.equals(tag);
                 }
 
                 public ASN1Value decode(InputStream istream)
                         throws InvalidBERException, IOException
                 {
-                        return decode(TAG, istream);
+                        return decode(GoodInfo.TAG, istream);
                 }
 
                 public ASN1Value decode(Tag implicitTag, InputStream istream)
diff --git a/pki/base/util/src/com/netscape/cmsutil/ocsp/KeyHashID.java b/pki/base/util/src/com/netscape/cmsutil/ocsp/KeyHashID.java
index 028feac0344fc24cb3d4d11467a968b1527cd55f..6ce5a255525f5e9c571a9c41f10e531e6f40b049 100644
--- a/pki/base/util/src/com/netscape/cmsutil/ocsp/KeyHashID.java
+++ b/pki/base/util/src/com/netscape/cmsutil/ocsp/KeyHashID.java
@@ -17,9 +17,16 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmsutil.ocsp;
 
-import java.io.*;
-import org.mozilla.jss.pkix.primitive.Name;
-import org.mozilla.jss.asn1.*;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import org.mozilla.jss.asn1.ASN1Template;
+import org.mozilla.jss.asn1.ASN1Value;
+import org.mozilla.jss.asn1.InvalidBERException;
+import org.mozilla.jss.asn1.OCTET_STRING;
+import org.mozilla.jss.asn1.SEQUENCE;
+import org.mozilla.jss.asn1.Tag;
 
 /**
  * RFC 2560:
@@ -65,7 +72,7 @@ public class KeyHashID implements ResponderID
         private static final Template templateInstance = new Template();
 
         public static Template getTemplate() {
-                return templateInstance;
+                return KeyHashID.templateInstance;
         }
 
         /**
@@ -87,13 +94,13 @@ public class KeyHashID implements ResponderID
 
                 public boolean tagMatch(Tag tag)
                 {
-                        return TAG.equals(tag);
+                        return KeyHashID.TAG.equals(tag);
                 }
 
                 public ASN1Value decode(InputStream istream)
                         throws InvalidBERException, IOException
                 {
-                        return decode(TAG, istream);
+                        return decode(KeyHashID.TAG, istream);
                 }
 
                 public ASN1Value decode(Tag implicitTag, InputStream istream)
diff --git a/pki/base/util/src/com/netscape/cmsutil/ocsp/NameID.java b/pki/base/util/src/com/netscape/cmsutil/ocsp/NameID.java
index 74fee4feff78176277deb1aa76a320afdf0226f6..511bfb5fad6654512f60d8604b9b87b61452db62 100644
--- a/pki/base/util/src/com/netscape/cmsutil/ocsp/NameID.java
+++ b/pki/base/util/src/com/netscape/cmsutil/ocsp/NameID.java
@@ -17,8 +17,15 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmsutil.ocsp;
 
-import java.io.*;
-import org.mozilla.jss.asn1.*;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import org.mozilla.jss.asn1.ASN1Template;
+import org.mozilla.jss.asn1.ASN1Value;
+import org.mozilla.jss.asn1.InvalidBERException;
+import org.mozilla.jss.asn1.SEQUENCE;
+import org.mozilla.jss.asn1.Tag;
 import org.mozilla.jss.pkix.primitive.Name;
 
 /**
@@ -65,7 +72,7 @@ public class NameID implements ResponderID
         private static final Template templateInstance = new Template();
 
         public static Template getTemplate() {
-                return templateInstance;
+                return NameID.templateInstance;
         }
 
         /**
@@ -87,13 +94,13 @@ public class NameID implements ResponderID
 
                 public boolean tagMatch(Tag tag)
                 {
-                        return TAG.equals(tag);
+                        return NameID.TAG.equals(tag);
                 }
 
                 public ASN1Value decode(InputStream istream)
                         throws InvalidBERException, IOException
                 {
-                        return decode(TAG, istream);
+                        return decode(NameID.TAG, istream);
                 }
 
                 public ASN1Value decode(Tag implicitTag, InputStream istream)
diff --git a/pki/base/util/src/com/netscape/cmsutil/ocsp/OCSPRequest.java b/pki/base/util/src/com/netscape/cmsutil/ocsp/OCSPRequest.java
index 97e0a63da981f87a9a96cbda0e2c583408589e4b..72af6b99a098d08385302db5f4407bf9dc560f9b 100644
--- a/pki/base/util/src/com/netscape/cmsutil/ocsp/OCSPRequest.java
+++ b/pki/base/util/src/com/netscape/cmsutil/ocsp/OCSPRequest.java
@@ -17,8 +17,16 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmsutil.ocsp;
 
-import org.mozilla.jss.asn1.*;
-import java.io.*;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import org.mozilla.jss.asn1.ASN1Template;
+import org.mozilla.jss.asn1.ASN1Value;
+import org.mozilla.jss.asn1.EXPLICIT;
+import org.mozilla.jss.asn1.InvalidBERException;
+import org.mozilla.jss.asn1.SEQUENCE;
+import org.mozilla.jss.asn1.Tag;
 
 /**
  * RFC 2560:
@@ -61,7 +69,8 @@ public class OCSPRequest implements ASN1Value
 	///////////////////////////////////////////////////////////////////////
 	// Constructors
 	///////////////////////////////////////////////////////////////////////
-	private OCSPRequest() { }
+	@SuppressWarnings("unused")
+    private OCSPRequest() { }
 
 	/* THIS code is probably broken. It does not properly encode the explicit element */
        
@@ -85,12 +94,12 @@ public class OCSPRequest implements ASN1Value
 
 	public Tag getTag()
 	{
-		return TAG;
+		return OCSPRequest.TAG;
 	}
 
 	public void encode(OutputStream ostream) throws IOException
 	{
-		encode(TAG, ostream);
+		encode(OCSPRequest.TAG, ostream);
 	}
 
 	public void encode(Tag implicitTag, OutputStream ostream)
@@ -103,7 +112,7 @@ public class OCSPRequest implements ASN1Value
 
 	public static Template getTemplate()
 	{
-		return templateInstance;
+		return OCSPRequest.templateInstance;
 	}
 
 	/**
@@ -124,13 +133,13 @@ public class OCSPRequest implements ASN1Value
 
 		public boolean tagMatch(Tag tag)
 		{
-			return TAG.equals(tag);
+			return OCSPRequest.TAG.equals(tag);
 		}
 
 		public ASN1Value decode(InputStream istream)
 			throws InvalidBERException, IOException
 		{
-			return decode(TAG, istream);
+			return decode(OCSPRequest.TAG, istream);
 		}
 
 		public ASN1Value decode(Tag implicitTag, InputStream istream)
diff --git a/pki/base/util/src/com/netscape/cmsutil/ocsp/OCSPResponse.java b/pki/base/util/src/com/netscape/cmsutil/ocsp/OCSPResponse.java
index 9c635e36caba26b8938c7815573acada2c5b661c..5ea19dfef017c41e01e974a0e0f3fa429426f103 100644
--- a/pki/base/util/src/com/netscape/cmsutil/ocsp/OCSPResponse.java
+++ b/pki/base/util/src/com/netscape/cmsutil/ocsp/OCSPResponse.java
@@ -17,8 +17,16 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmsutil.ocsp;
 
-import org.mozilla.jss.asn1.*;
-import java.io.*;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import org.mozilla.jss.asn1.ASN1Template;
+import org.mozilla.jss.asn1.ASN1Value;
+import org.mozilla.jss.asn1.EXPLICIT;
+import org.mozilla.jss.asn1.InvalidBERException;
+import org.mozilla.jss.asn1.SEQUENCE;
+import org.mozilla.jss.asn1.Tag;
 
 /**
  * RFC 2560:
@@ -53,7 +61,8 @@ public class OCSPResponse implements ASN1Value
 	///////////////////////////////////////////////////////////////////////
 	// Constructors
 	///////////////////////////////////////////////////////////////////////
-	private OCSPResponse() { }
+	@SuppressWarnings("unused")
+    private OCSPResponse() { }
 
 	public OCSPResponse(OCSPResponseStatus responseStatus,
 		ResponseBytes responseBytes)
@@ -75,12 +84,12 @@ public class OCSPResponse implements ASN1Value
 
 	public Tag getTag()
 	{
-		return TAG;
+		return OCSPResponse.TAG;
 	}
 
 	public void encode(OutputStream ostream) throws IOException
 	{
-		encode(TAG, ostream);
+		encode(OCSPResponse.TAG, ostream);
 	}
 
 	public void encode(Tag implicitTag, OutputStream ostream)
@@ -92,7 +101,7 @@ public class OCSPResponse implements ASN1Value
 	private static final Template templateInstance = new Template();
 
 	public static Template getTemplate() {
-		return templateInstance;
+		return OCSPResponse.templateInstance;
 	}
 
 	/**
@@ -115,13 +124,13 @@ public class OCSPResponse implements ASN1Value
 
 		public boolean tagMatch(Tag tag)
 		{
-			return TAG.equals(tag);
+			return OCSPResponse.TAG.equals(tag);
 		}
 
 		public ASN1Value decode(InputStream istream)
 			throws InvalidBERException, IOException
 		{
-			return decode(TAG, istream);
+			return decode(OCSPResponse.TAG, istream);
 		}
 
 		public ASN1Value decode(Tag implicitTag, InputStream istream)
diff --git a/pki/base/util/src/com/netscape/cmsutil/ocsp/OCSPResponseStatus.java b/pki/base/util/src/com/netscape/cmsutil/ocsp/OCSPResponseStatus.java
index 5eff86c44f6f51492f7bb9afdd58380ea80edfb3..5425ced749f76bc515938a8a71470624094aae01 100644
--- a/pki/base/util/src/com/netscape/cmsutil/ocsp/OCSPResponseStatus.java
+++ b/pki/base/util/src/com/netscape/cmsutil/ocsp/OCSPResponseStatus.java
@@ -17,8 +17,15 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmsutil.ocsp;
 
-import org.mozilla.jss.asn1.*;
-import java.io.*;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import org.mozilla.jss.asn1.ASN1Template;
+import org.mozilla.jss.asn1.ASN1Value;
+import org.mozilla.jss.asn1.ENUMERATED;
+import org.mozilla.jss.asn1.InvalidBERException;
+import org.mozilla.jss.asn1.Tag;
 
 /**
  * RFC 2560:
@@ -65,7 +72,8 @@ public class OCSPResponseStatus implements ASN1Value
 	///////////////////////////////////////////////////////////////////////
 	// Constructors
 	///////////////////////////////////////////////////////////////////////
-	private OCSPResponseStatus() { }
+	@SuppressWarnings("unused")
+    private OCSPResponseStatus() { }
 
 	public OCSPResponseStatus(long val)
 	{
@@ -80,12 +88,12 @@ public class OCSPResponseStatus implements ASN1Value
 
 	public Tag getTag()
 	{
-		return TAG;
+		return OCSPResponseStatus.TAG;
 	}
 
 	public void encode(OutputStream ostream) throws IOException
 	{
-		encode(TAG, ostream);
+		encode(OCSPResponseStatus.TAG, ostream);
 	}
 
 	public void encode(Tag implicitTag, OutputStream ostream)
@@ -97,7 +105,7 @@ public class OCSPResponseStatus implements ASN1Value
 	private static final Template templateInstance = new Template();
 
 	public static Template getTemplate() {
-		return templateInstance;
+		return OCSPResponseStatus.templateInstance;
 	}
 
 	/**
@@ -107,13 +115,13 @@ public class OCSPResponseStatus implements ASN1Value
 	{
 		public boolean tagMatch(Tag tag)
 		{
-			return TAG.equals(tag);
+			return OCSPResponseStatus.TAG.equals(tag);
 		}
 
 		public ASN1Value decode(InputStream istream)
 			throws InvalidBERException, IOException
 		{
-			return decode(TAG, istream);
+			return decode(OCSPResponseStatus.TAG, istream);
 		}
 
 		public ASN1Value decode(Tag implicitTag, InputStream istream)
diff --git a/pki/base/util/src/com/netscape/cmsutil/ocsp/Request.java b/pki/base/util/src/com/netscape/cmsutil/ocsp/Request.java
index d3d5850fd5be70417342bef1b32689ff0d934d2e..8e53b1b2f03ed11ec1b6df291b82561dcfd85a3e 100644
--- a/pki/base/util/src/com/netscape/cmsutil/ocsp/Request.java
+++ b/pki/base/util/src/com/netscape/cmsutil/ocsp/Request.java
@@ -17,9 +17,17 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmsutil.ocsp;
 
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import org.mozilla.jss.asn1.ASN1Template;
+import org.mozilla.jss.asn1.ASN1Value;
+import org.mozilla.jss.asn1.EXPLICIT;
+import org.mozilla.jss.asn1.InvalidBERException;
+import org.mozilla.jss.asn1.SEQUENCE;
+import org.mozilla.jss.asn1.Tag;
 import org.mozilla.jss.pkix.cert.Extension;
-import org.mozilla.jss.asn1.*;
-import java.io.*;
 
 /**
  * RFC 2560:
@@ -67,7 +75,8 @@ public class Request implements ASN1Value
 	///////////////////////////////////////////////////////////////////////
 	// constructors
 	///////////////////////////////////////////////////////////////////////
-	private Request() { }
+	@SuppressWarnings("unused")
+    private Request() { }
 
 	public Request(CertID reqCert, SEQUENCE singleRequestExtensions)
 	{
@@ -89,12 +98,12 @@ public class Request implements ASN1Value
 
 	public Tag getTag()
 	{
-		return TAG;
+		return Request.TAG;
 	}
 
 	public void encode(OutputStream ostream) throws IOException
 	{
-		encode(TAG, ostream);
+		encode(Request.TAG, ostream);
 	}
 
 	public void encode(Tag implicitTag, OutputStream ostream)
@@ -107,7 +116,7 @@ public class Request implements ASN1Value
 
 	public static Template getTemplate()
 	{
-		return templateInstance;
+		return Request.templateInstance;
 	}
 
 	/**
@@ -128,13 +137,13 @@ public class Request implements ASN1Value
 
 		public boolean tagMatch(Tag tag)
 		{
-			return TAG.equals(tag);
+			return Request.TAG.equals(tag);
 		}
 
 		public ASN1Value decode(InputStream istream)
 			throws InvalidBERException, IOException
 		{
-			return decode(TAG, istream);
+			return decode(Request.TAG, istream);
 		}
 
 		public ASN1Value decode(Tag implicitTag, InputStream istream)
diff --git a/pki/base/util/src/com/netscape/cmsutil/ocsp/ResponderID.java b/pki/base/util/src/com/netscape/cmsutil/ocsp/ResponderID.java
index 37b8849644a5800462dc654e9274e55b68f5f24e..d5cfa6807d50d6a1d32410015f8c4dd5b75cc932 100644
--- a/pki/base/util/src/com/netscape/cmsutil/ocsp/ResponderID.java
+++ b/pki/base/util/src/com/netscape/cmsutil/ocsp/ResponderID.java
@@ -17,9 +17,7 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmsutil.ocsp;
 
-import java.io.OutputStream;
-import org.mozilla.jss.pkix.primitive.*;
-import org.mozilla.jss.asn1.*;
+import org.mozilla.jss.asn1.ASN1Value;
 
 
 /**
diff --git a/pki/base/util/src/com/netscape/cmsutil/ocsp/Response.java b/pki/base/util/src/com/netscape/cmsutil/ocsp/Response.java
index 76f4a360fd8b58d5389c92511496da093e76e738..eb011e1c14fd1e55ee74cdb95783b052f23699ad 100644
--- a/pki/base/util/src/com/netscape/cmsutil/ocsp/Response.java
+++ b/pki/base/util/src/com/netscape/cmsutil/ocsp/Response.java
@@ -17,8 +17,8 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmsutil.ocsp;
 
-import java.io.*;
-import org.mozilla.jss.asn1.*;
+import org.mozilla.jss.asn1.ASN1Value;
+import org.mozilla.jss.asn1.OCTET_STRING;
 
 /**
  * RFC 2560:
diff --git a/pki/base/util/src/com/netscape/cmsutil/ocsp/ResponseBytes.java b/pki/base/util/src/com/netscape/cmsutil/ocsp/ResponseBytes.java
index 7f41d02d1ac5d3a774012f2efa45a836138c2af0..0f34a6156f5da9a552e1c6fedeb72589fc5efd6a 100644
--- a/pki/base/util/src/com/netscape/cmsutil/ocsp/ResponseBytes.java
+++ b/pki/base/util/src/com/netscape/cmsutil/ocsp/ResponseBytes.java
@@ -17,8 +17,17 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmsutil.ocsp;
 
-import org.mozilla.jss.asn1.*;
-import java.io.*;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import org.mozilla.jss.asn1.ASN1Template;
+import org.mozilla.jss.asn1.ASN1Value;
+import org.mozilla.jss.asn1.InvalidBERException;
+import org.mozilla.jss.asn1.OBJECT_IDENTIFIER;
+import org.mozilla.jss.asn1.OCTET_STRING;
+import org.mozilla.jss.asn1.SEQUENCE;
+import org.mozilla.jss.asn1.Tag;
 
 /**
  * RFC 2560:
@@ -58,7 +67,8 @@ public class ResponseBytes implements ASN1Value
 	///////////////////////////////////////////////////////////////////////
 	// Constructors
 	///////////////////////////////////////////////////////////////////////
-	private ResponseBytes() { }
+	@SuppressWarnings("unused")
+    private ResponseBytes() { }
 
 	public ResponseBytes(OBJECT_IDENTIFIER responseType, OCTET_STRING response)
 	{
@@ -79,12 +89,12 @@ public class ResponseBytes implements ASN1Value
 
 	public Tag getTag()
 	{
-		return TAG;
+		return ResponseBytes.TAG;
 	}
 
 	public void encode(OutputStream ostream) throws IOException
 	{
-		encode(TAG, ostream);
+		encode(ResponseBytes.TAG, ostream);
 	}
 
 	public void encode(Tag implicitTag, OutputStream ostream)
@@ -96,7 +106,7 @@ public class ResponseBytes implements ASN1Value
 	private static final Template templateInstance = new Template();
 
 	public static Template getTemplate() {
-		return templateInstance;
+		return ResponseBytes.templateInstance;
 	}
 
 	/**
@@ -116,13 +126,13 @@ public class ResponseBytes implements ASN1Value
 
 		public boolean tagMatch(Tag tag)
 		{
-			return TAG.equals(tag);
+			return ResponseBytes.TAG.equals(tag);
 		}
 
 		public ASN1Value decode(InputStream istream)
 			throws InvalidBERException, IOException
 		{
-			return decode(TAG, istream);
+			return decode(ResponseBytes.TAG, istream);
 		}
 
 		public ASN1Value decode(Tag implicitTag, InputStream istream)
diff --git a/pki/base/util/src/com/netscape/cmsutil/ocsp/ResponseData.java b/pki/base/util/src/com/netscape/cmsutil/ocsp/ResponseData.java
index c70229ce2f20664972d875e258aa91e137258157..cabd67b203cb49410d7d931d56982fa4fd2f1ecd 100644
--- a/pki/base/util/src/com/netscape/cmsutil/ocsp/ResponseData.java
+++ b/pki/base/util/src/com/netscape/cmsutil/ocsp/ResponseData.java
@@ -17,13 +17,20 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmsutil.ocsp;
 
-import java.io.*;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
 import java.io.OutputStream;
-import org.mozilla.jss.asn1.*;
-import org.mozilla.jss.asn1.BIT_STRING;
-import org.mozilla.jss.pkix.primitive.AlgorithmIdentifier;
-import org.mozilla.jss.pkix.cert.Certificate;
+
+import org.mozilla.jss.asn1.ANY;
+import org.mozilla.jss.asn1.ASN1Template;
+import org.mozilla.jss.asn1.ASN1Value;
+import org.mozilla.jss.asn1.EXPLICIT;
 import org.mozilla.jss.asn1.GeneralizedTime;
+import org.mozilla.jss.asn1.INTEGER;
+import org.mozilla.jss.asn1.InvalidBERException;
+import org.mozilla.jss.asn1.SEQUENCE;
+import org.mozilla.jss.asn1.Tag;
 import org.mozilla.jss.pkix.cert.Extension;
 
 /**
@@ -53,7 +60,7 @@ public class ResponseData implements ASN1Value
 
     public ResponseData(INTEGER ver, ResponderID rid, GeneralizedTime produced, 
             SingleResponse sr[], Extension exts[]) {
-        mVer = (ver != null) ? ver : v1;
+        mVer = (ver != null) ? ver : ResponseData.v1;
         mRID = rid;
         mProduced = produced;
         mSR = sr;
@@ -63,18 +70,18 @@ public class ResponseData implements ASN1Value
     public ResponseData(ResponderID rid, GeneralizedTime produced, 
            SingleResponse sr[])
     {
-        this(v1, rid, produced, sr, null);
+        this(ResponseData.v1, rid, produced, sr, null);
     }
 
     public ResponseData(ResponderID rid, GeneralizedTime produced, 
            SingleResponse sr[], Extension exts[])
     {
-        this(v1, rid, produced, sr, exts);
+        this(ResponseData.v1, rid, produced, sr, exts);
     }
  
     public Tag getTag()
     {
-        return TAG;
+        return ResponseData.TAG;
     }
 
     public void encode(OutputStream os) throws IOException
@@ -86,7 +93,7 @@ public class ResponseData implements ASN1Value
     {    
         SEQUENCE seq = new SEQUENCE();
 
-        if (mVer != v1) {
+        if (mVer != ResponseData.v1) {
             seq.addElement(new EXPLICIT(Tag.get(0), new INTEGER(mVer)));
         }
 
@@ -144,7 +151,7 @@ public class ResponseData implements ASN1Value
     private static final Template templateInstance = new Template();
 
     public static Template getTemplate() {
-        return templateInstance;
+        return ResponseData.templateInstance;
     }
 
     /**
@@ -171,13 +178,13 @@ public class ResponseData implements ASN1Value
 
         public boolean tagMatch(Tag tag)
         {
-            return TAG.equals(tag);
+            return ResponseData.TAG.equals(tag);
         }
 
         public ASN1Value decode(InputStream istream)
             throws InvalidBERException, IOException
         {
-            return decode(TAG, istream);
+            return decode(ResponseData.TAG, istream);
         }
 
         public ASN1Value decode(Tag implicitTag, InputStream istream)
@@ -186,7 +193,7 @@ public class ResponseData implements ASN1Value
             SEQUENCE seq = (SEQUENCE) seqt.decode(implicitTag, 
                 istream);
 
-            INTEGER ver = v1;
+            INTEGER ver = ResponseData.v1;
             EXPLICIT e_ver = (EXPLICIT)seq.elementAt(0);
             if (e_ver != null && e_ver.getTag().getNum() == 0) {
                 ver = (INTEGER)e_ver.getContent();
diff --git a/pki/base/util/src/com/netscape/cmsutil/ocsp/RevokedInfo.java b/pki/base/util/src/com/netscape/cmsutil/ocsp/RevokedInfo.java
index bb253077b3bb3fa03fac03789b71a7ad349d7967..34411e5b7f485f9f51bcce6261739dec63a551d9 100644
--- a/pki/base/util/src/com/netscape/cmsutil/ocsp/RevokedInfo.java
+++ b/pki/base/util/src/com/netscape/cmsutil/ocsp/RevokedInfo.java
@@ -17,8 +17,18 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmsutil.ocsp;
 
-import java.io.*;
-import org.mozilla.jss.asn1.*;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import org.mozilla.jss.asn1.ASN1Template;
+import org.mozilla.jss.asn1.ASN1Value;
+import org.mozilla.jss.asn1.EXPLICIT;
+import org.mozilla.jss.asn1.GeneralizedTime;
+import org.mozilla.jss.asn1.INTEGER;
+import org.mozilla.jss.asn1.InvalidBERException;
+import org.mozilla.jss.asn1.SEQUENCE;
+import org.mozilla.jss.asn1.Tag;
 
 /**
  * RFC 2560:
@@ -68,7 +78,7 @@ public class RevokedInfo implements CertStatus
         private static final Template templateInstance = new Template();
 
         public static Template getTemplate() {
-                return templateInstance;
+                return RevokedInfo.templateInstance;
         }
 
         /**
@@ -91,13 +101,13 @@ public class RevokedInfo implements CertStatus
 
                 public boolean tagMatch(Tag tag)
                 {
-                        return TAG.equals(tag);
+                        return RevokedInfo.TAG.equals(tag);
                 }
 
                 public ASN1Value decode(InputStream istream)
                         throws InvalidBERException, IOException
                 {
-                        return decode(TAG, istream);
+                        return decode(RevokedInfo.TAG, istream);
                 }
 
                 public ASN1Value decode(Tag implicitTag, InputStream istream)
diff --git a/pki/base/util/src/com/netscape/cmsutil/ocsp/Signature.java b/pki/base/util/src/com/netscape/cmsutil/ocsp/Signature.java
index e56d5f39798617253316b7ca1ae937677a431331..a2670de8a86a5f59fe2a19e4e06b8d39a50624a2 100644
--- a/pki/base/util/src/com/netscape/cmsutil/ocsp/Signature.java
+++ b/pki/base/util/src/com/netscape/cmsutil/ocsp/Signature.java
@@ -17,10 +17,19 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmsutil.ocsp;
 
-import org.mozilla.jss.pkix.primitive.AlgorithmIdentifier;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import org.mozilla.jss.asn1.ASN1Template;
+import org.mozilla.jss.asn1.ASN1Value;
+import org.mozilla.jss.asn1.BIT_STRING;
+import org.mozilla.jss.asn1.EXPLICIT;
+import org.mozilla.jss.asn1.InvalidBERException;
+import org.mozilla.jss.asn1.SEQUENCE;
+import org.mozilla.jss.asn1.Tag;
 import org.mozilla.jss.pkix.cert.Certificate;
-import org.mozilla.jss.asn1.*;
-import java.io.*;
+import org.mozilla.jss.pkix.primitive.AlgorithmIdentifier;
 
 /**
  * RFC 2560:
@@ -75,7 +84,8 @@ public class Signature implements ASN1Value
 	///////////////////////////////////////////////////////////////////////
 	// constructors
 	///////////////////////////////////////////////////////////////////////
-	private Signature() { }
+	@SuppressWarnings("unused")
+    private Signature() { }
 
 	public Signature(AlgorithmIdentifier signatureAlgorithm,
 		BIT_STRING signature, SEQUENCE certs)
@@ -99,12 +109,12 @@ public class Signature implements ASN1Value
 
 	public Tag getTag()
 	{
-		return TAG;
+		return Signature.TAG;
 	}
 
 	public void encode(OutputStream ostream) throws IOException
 	{
-		encode(TAG, ostream);
+		encode(Signature.TAG, ostream);
 	}
 
 	public void encode(Tag implicitTag, OutputStream ostream)
@@ -117,7 +127,7 @@ public class Signature implements ASN1Value
 
 	public static Template getTemplate()
 	{
-		return templateInstance;
+		return Signature.templateInstance;
 	}
 
 	/**
@@ -143,13 +153,13 @@ public class Signature implements ASN1Value
 
 		public boolean tagMatch(Tag tag)
 		{
-			return TAG.equals(tag);
+			return Signature.TAG.equals(tag);
 		}
 
 		public ASN1Value decode(InputStream istream)
 			throws InvalidBERException, IOException
 		{
-			return decode(TAG, istream);
+			return decode(Signature.TAG, istream);
 		}
 
 		public ASN1Value decode(Tag implicitTag, InputStream istream)
diff --git a/pki/base/util/src/com/netscape/cmsutil/ocsp/SingleResponse.java b/pki/base/util/src/com/netscape/cmsutil/ocsp/SingleResponse.java
index 94e95616293155e9f7a196e19b16c88b3a81b6cd..9fe7597a7b098ecf76a4a71aefb9e5a1e7e111c1 100644
--- a/pki/base/util/src/com/netscape/cmsutil/ocsp/SingleResponse.java
+++ b/pki/base/util/src/com/netscape/cmsutil/ocsp/SingleResponse.java
@@ -17,9 +17,19 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmsutil.ocsp;
 
-import java.io.*;
-import org.mozilla.jss.asn1.*;
-import org.mozilla.jss.pkix.primitive.Name;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import org.mozilla.jss.asn1.ANY;
+import org.mozilla.jss.asn1.ASN1Template;
+import org.mozilla.jss.asn1.ASN1Value;
+import org.mozilla.jss.asn1.EXPLICIT;
+import org.mozilla.jss.asn1.GeneralizedTime;
+import org.mozilla.jss.asn1.InvalidBERException;
+import org.mozilla.jss.asn1.SEQUENCE;
+import org.mozilla.jss.asn1.Tag;
 import org.mozilla.jss.pkix.cert.Extension;
 
 /**
@@ -114,7 +124,7 @@ public class SingleResponse implements ASN1Value
         private static final Template templateInstance = new Template();
 
         public static Template getTemplate() {
-                return templateInstance;
+                return SingleResponse.templateInstance;
         }
 
         /**
@@ -140,13 +150,13 @@ public class SingleResponse implements ASN1Value
 
                 public boolean tagMatch(Tag tag)
                 {
-                        return TAG.equals(tag);
+                        return SingleResponse.TAG.equals(tag);
                 }
 
                 public ASN1Value decode(InputStream istream)
                         throws InvalidBERException, IOException
                 {
-                        return decode(TAG, istream);
+                        return decode(SingleResponse.TAG, istream);
                 }
 
                 public ASN1Value decode(Tag implicitTag, InputStream istream)
diff --git a/pki/base/util/src/com/netscape/cmsutil/ocsp/TBSRequest.java b/pki/base/util/src/com/netscape/cmsutil/ocsp/TBSRequest.java
index 833ebfb2aac89e567d2a2ffdbbedf2751d7b843c..e96d0a92f912757348a39f12bedb9bac329d5c3d 100644
--- a/pki/base/util/src/com/netscape/cmsutil/ocsp/TBSRequest.java
+++ b/pki/base/util/src/com/netscape/cmsutil/ocsp/TBSRequest.java
@@ -17,9 +17,19 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmsutil.ocsp;
 
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import org.mozilla.jss.asn1.ANY;
+import org.mozilla.jss.asn1.ASN1Template;
+import org.mozilla.jss.asn1.ASN1Value;
+import org.mozilla.jss.asn1.EXPLICIT;
+import org.mozilla.jss.asn1.INTEGER;
+import org.mozilla.jss.asn1.InvalidBERException;
+import org.mozilla.jss.asn1.SEQUENCE;
+import org.mozilla.jss.asn1.Tag;
 import org.mozilla.jss.pkix.cert.Extension;
-import org.mozilla.jss.asn1.*;
-import java.io.*;
 
 /**
  * RFC 2560:
@@ -88,12 +98,13 @@ public class TBSRequest implements ASN1Value
     // constructors
     ///////////////////////////////////////////////////////////////////////
     
+    @SuppressWarnings("unused")
     private TBSRequest() {}
 
     public TBSRequest(INTEGER version, ANY requestorName,
         SEQUENCE requestList, SEQUENCE requestExtensions)
     {
-        this.version = (version != null) ? version : v1;
+        this.version = (version != null) ? version : TBSRequest.v1;
         this.requestorName = requestorName;
         this.requestList = requestList;
         this.requestExtensions = requestExtensions;
@@ -106,13 +117,13 @@ public class TBSRequest implements ASN1Value
 
     public Tag getTag()
     {
-        return TAG;
+        return TBSRequest.TAG;
     }
 
     public void encode(OutputStream ostream)
         throws IOException
     {
-        encode(TAG, ostream);
+        encode(TBSRequest.TAG, ostream);
     }
 
     public void encode(Tag implicitTag, OutputStream ostream)
@@ -120,7 +131,7 @@ public class TBSRequest implements ASN1Value
     {
         SEQUENCE seq = new SEQUENCE();
 
-        if (version != v1) {
+        if (version != TBSRequest.v1) {
             seq.addElement(new EXPLICIT(Tag.get(0), version));
         }
 
@@ -144,7 +155,7 @@ public class TBSRequest implements ASN1Value
 
     public static Template getTemplate()
     {
-        return templateInstance;
+        return TBSRequest.templateInstance;
     }
 
     /**
@@ -173,13 +184,13 @@ public class TBSRequest implements ASN1Value
 
         public boolean tagMatch(Tag tag)
         {
-            return TAG.equals(tag);
+            return TBSRequest.TAG.equals(tag);
         }
 
         public ASN1Value decode(InputStream istream)
             throws InvalidBERException, IOException
         {
-            return decode(TAG, istream);
+            return decode(TBSRequest.TAG, istream);
         }
 
         public ASN1Value decode(Tag implicitTag, InputStream istream)
@@ -187,7 +198,7 @@ public class TBSRequest implements ASN1Value
         {
             SEQUENCE seq = (SEQUENCE) seqt.decode(implicitTag, istream);
 
-            INTEGER v = v1;  //assume default version
+            INTEGER v = TBSRequest.v1;  //assume default version
             EXPLICIT e_ver = (EXPLICIT) seq.elementAt(0);
             if (e_ver != null) {
                 v = (INTEGER) e_ver.getContent();
diff --git a/pki/base/util/src/com/netscape/cmsutil/ocsp/UnknownInfo.java b/pki/base/util/src/com/netscape/cmsutil/ocsp/UnknownInfo.java
index 9e93fb01cbff0dcc80a8be81aa34fbb8ffb5d191..313d264be725cc27c9ad5cd71e03d9a93ece9d65 100644
--- a/pki/base/util/src/com/netscape/cmsutil/ocsp/UnknownInfo.java
+++ b/pki/base/util/src/com/netscape/cmsutil/ocsp/UnknownInfo.java
@@ -17,8 +17,16 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmsutil.ocsp;
 
-import java.io.*;
-import org.mozilla.jss.asn1.*;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import org.mozilla.jss.asn1.ASN1Template;
+import org.mozilla.jss.asn1.ASN1Value;
+import org.mozilla.jss.asn1.InvalidBERException;
+import org.mozilla.jss.asn1.NULL;
+import org.mozilla.jss.asn1.SEQUENCE;
+import org.mozilla.jss.asn1.Tag;
 
 /**
  * RFC 2560:
@@ -55,7 +63,7 @@ public class UnknownInfo implements CertStatus
         private static final Template templateInstance = new Template();
 
         public static Template getTemplate() {
-                return templateInstance;
+                return UnknownInfo.templateInstance;
         }
 
         /**
@@ -64,24 +72,19 @@ public class UnknownInfo implements CertStatus
         public static class Template implements ASN1Template
         {
 
-                private SEQUENCE.Template seqt;
-
                 public Template()
                 {
-//                     seqt = new SEQUENCE.Template();
- //                    seqt.addElement(new NULL.Template() );
-
                 }
 
                 public boolean tagMatch(Tag tag)
                 {
-                        return TAG.equals(tag);
+                        return UnknownInfo.TAG.equals(tag);
                 }
 
                 public ASN1Value decode(InputStream istream)
                         throws InvalidBERException, IOException
                 {
-                        return decode(TAG, istream);
+                        return decode(UnknownInfo.TAG, istream);
                 }
 
                 public ASN1Value decode(Tag implicitTag, InputStream istream)
diff --git a/pki/base/util/src/com/netscape/cmsutil/password/IPasswordReader.java b/pki/base/util/src/com/netscape/cmsutil/password/IPasswordReader.java
index 7cdb7ec920010bee33463302bda12ec888b5cdc9..1a6a026ba74d7677a778464e1be660b488d94a41 100644
--- a/pki/base/util/src/com/netscape/cmsutil/password/IPasswordReader.java
+++ b/pki/base/util/src/com/netscape/cmsutil/password/IPasswordReader.java
@@ -16,8 +16,8 @@
 // All rights reserved.
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmsutil.password;
-import java.util.*;
-import java.io.*;
+import java.io.IOException;
+import java.util.Enumeration;
 
 public interface IPasswordReader {
     public void init(String pwdPath) throws IOException;
diff --git a/pki/base/util/src/com/netscape/cmsutil/password/IPasswordStore.java b/pki/base/util/src/com/netscape/cmsutil/password/IPasswordStore.java
index 0f12f5242134a190140996aa4424bfb00496582a..3d7a8d80c540c3f5b4218654f143fee782071d0a 100644
--- a/pki/base/util/src/com/netscape/cmsutil/password/IPasswordStore.java
+++ b/pki/base/util/src/com/netscape/cmsutil/password/IPasswordStore.java
@@ -17,8 +17,8 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmsutil.password;
 
-import java.util.*;
-import java.io.*;
+import java.io.IOException;
+import java.util.Enumeration;
 
 public interface IPasswordStore {
     public void init(String pwdPath) throws IOException;
diff --git a/pki/base/util/src/com/netscape/cmsutil/password/IPasswordWriter.java b/pki/base/util/src/com/netscape/cmsutil/password/IPasswordWriter.java
index 4aa50560146b6f90c29502a0f8caba0fdb6b7b1a..2f42e02cbdd7ca406e84a23991147609b0ab88cd 100644
--- a/pki/base/util/src/com/netscape/cmsutil/password/IPasswordWriter.java
+++ b/pki/base/util/src/com/netscape/cmsutil/password/IPasswordWriter.java
@@ -16,8 +16,7 @@
 // All rights reserved.
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmsutil.password;
-import java.io.*;
-import java.util.*;
+import java.io.IOException;
 
 public interface IPasswordWriter {
     public void init(String pwdPath)
diff --git a/pki/base/util/src/com/netscape/cmsutil/password/PlainPasswordFile.java b/pki/base/util/src/com/netscape/cmsutil/password/PlainPasswordFile.java
index fd3fc8b0d2bdee1aeb08fa4fe86d453b3a8f025e..73a92d6ad17b93f10c35447300937bc0f33028ce 100644
--- a/pki/base/util/src/com/netscape/cmsutil/password/PlainPasswordFile.java
+++ b/pki/base/util/src/com/netscape/cmsutil/password/PlainPasswordFile.java
@@ -17,9 +17,11 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmsutil.password;
 
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Enumeration;
 import java.util.Properties;
-import java.io.*;
-import java.util.*;
 
 public class PlainPasswordFile implements IPasswordStore{
     private String mPwdPath = "";
@@ -42,7 +44,7 @@ public class PlainPasswordFile implements IPasswordStore{
     }
 
     public String getPassword(String tag) {
-	return (String) mPwdStore.getProperty(tag);
+	return mPwdStore.getProperty(tag);
     }
 
     // return an array of String-based tag
@@ -58,7 +60,7 @@ public class PlainPasswordFile implements IPasswordStore{
         throws IOException, ClassCastException, NullPointerException
     {
         FileOutputStream file = new FileOutputStream(mPwdPath);
-        mPwdStore.store(file, PASSWORD_WRITER_HEADER);
+        mPwdStore.store(file, PlainPasswordFile.PASSWORD_WRITER_HEADER);
         file.close();
     }
 }
diff --git a/pki/base/util/src/com/netscape/cmsutil/password/PlainPasswordReader.java b/pki/base/util/src/com/netscape/cmsutil/password/PlainPasswordReader.java
index c6a1382363b2825a06807c6ba3ec2ff00d055c95..e4d00bfae6b9915b034332155c322879829097f2 100644
--- a/pki/base/util/src/com/netscape/cmsutil/password/PlainPasswordReader.java
+++ b/pki/base/util/src/com/netscape/cmsutil/password/PlainPasswordReader.java
@@ -17,9 +17,10 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmsutil.password;
 
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.Enumeration;
 import java.util.Properties;
-import java.io.*;
-import java.util.*;
 
 public class PlainPasswordReader implements IPasswordReader{
     private String mPwdPath = "";
@@ -42,7 +43,7 @@ public class PlainPasswordReader implements IPasswordReader{
     }
 
     public String getPassword(String tag) {
-	return (String) mPwdStore.getProperty(tag);
+	return mPwdStore.getProperty(tag);
     }
 
     // return an array of String-based tag
diff --git a/pki/base/util/src/com/netscape/cmsutil/password/PlainPasswordWriter.java b/pki/base/util/src/com/netscape/cmsutil/password/PlainPasswordWriter.java
index 382c117b7684a2c83b140c11773afc8e4ae99bcf..c89effd32a95d5a389a867dfe809cd140f6de132 100644
--- a/pki/base/util/src/com/netscape/cmsutil/password/PlainPasswordWriter.java
+++ b/pki/base/util/src/com/netscape/cmsutil/password/PlainPasswordWriter.java
@@ -17,9 +17,10 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmsutil.password;
 
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
 import java.util.Properties;
-import java.io.*;
-import java.util.*;
 
 public class PlainPasswordWriter implements IPasswordWriter{
     private static final String PASSWORD_WRITER_HEADER = "";
@@ -50,7 +51,7 @@ public class PlainPasswordWriter implements IPasswordWriter{
 	throws IOException, ClassCastException, NullPointerException
     {
 	FileOutputStream file = new FileOutputStream(mPwdPath);
-	mPwdStore.store(file, PASSWORD_WRITER_HEADER);
+	mPwdStore.store(file, PlainPasswordWriter.PASSWORD_WRITER_HEADER);
     file.close();
     }
 
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/AccessAccept.java b/pki/base/util/src/com/netscape/cmsutil/radius/AccessAccept.java
index adff75a967c1a06f524e28c197cf61acae16d74e..c5f9828c130e31a5e85580a8de6f6cff9c6b2172 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/AccessAccept.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/AccessAccept.java
@@ -18,11 +18,7 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class AccessAccept extends ServerPacket {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/AccessChallenge.java b/pki/base/util/src/com/netscape/cmsutil/radius/AccessChallenge.java
index 4db3ea9354585de397cbb01a6f4c5e92894d5ef7..bab34ffe9161d0839d47807335a037fab5cd8e0b 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/AccessChallenge.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/AccessChallenge.java
@@ -18,11 +18,7 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class AccessChallenge extends ServerPacket {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/AccessReject.java b/pki/base/util/src/com/netscape/cmsutil/radius/AccessReject.java
index 96e4b1fae6f403c60c09abdb632d884454a1a27b..12081a6b94f2112f4d1df3e2446068d4aa2da6a8 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/AccessReject.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/AccessReject.java
@@ -18,11 +18,7 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class AccessReject extends ServerPacket {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/AccessRequest.java b/pki/base/util/src/com/netscape/cmsutil/radius/AccessRequest.java
index 4098bbf15df9b7d5921a4253067b646a6d827cc5..c5f36a4d0d20655d905761d1160b9c1ce5a02d78 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/AccessRequest.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/AccessRequest.java
@@ -18,16 +18,11 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
 
 
 public class AccessRequest extends NASPacket {
     public AccessRequest(short id, Authenticator auth) {
-        super(ACCESS_REQUEST, id, auth);
+        super(Packet.ACCESS_REQUEST, id, auth);
     }
 
 }
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/Attribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/Attribute.java
index 16e60bb55b038e2da4eb9b0406d77e6efd6781e7..33c1f3929dba21ba1a0ae1631240bb296bfe41a9 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/Attribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/Attribute.java
@@ -18,11 +18,8 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
 
 
 public abstract class Attribute {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/AttributeFactory.java b/pki/base/util/src/com/netscape/cmsutil/radius/AttributeFactory.java
index 1290011fec7386d2cc964bbeacfcd8331d8f17d1..bf2369721de0e1f631fdd2090a5b34cbcc480c0e 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/AttributeFactory.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/AttributeFactory.java
@@ -18,11 +18,7 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class AttributeFactory {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/AttributeSet.java b/pki/base/util/src/com/netscape/cmsutil/radius/AttributeSet.java
index 4c17f441dc6793fc6e8c9bca5f8b4603d9e80af7..e79b96f7c46fd9a0cd93cb2fd50829b518988df0 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/AttributeSet.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/AttributeSet.java
@@ -18,11 +18,8 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.util.Enumeration;
+import java.util.Vector;
 
 
 public class AttributeSet {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/Authenticator.java b/pki/base/util/src/com/netscape/cmsutil/radius/Authenticator.java
index 7fe06097505bb92e0110d5242466bd488652ddf9..3236d9b65c57a471f94a80d42908937412f07160 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/Authenticator.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/Authenticator.java
@@ -18,11 +18,7 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public abstract class Authenticator {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/CHAPChallengeAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/CHAPChallengeAttribute.java
index 5ddc186bcbb4279837763cbff8b1daae6cd5a841..2180bd57bd7181266528511d14addf44cd3d4a2b 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/CHAPChallengeAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/CHAPChallengeAttribute.java
@@ -18,11 +18,7 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class CHAPChallengeAttribute extends Attribute {
@@ -30,7 +26,7 @@ public class CHAPChallengeAttribute extends Attribute {
 
     public CHAPChallengeAttribute(byte value[]) {
         super();
-        _t = CHAP_CHALLENGE;
+        _t = Attribute.CHAP_CHALLENGE;
         _str = new String(value, 2, value.length - 2);
     }
 
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/CHAPPasswordAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/CHAPPasswordAttribute.java
index 063ce891c3f1df4f943b64696342c417c28a3092..111da900020cf4fd8e8d8cea22949499d25fe98d 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/CHAPPasswordAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/CHAPPasswordAttribute.java
@@ -18,15 +18,10 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class CHAPPasswordAttribute extends Attribute {
-    private byte _value[] = null;
     private int _ident = 0;
     private String _str = null;
 
@@ -36,10 +31,9 @@ public class CHAPPasswordAttribute extends Attribute {
 
     public CHAPPasswordAttribute(byte value[]) {
         super();
-        _t = CHAP_PASSWORD;
+        _t = Attribute.CHAP_PASSWORD;
         _ident = value[2];
         _str = new String(value, 2, 16);
-        _value = value;
     }
 
     public int getIdent() {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/CallbackIdAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/CallbackIdAttribute.java
index c4c175be2ee1a77928e5ae2ab96e8be03562db78..90d496c27157f03b4c1c08aaefa4c64da8a44930 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/CallbackIdAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/CallbackIdAttribute.java
@@ -18,22 +18,16 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class CallbackIdAttribute extends Attribute {
-    private byte _value[] = null;
     private String _str = null;
 
     public CallbackIdAttribute(byte value[]) {
         super();
-        _t = CALLBACK_ID;
+        _t = Attribute.CALLBACK_ID;
         _str = new String(value, 2, value.length - 2);
-        _value = value;
     }
 
     public String getString() {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/CallbackNumberAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/CallbackNumberAttribute.java
index 8189301708caf89a93d5b0eb29a89e4862d443aa..15ed26f43ba06f880c939c38b58ff5d0eaf131dc 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/CallbackNumberAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/CallbackNumberAttribute.java
@@ -18,22 +18,16 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class CallbackNumberAttribute extends Attribute {
-    private byte _value[] = null;
     private String _str = null;
 
     public CallbackNumberAttribute(byte value[]) {
         super();
-        _t = CALLBACK_NUMBER;
+        _t = Attribute.CALLBACK_NUMBER;
         _str = new String(value, 2, value.length - 2);
-        _value = value;
     }
 
     public String getString() {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/CallerStationIdAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/CallerStationIdAttribute.java
index a0afb3fcd80d81f7bd4d9470e12a312df1fbf106..912907526b52d343d7424912e6efa31ab3a4e3c2 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/CallerStationIdAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/CallerStationIdAttribute.java
@@ -18,22 +18,16 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class CallerStationIdAttribute extends Attribute {
-    private byte _value[] = null;
     private String _str = null;
 
     public CallerStationIdAttribute(byte value[]) {
         super();
-        _t = CALLER_STATION_ID;
+        _t = Attribute.CALLER_STATION_ID;
         _str = new String(value, 2, value.length - 2);
-        _value = value;
     }
 
     public String getString() {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/CallingStationIdAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/CallingStationIdAttribute.java
index 162d7098ed21ebf3f65dfdbd02c9a0b4587696ee..d8bfe5ef251fd187c82f563bf1505c9498e00b0d 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/CallingStationIdAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/CallingStationIdAttribute.java
@@ -18,22 +18,16 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class CallingStationIdAttribute extends Attribute {
-    private byte _value[] = null;
     private String _str = null;
 
     public CallingStationIdAttribute(byte value[]) {
         super();
-        _t = CALLING_STATION_ID;
+        _t = Attribute.CALLING_STATION_ID;
         _str = new String(value, 2, value.length - 2);
-        _value = value;
     }
 
     public String getString() {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/ChallengeException.java b/pki/base/util/src/com/netscape/cmsutil/radius/ChallengeException.java
index bdcd77abca8b579bae6089e89fe19e8dd7434f35..cad17c23b939055e055d89edd41320dacaf02fa7 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/ChallengeException.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/ChallengeException.java
@@ -18,14 +18,11 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+
 
 
 public class ChallengeException extends Exception {
+    private static final long serialVersionUID = -3496050461777520369L;
     private AccessChallenge _res = null;
 
     public ChallengeException(AccessChallenge res) {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/FilterIdAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/FilterIdAttribute.java
index 15b8940d4cb3e59cbcde9bf4a88f8af9f85e41d0..6e0918f6d6a8b51df5ffdab3072e4b6e62977172 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/FilterIdAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/FilterIdAttribute.java
@@ -18,22 +18,16 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class FilterIdAttribute extends Attribute {
-    private byte _value[] = null;
     private String _str = null;
 
     public FilterIdAttribute(byte value[]) {
         super();
-        _t = CHAP_PASSWORD;
+        _t = Attribute.CHAP_PASSWORD;
         _str = new String(value, 2, value.length - 2);
-        _value = value;
     }
 
     public String getString() {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/FramedAppleTalkLinkAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/FramedAppleTalkLinkAttribute.java
index 649442fa29c01293489b1a609f7a131709a05a5d..6d9d0fd51b68b142f95953e3d9c51060e92689b5 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/FramedAppleTalkLinkAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/FramedAppleTalkLinkAttribute.java
@@ -18,23 +18,17 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class FramedAppleTalkLinkAttribute extends Attribute {
     public static int UN_NUMBERED = 0;
 
-    private byte _value[] = null;
     private int _type = 0;
 
     public FramedAppleTalkLinkAttribute(byte value[]) {
         super();
-        _t = FRAMED_APPLETALK_LINK;
-        _value = value;
+        _t = Attribute.FRAMED_APPLETALK_LINK;
         _type = value[5] & 0xFF;
         _type |= ((value[4] << 8) & 0xFF00);
         _type |= ((value[3] << 16) & 0xFF0000);
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/FramedAppleTalkNetworkAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/FramedAppleTalkNetworkAttribute.java
index e594498626218159ca839c812d79fd88b0f8dccc..e05162f87827bef04c364fc6b6f1e40927400772 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/FramedAppleTalkNetworkAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/FramedAppleTalkNetworkAttribute.java
@@ -18,21 +18,15 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class FramedAppleTalkNetworkAttribute extends Attribute {
-    private byte _value[] = null;
     private int _type = 0;
 
     public FramedAppleTalkNetworkAttribute(byte value[]) {
         super();
-        _t = FRAMED_APPLETALK_NETWORK;
-        _value = value;
+        _t = Attribute.FRAMED_APPLETALK_NETWORK;
         _type = value[5] & 0xFF;
         _type |= ((value[4] << 8) & 0xFF00);
         _type |= ((value[3] << 16) & 0xFF0000);
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/FramedAppleTalkZoneAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/FramedAppleTalkZoneAttribute.java
index 18f0644481a2a93882012bbe864ef37857e6ae2a..9fa83623bbc8a77f5e6ea774f468b53ced0074cc 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/FramedAppleTalkZoneAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/FramedAppleTalkZoneAttribute.java
@@ -18,22 +18,16 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class FramedAppleTalkZoneAttribute extends Attribute {
-    private byte _value[] = null;
     private String _str = null;
 
     public FramedAppleTalkZoneAttribute(byte value[]) {
         super();
-        _t = FRAMED_APPLETALK_ZONE;
+        _t = Attribute.FRAMED_APPLETALK_ZONE;
         _str = new String(value, 2, value.length - 2);
-        _value = value;
     }
 
     public String getString() {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/FramedCompressionAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/FramedCompressionAttribute.java
index 9b2f398cc3178f2859a111a2701ddb93aa1597f1..bb9b064ef442b2531594b8803201bf085f3432ff 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/FramedCompressionAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/FramedCompressionAttribute.java
@@ -18,11 +18,7 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class FramedCompressionAttribute extends Attribute {
@@ -31,17 +27,15 @@ public class FramedCompressionAttribute extends Attribute {
     public static final int IPX_HEADER = 2;
     public static final int STAC_LZS = 3;
 
-    private byte _value[] = null;
     private int _type = 0;
 
     public FramedCompressionAttribute(byte value[]) {
         super();
-        _t = FRAMED_COMPRESSION;
+        _t = Attribute.FRAMED_COMPRESSION;
         _type = value[5] & 0xFF; 
         _type |= ((value[4] << 8) & 0xFF00); 
         _type |= ((value[3] << 16) & 0xFF0000); 
         _type |= ((value[2] << 24) & 0xFF000000);
-        _value = value;
     }
 
     public int getType() {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/FramedIPAddressAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/FramedIPAddressAttribute.java
index 55b313a1bc4a66fbc7393aa2444e919c7e160f0a..b30e286cf3d694f03b380d27b41cef988a497869 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/FramedIPAddressAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/FramedIPAddressAttribute.java
@@ -18,25 +18,19 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class FramedIPAddressAttribute extends Attribute {
-    private byte _value[] = null;
     private byte _addr[] = new byte[4];
 
     public FramedIPAddressAttribute(byte value[]) {
         super();
-        _t = FRAMED_IP_ADDRESS;
+        _t = Attribute.FRAMED_IP_ADDRESS;
         _addr[0] = value[2];		
         _addr[1] = value[3];		
         _addr[2] = value[4];		
-        _addr[3] = value[5];		
-        _value = value;
+        _addr[3] = value[5];
     }
 
     public byte[] getValue() throws IOException {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/FramedIPNetmaskAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/FramedIPNetmaskAttribute.java
index c8f7324f2dbfe71f09f79fb681b31027bc3cf408..3ac97335e777f6a673c6a3e20d9c7af6ab90359f 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/FramedIPNetmaskAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/FramedIPNetmaskAttribute.java
@@ -18,25 +18,19 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class FramedIPNetmaskAttribute extends Attribute {
-    private byte _value[] = null;
     private byte _mask[] = new byte[4];
 
     public FramedIPNetmaskAttribute(byte value[]) {
         super();
-        _t = FRAMED_IP_NETMASK;
+        _t = Attribute.FRAMED_IP_NETMASK;
         _mask[0] = value[2];
         _mask[1] = value[3];
         _mask[2] = value[4];
         _mask[3] = value[5];
-        _value = value;
     }
 
     public byte[] getValue() throws IOException {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/FramedIPXNetworkAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/FramedIPXNetworkAttribute.java
index 448dbb5de2ff077d96a9e36c1318d094aa6bd783..4089309b46f158aab5ca85a175503d838e721f0d 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/FramedIPXNetworkAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/FramedIPXNetworkAttribute.java
@@ -18,25 +18,19 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class FramedIPXNetworkAttribute extends Attribute {
-    private byte _value[] = null;
     private byte _net[] = new byte[4];
 
     public FramedIPXNetworkAttribute(byte value[]) {
         super();
-        _t = FRAMED_IPX_NETWORK;
+        _t = Attribute.FRAMED_IPX_NETWORK;
         _net[0] = value[2];
         _net[1] = value[3];
         _net[2] = value[4];
         _net[3] = value[5];
-        _value = value;
     }
 
     public byte[] getValue() throws IOException {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/FramedMTUAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/FramedMTUAttribute.java
index 0c9de7268c9cd1e79d12bbf3d1769bd5d0513cf6..f86133440e5a6ba8646be77a2d2849facab01e5b 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/FramedMTUAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/FramedMTUAttribute.java
@@ -18,21 +18,15 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class FramedMTUAttribute extends Attribute {
-    private byte _value[] = null;
     private int _type = 0;
 
     public FramedMTUAttribute(byte value[]) {
         super();
-        _t = FRAMED_IP_ADDRESS;
-        _value = value;
+        _t = Attribute.FRAMED_IP_ADDRESS;
         _type = value[5] & 0xFF;
         _type |= ((value[4] << 8) & 0xFF00);
         _type |= ((value[3] << 16) & 0xFF0000);
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/FramedProtocolAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/FramedProtocolAttribute.java
index a13321c8d20c2a4ee880384eb9142aa05340de1c..4b7f93ffa7508b36614a2798f986b2df087f6374 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/FramedProtocolAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/FramedProtocolAttribute.java
@@ -18,11 +18,7 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class FramedProtocolAttribute extends Attribute {
@@ -33,17 +29,15 @@ public class FramedProtocolAttribute extends Attribute {
     public static final int XYLOGICS = 5;
     public static final int X_75 = 6;
 
-    private byte _value[] = null;
     private int _type = 0;
 
     public FramedProtocolAttribute(byte value[]) {
         super();
-        _t = SERVICE_TYPE;
+        _t = Attribute.SERVICE_TYPE;
         _type = value[5] & 0xFF; 
         _type |= ((value[4] << 8) & 0xFF00); 
         _type |= ((value[3] << 16) & 0xFF0000); 
         _type |= ((value[2] << 24) & 0xFF000000);
-        _value = value;
     }
 
     public int getType() {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/FramedRouteAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/FramedRouteAttribute.java
index 07777bd12cf66e6d28a1b4b43d6ef363e45df619..a3cd609b0353c2d595fdd4c9223eb2b784e018eb 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/FramedRouteAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/FramedRouteAttribute.java
@@ -18,22 +18,16 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class FramedRouteAttribute extends Attribute {
-    private byte _value[] = null;
     private String _str = null;
 
     public FramedRouteAttribute(byte value[]) {
         super();
-        _t = FRAMED_ROUTE;
+        _t = Attribute.FRAMED_ROUTE;
         _str = new String(value, 2, value.length - 2);
-        _value = value;
     }
 
     public String getString() {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/FramedRoutingAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/FramedRoutingAttribute.java
index ade7e34f2148c2a3bda55fac82c45f930ce6af3d..dc3d6be520211d6f8075ba529d22993576cc6ece 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/FramedRoutingAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/FramedRoutingAttribute.java
@@ -18,11 +18,7 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class FramedRoutingAttribute extends Attribute {
@@ -31,17 +27,15 @@ public class FramedRoutingAttribute extends Attribute {
     public static final int LISTEN_FOR_ROUTING_PACKETS = 2;
     public static final int SEND_AND_LISTEN = 3;
 
-    private byte _value[] = null;
     private int _type = 0;
 
     public FramedRoutingAttribute(byte value[]) {
         super();
-        _t = FRAMED_ROUTING;
+        _t = Attribute.FRAMED_ROUTING;
         _type = value[5] & 0xFF;
         _type |= ((value[4] << 8) & 0xFF00);
         _type |= ((value[3] << 16) & 0xFF0000);
         _type |= ((value[2] << 24) & 0xFF000000);
-        _value = value;
     }
 
     public int getType() {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/GenericAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/GenericAttribute.java
index df42fb6f9ebcb6686436085e53eb3a3df3b0d863..c368a27126b7a08dd122e43bcc913468c9d30b92 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/GenericAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/GenericAttribute.java
@@ -18,11 +18,7 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class GenericAttribute extends Attribute {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/IdleTimeoutAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/IdleTimeoutAttribute.java
index 513c1077f4c5166ee8f2a583b200c6807d154e8d..425296943d89eb39e556a8e9379b3e183da66f7b 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/IdleTimeoutAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/IdleTimeoutAttribute.java
@@ -18,11 +18,7 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class IdleTimeoutAttribute extends Attribute {
@@ -30,7 +26,7 @@ public class IdleTimeoutAttribute extends Attribute {
 
     public IdleTimeoutAttribute(byte value[]) {
         super();
-        _t = IDLE_TIMEOUT;
+        _t = Attribute.IDLE_TIMEOUT;
         _timeout = value[5] & 0xFF;
         _timeout |= ((value[4] << 8) & 0xFF00);
         _timeout |= ((value[3] << 16) & 0xFF0000);
@@ -38,7 +34,7 @@ public class IdleTimeoutAttribute extends Attribute {
     }
 
     public IdleTimeoutAttribute(int timeout) {
-        super(IDLE_TIMEOUT);
+        super(Attribute.IDLE_TIMEOUT);
         _timeout = timeout;
     }
 
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/LoginIPHostAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/LoginIPHostAttribute.java
index 2f8dae7259e307eed17d920fface6a0017fc1199..ca6fc6d628ba7e84aa25b95740343d8135c39e64 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/LoginIPHostAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/LoginIPHostAttribute.java
@@ -18,28 +18,22 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class LoginIPHostAttribute extends Attribute {
     public static final int NAS_ALLOW_SELECT = 0xFFFFFFFF;
     public static final int NAS_SELECT = 0;
 
-    private byte _value[] = null;
     private int _type = 0;
 
     public LoginIPHostAttribute(byte value[]) {
         super();
-        _t = LOGIN_IP_HOST;
+        _t = Attribute.LOGIN_IP_HOST;
         _type = value[5] & 0xFF;
         _type |= ((value[4] << 8) & 0xFF00);
         _type |= ((value[3] << 16) & 0xFF0000);
         _type |= ((value[2] << 24) & 0xFF000000);
-        _value = value;
     }
 
     public int getType() {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/LoginLATGroupAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/LoginLATGroupAttribute.java
index 5c1891f78c3e39e14b603ba82a8d201e9a4f429a..e7204d2f68e8e18ed89d93b97124732b848566af 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/LoginLATGroupAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/LoginLATGroupAttribute.java
@@ -18,22 +18,16 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class LoginLATGroupAttribute extends Attribute {
-    private byte _value[] = null;
     private String _str = null;
 
     public LoginLATGroupAttribute(byte value[]) {
         super();
-        _t = LOGIN_LAT_GROUP;
+        _t = Attribute.LOGIN_LAT_GROUP;
         _str = new String(value, 2, value.length - 2);
-        _value = value;
     }
 
     public String getString() {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/LoginLATNodeAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/LoginLATNodeAttribute.java
index 55948d4437e09595870a97e660e85a6ae0c9aaa9..76458d2ded5f95d86ddd059402b4f8e30a7f0462 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/LoginLATNodeAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/LoginLATNodeAttribute.java
@@ -18,22 +18,16 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class LoginLATNodeAttribute extends Attribute {
-    private byte _value[] = null;
     private String _str = null;
 
     public LoginLATNodeAttribute(byte value[]) {
         super();
-        _t = LOGIN_LAT_NODE;
+        _t = Attribute.LOGIN_LAT_NODE;
         _str = new String(value, 2, value.length - 2);
-        _value = value;
     }
 
     public String getString() {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/LoginLATPortAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/LoginLATPortAttribute.java
index a0e61ab98197d7d6ce46fa915a5e64bb06e033c0..d5a63f466b6e0bacd1f4dc7545def0825d62480c 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/LoginLATPortAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/LoginLATPortAttribute.java
@@ -18,22 +18,16 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class LoginLATPortAttribute extends Attribute {
-    private byte _value[] = null;
     private String _str = null;
 
     public LoginLATPortAttribute(byte value[]) {
         super();
-        _t = PROXY_STATE;
+        _t = Attribute.PROXY_STATE;
         _str = new String(value, 2, value.length - 2);
-        _value = value;
     }
 
     public String getString() {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/LoginLATServiceAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/LoginLATServiceAttribute.java
index 7116630ac3ac94c1dc0cc9698cf355cfb942272d..7b0001d1ddfa2706d6a4bb8f7a635564c0e82a46 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/LoginLATServiceAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/LoginLATServiceAttribute.java
@@ -18,22 +18,16 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class LoginLATServiceAttribute extends Attribute {
-    private byte _value[] = null;
     private String _str = null;
 
     public LoginLATServiceAttribute(byte value[]) {
         super();
-        _t = LOGIN_LAT_SERVICE;
+        _t = Attribute.LOGIN_LAT_SERVICE;
         _str = new String(value, 2, value.length - 2);
-        _value = value;
     }
 
     public String getString() {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/LoginServiceAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/LoginServiceAttribute.java
index 1dcd12b2feedf440ee3834cf2bed1a4bc6ddb6a9..fa10e66620688fca0b03036d9cc6fd294dd7aeaa 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/LoginServiceAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/LoginServiceAttribute.java
@@ -18,11 +18,7 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class LoginServiceAttribute extends Attribute {
@@ -35,17 +31,15 @@ public class LoginServiceAttribute extends Attribute {
     public static final int X25_T3POS = 6;
     public static final int TCP_CLEAR_QUIET = 8;
 
-    private byte _value[] = null;
     private int _type = 0;
 
     public LoginServiceAttribute(byte value[]) {
         super();
-        _t = LOGIN_SERVICE;
+        _t = Attribute.LOGIN_SERVICE;
         _type = value[5] & 0xFF;
         _type |= ((value[4] << 8) & 0xFF00);
         _type |= ((value[3] << 16) & 0xFF0000);
         _type |= ((value[2] << 24) & 0xFF000000);
-        _value = value;
     }
 
     public int getType() {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/LoginTCPPortAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/LoginTCPPortAttribute.java
index b7921c3a875257f055a5af11703e40713255c3f4..4467c802272610aa720e77ef3dc384dd182f6473 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/LoginTCPPortAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/LoginTCPPortAttribute.java
@@ -18,11 +18,7 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class LoginTCPPortAttribute extends Attribute {
@@ -30,7 +26,7 @@ public class LoginTCPPortAttribute extends Attribute {
 
     public LoginTCPPortAttribute(byte value[]) {
         super();
-        _t = LOGIN_TCP_PORT;
+        _t = Attribute.LOGIN_TCP_PORT;
         _port = value[5] & 0xFF;
         _port |= ((value[4] << 8) & 0xFF00);
         _port |= ((value[3] << 16) & 0xFF0000);
@@ -38,7 +34,7 @@ public class LoginTCPPortAttribute extends Attribute {
     }
 
     public LoginTCPPortAttribute(int port) {
-        super(LOGIN_TCP_PORT);
+        super(Attribute.LOGIN_TCP_PORT);
         _port = port;
     }
 
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/NASClassAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/NASClassAttribute.java
index 539c259f96ccbf4e07bc92a9aa786562fdda25b1..39647e9f15328032f865ad1bc46ed1fff2173e4c 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/NASClassAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/NASClassAttribute.java
@@ -18,22 +18,16 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class NASClassAttribute extends Attribute {
-    private byte _value[] = null;
     private String _str = null;
 
     public NASClassAttribute(byte value[]) {
         super();
-        _t = NAS_CLASS;
+        _t = Attribute.NAS_CLASS;
         _str = new String(value, 2, value.length - 2);
-        _value = value;
     }
 
     public String getString() {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/NASIPAddressAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/NASIPAddressAttribute.java
index 3b9e438ff9a3b842f4723766cd32567989d6ff29..4fa3c765b78eaba3a096f3e0262cd36acd68c3e1 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/NASIPAddressAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/NASIPAddressAttribute.java
@@ -18,25 +18,19 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
+import java.net.InetAddress;
 
 
 public class NASIPAddressAttribute extends Attribute {
     private InetAddress _ip = null;
-    private byte _value[] = null;
-
     public NASIPAddressAttribute(byte value[]) {
         super();
-        _t = NAS_IP_ADDRESS;
-        _value = value;
+        _t = Attribute.NAS_IP_ADDRESS;
     }
 
     public NASIPAddressAttribute(InetAddress ip) {
-        super(NAS_IP_ADDRESS);
+        super(Attribute.NAS_IP_ADDRESS);
         _ip = ip;
     }
 
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/NASIdentifierAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/NASIdentifierAttribute.java
index 3cc67d8ec83050c0f1163c9e3de6e148cfebcff3..ed2f25e22d84362d44bf8c6902540292a62a485d 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/NASIdentifierAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/NASIdentifierAttribute.java
@@ -18,22 +18,16 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class NASIdentifierAttribute extends Attribute {
-    private byte _value[] = null;
     private String _str = null;
 
     public NASIdentifierAttribute(byte value[]) {
         super();
-        _t = NAS_IDENTIFIER;
+        _t = Attribute.NAS_IDENTIFIER;
         _str = new String(value, 2, value.length - 2);
-        _value = value;
     }
 
     public String getString() {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/NASPacket.java b/pki/base/util/src/com/netscape/cmsutil/radius/NASPacket.java
index 86eec6dbfa1421ad043322d445979f5d8be6685b..f09b5878e5754188a2e4e01558dc10a150221c46 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/NASPacket.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/NASPacket.java
@@ -18,11 +18,8 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
 
 
 public abstract class NASPacket extends Packet {
@@ -35,7 +32,7 @@ public abstract class NASPacket extends Packet {
         ByteArrayOutputStream attrsOS = new ByteArrayOutputStream();
 
         for (int i = 0; i < _attrs.size(); i++) {
-            Attribute attr = (Attribute) getAttributeAt(i);
+            Attribute attr = getAttributeAt(i);
 
             attrsOS.write(attr.getData());
         }
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/NASPortAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/NASPortAttribute.java
index ebf1aa2182bcc405236da4e962e17ac86534dc3f..5e28ffbdd5166a45d9ac7f69ab48241f2d152c4f 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/NASPortAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/NASPortAttribute.java
@@ -18,11 +18,7 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class NASPortAttribute extends Attribute {
@@ -30,7 +26,7 @@ public class NASPortAttribute extends Attribute {
 
     public NASPortAttribute(byte value[]) {
         super();
-        _t = NAS_PORT;
+        _t = Attribute.NAS_PORT;
         _port = value[5] & 0xFF;
         _port |= ((value[4] << 8) & 0xFF00);
         _port |= ((value[3] << 16) & 0xFF0000);
@@ -38,7 +34,7 @@ public class NASPortAttribute extends Attribute {
     }
 
     public NASPortAttribute(int port) {
-        super(NAS_PORT);
+        super(Attribute.NAS_PORT);
         _port = port;
     }
 
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/NASPortTypeAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/NASPortTypeAttribute.java
index a6e40ae4b856d8e49cdbf2ed5212df53d770ec07..fda8b53eee03cacf6eab0029866a8b3d8f847a63 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/NASPortTypeAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/NASPortTypeAttribute.java
@@ -18,11 +18,7 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class NASPortTypeAttribute extends Attribute {
@@ -49,7 +45,7 @@ public class NASPortTypeAttribute extends Attribute {
 
     public NASPortTypeAttribute(byte value[]) {
         super();
-        _t = NAS_PORT_TYPE;
+        _t = Attribute.NAS_PORT_TYPE;
         _value = value;
     }
 
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/Packet.java b/pki/base/util/src/com/netscape/cmsutil/radius/Packet.java
index cd0e5a881e3f061244fde4c2a5a0a150192ad3bc..4af445639b905944f40c630c979883e518f455dd 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/Packet.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/Packet.java
@@ -18,11 +18,6 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
 
 
 public abstract class Packet {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/PacketFactory.java b/pki/base/util/src/com/netscape/cmsutil/radius/PacketFactory.java
index 9bd5d19218832549dcdaff1fe5f444d92902e40f..c9dd1620a27f631878cb224d2af153159c5fa2b5 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/PacketFactory.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/PacketFactory.java
@@ -18,11 +18,7 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class PacketFactory {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/PortLimitAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/PortLimitAttribute.java
index 41d185e88a86ec7b09d7bf357195361f5b1fbd56..df70a77dd907cec74db774503eff7bb634afdbde 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/PortLimitAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/PortLimitAttribute.java
@@ -18,22 +18,15 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class PortLimitAttribute extends Attribute {
     private int _port = 0;
 
-    private byte _value[] = null;
-
     public PortLimitAttribute(byte value[]) {
         super();
-        _t = FRAMED_IP_ADDRESS;
-        _value = value;
+        _t = Attribute.FRAMED_IP_ADDRESS;
         _port = value[5] & 0xFF;
         _port |= ((value[4] << 8) & 0xFF00);
         _port |= ((value[3] << 16) & 0xFF0000);
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/ProxyStateAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/ProxyStateAttribute.java
index 91210b354aa38f92dd2ecf2825fa88d9985c9469..f0f3f35cc1a9dd7a918b892508217731fc705b73 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/ProxyStateAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/ProxyStateAttribute.java
@@ -18,22 +18,16 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class ProxyStateAttribute extends Attribute {
-    private byte _value[] = null;
     private String _str = null;
 
     public ProxyStateAttribute(byte value[]) {
         super();
-        _t = PROXY_STATE;
+        _t = Attribute.PROXY_STATE;
         _str = new String(value, 2, value.length - 2);
-        _value = value;
     }
 
     public String getString() {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/RadiusConn.java b/pki/base/util/src/com/netscape/cmsutil/radius/RadiusConn.java
index 5d16cd8a23c629d6b6762fb02d10c4b833529475..58c3ef838c44a9c538100629ae81b6f4a967cb04 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/RadiusConn.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/RadiusConn.java
@@ -18,11 +18,15 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
+import java.io.InterruptedIOException;
+import java.net.DatagramPacket;
+import java.net.DatagramSocket;
+import java.net.InetAddress;
+import java.net.SocketException;
+import java.security.NoSuchAlgorithmException;
+import java.security.SecureRandom;
+import java.util.Properties;
 
 
 /**
@@ -37,7 +41,6 @@ public class RadiusConn {
 
     public static String OPTION_DEBUG = "OPTION_DEBUG";
 
-    private Properties _options = null;
     private boolean _traceOn = true;
     private String _host[] = new String[2];
     private int _port[] = new int[2];
@@ -45,7 +48,7 @@ public class RadiusConn {
     private String _secret = null;
     private DatagramSocket _socket = null;
     private short _id = (short) System.currentTimeMillis();
-    private int _maxRetries = MAX_RETRIES;
+    private int _maxRetries = RadiusConn.MAX_RETRIES;
     private SecureRandom _rand = null;
 
     public RadiusConn(String host1, String host2, int port, String secret, 
@@ -56,7 +59,7 @@ public class RadiusConn {
     public RadiusConn(String host, int port, String secret, byte seed[],
         Properties options) 
         throws SocketException {
-        this(host, port, host, port, secret, DEFAULT_TIMEOUT, seed, options);
+        this(host, port, host, port, secret, RadiusConn.DEFAULT_TIMEOUT, seed, options);
     }
 
     public RadiusConn(String host1, int port1, String host2, int port2, 
@@ -68,7 +71,6 @@ public class RadiusConn {
         _port[1] = port2;
         _selected = 0;
         _secret = secret;
-        _options = options;
         _socket = new DatagramSocket(); 
         _socket.setSoTimeout(timeout * 1000);
         if (seed == null) {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/RejectException.java b/pki/base/util/src/com/netscape/cmsutil/radius/RejectException.java
index 1a76e76039667cc6284ce42e9968976c89fed565..16d38bccfa7e143d4161de0c403c3f410a3e6584 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/RejectException.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/RejectException.java
@@ -18,14 +18,10 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
 
 
 public class RejectException extends Exception {
+    private static final long serialVersionUID = -6410697638175895003L;
     private AccessReject _res = null;
 
     public RejectException(AccessReject res) {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/ReplyMessageAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/ReplyMessageAttribute.java
index dd1fc29d1b7edca9e64072a33bb63ec5be7c0584..014bfab33c3e90605434bf029a52896e8cbe3b16 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/ReplyMessageAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/ReplyMessageAttribute.java
@@ -18,22 +18,16 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class ReplyMessageAttribute extends Attribute {
-    private byte _value[] = null;
     private String _str = null;
 
     public ReplyMessageAttribute(byte value[]) {
         super();
-        _t = REPLY_MESSAGE;
+        _t = Attribute.REPLY_MESSAGE;
         _str = new String(value, 2, value.length - 2);
-        _value = value;
     }
 
     public String getString() {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/RequestAuthenticator.java b/pki/base/util/src/com/netscape/cmsutil/radius/RequestAuthenticator.java
index eaba2077a66e7ddaa63b00651120647f0f1a1942..108b51451805a5045d3feba3da976befe601b046 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/RequestAuthenticator.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/RequestAuthenticator.java
@@ -18,11 +18,10 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.security.SecureRandom;
 
 
 public class RequestAuthenticator extends Authenticator {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/ResponseAuthenticator.java b/pki/base/util/src/com/netscape/cmsutil/radius/ResponseAuthenticator.java
index 509ddc35dc15feafdb3959e950cc8df448d0e69a..93fd46c3935ed1d0823d2b8df9439b472cd38287 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/ResponseAuthenticator.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/ResponseAuthenticator.java
@@ -18,11 +18,7 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class ResponseAuthenticator extends Authenticator {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/ServerPacket.java b/pki/base/util/src/com/netscape/cmsutil/radius/ServerPacket.java
index c349fed9ab6bab50832ca936074be850996c0daf..abbe255fc0a837a7536669845040661bf738f2d5 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/ServerPacket.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/ServerPacket.java
@@ -18,11 +18,7 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public abstract class ServerPacket extends Packet {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/ServiceTypeAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/ServiceTypeAttribute.java
index 7de8cfb01e0a1b8a5f67d9689afde95a4925bdb2..feaca06e865de1016a0acc9e0e7d09eaa365b9aa 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/ServiceTypeAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/ServiceTypeAttribute.java
@@ -18,11 +18,7 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class ServiceTypeAttribute extends Attribute {
@@ -38,17 +34,15 @@ public class ServiceTypeAttribute extends Attribute {
     public static final int CALL_CHECK = 10;
     public static final int CALLBACK_ADMINISTRATIVE = 11;
 
-    private byte _value[] = null;
     private int _type = 0;
 
     public ServiceTypeAttribute(byte value[]) {
         super();
-        _t = SERVICE_TYPE;
+        _t = Attribute.SERVICE_TYPE;
         _type = value[5] & 0xFF; 
         _type |= ((value[4] << 8) & 0xFF00); 
         _type |= ((value[3] << 16) & 0xFF0000); 
         _type |= ((value[2] << 24) & 0xFF000000);
-        _value = value;
     }
 
     public int getType() {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/SessionTimeoutAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/SessionTimeoutAttribute.java
index f83690d6f2054ce84173efed69174c48ed343b59..8accfb851359a7f86fabc53b431f457aacbffc14 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/SessionTimeoutAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/SessionTimeoutAttribute.java
@@ -18,11 +18,7 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class SessionTimeoutAttribute extends Attribute {
@@ -30,7 +26,7 @@ public class SessionTimeoutAttribute extends Attribute {
 
     public SessionTimeoutAttribute(byte value[]) {
         super();
-        _t = SESSION_TIMEOUT;
+        _t = Attribute.SESSION_TIMEOUT;
         _timeout = value[5] & 0xFF;
         _timeout |= ((value[4] << 8) & 0xFF00);
         _timeout |= ((value[3] << 16) & 0xFF0000);
@@ -38,7 +34,7 @@ public class SessionTimeoutAttribute extends Attribute {
     }
 
     public SessionTimeoutAttribute(int timeout) {
-        super(SESSION_TIMEOUT);
+        super(Attribute.SESSION_TIMEOUT);
         _timeout = timeout;
     }
 
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/StateAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/StateAttribute.java
index c18e598806c5ce4ffb458992fbf55f68006f3586..55899acfb3e086cee8e608376547a73f16bd3108 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/StateAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/StateAttribute.java
@@ -18,27 +18,21 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class StateAttribute extends Attribute {
-    private byte _value[] = null;
     private String _str = null;
 
     public StateAttribute(String str) {
-        _t = STATE;
+        _t = Attribute.STATE;
         _str = str;
     }
 
     public StateAttribute(byte value[]) {
         super();
-        _t = STATE;
+        _t = Attribute.STATE;
         _str = new String(value, 2, value.length - 2);
-        _value = value;
     }
 
     public String getString() {
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/TerminationActionAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/TerminationActionAttribute.java
index 1a554ea2d7c257c70bd152c16181f7cdfa2de949..1180ea76183382599f94059cfdfbf0f440625ed4 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/TerminationActionAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/TerminationActionAttribute.java
@@ -18,11 +18,7 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class TerminationActionAttribute extends Attribute {
@@ -33,7 +29,7 @@ public class TerminationActionAttribute extends Attribute {
 
     public TerminationActionAttribute(byte value[]) {
         super();
-        _t = TERMINATION_ACTION;
+        _t = Attribute.TERMINATION_ACTION;
         _action = value[5] & 0xFF;
         _action |= ((value[4] << 8) & 0xFF00);
         _action |= ((value[3] << 16) & 0xFF0000);
@@ -41,7 +37,7 @@ public class TerminationActionAttribute extends Attribute {
     }
 
     public TerminationActionAttribute(int action) {
-        super(TERMINATION_ACTION);
+        super(Attribute.TERMINATION_ACTION);
         _action = action;
     }
 
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/UserNameAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/UserNameAttribute.java
index 4e725ac3f6a8b378ec14487d638a83089a95c742..c5eac856d2c17a40b0bd728c63e07b0c811b20e1 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/UserNameAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/UserNameAttribute.java
@@ -18,11 +18,7 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class UserNameAttribute extends Attribute {
@@ -30,12 +26,12 @@ public class UserNameAttribute extends Attribute {
 
     public UserNameAttribute(byte value[]) {
         super();
-        _t = USER_NAME;
+        _t = Attribute.USER_NAME;
         _name = new String(value, 2, value.length - 2);
     }
 
     public UserNameAttribute(String name) {
-        super(USER_NAME);
+        super(Attribute.USER_NAME);
         _name = name;
     }
 
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/UserPasswordAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/UserPasswordAttribute.java
index 4550081aecbcae08ce721eb57a4e5a0cc5811011..e512cacbf6bcddf3a2ac22b00d64031369bca12d 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/UserPasswordAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/UserPasswordAttribute.java
@@ -18,11 +18,9 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
 
 
 public class UserPasswordAttribute extends Attribute {
@@ -35,7 +33,7 @@ public class UserPasswordAttribute extends Attribute {
     }
 
     public UserPasswordAttribute(Authenticator ra, String secret, String password) {
-        super(USER_PASSWORD);
+        super(Attribute.USER_PASSWORD);
         _ra = ra;
         _secret = secret;
         _password = password;
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/VendorSpecificAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/VendorSpecificAttribute.java
index 1d19a5055dc025abcab227e5537a1f5326ca3371..2ac7a73e9641c770d04634dbfd58971576dcf7d8 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/VendorSpecificAttribute.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/VendorSpecificAttribute.java
@@ -18,24 +18,18 @@
 package com.netscape.cmsutil.radius;
 
 
-import java.util.*;
-import java.math.*;
-import java.security.*;
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
 
 
 public class VendorSpecificAttribute extends Attribute {
-    private byte _value[] = null;
     private String _id = null;
     private String _str = null;
 
     public VendorSpecificAttribute(byte value[]) {
         super();
-        _t = VENDOR_SPECIFIC;
+        _t = Attribute.VENDOR_SPECIFIC;
         _id = new String(value, 2, 4);
         _str = new String(value, 6, value.length - 6);
-        _value = value;
     }
 
     public String getId() {
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 6ffd58e334d7f9f8afd7b82b4bc764c2dd305ca5..5dca13b000c3db4beba783ff54f58555d6de6ee0 100644
--- a/pki/base/util/src/com/netscape/cmsutil/scep/CRSPKIMessage.java
+++ b/pki/base/util/src/com/netscape/cmsutil/scep/CRSPKIMessage.java
@@ -18,19 +18,36 @@
 package com.netscape.cmsutil.scep;
 
 
-import org.mozilla.jss.asn1.*;
-import org.mozilla.jss.pkcs7.*;
-import java.io.*;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.CharConversionException;
+import java.io.IOException;
+import java.security.PublicKey;
 import java.util.Arrays;
 import java.util.Hashtable;
-import org.mozilla.jss.pkcs7.ContentInfo;
-//import org.mozilla.jss.util.Assert;
-import org.mozilla.jss.pkix.primitive.*;
-//import org.mozilla.jss.pkix.primitive.Attribute;
+
+import org.mozilla.jss.asn1.ANY;
+import org.mozilla.jss.asn1.ASN1Util;
+import org.mozilla.jss.asn1.INTEGER;
+import org.mozilla.jss.asn1.InvalidBERException;
+import org.mozilla.jss.asn1.NULL;
+import org.mozilla.jss.asn1.OBJECT_IDENTIFIER;
+import org.mozilla.jss.asn1.OCTET_STRING;
+import org.mozilla.jss.asn1.PrintableString;
+import org.mozilla.jss.asn1.SET;
+import org.mozilla.jss.crypto.SignatureAlgorithm;
+import org.mozilla.jss.crypto.TokenException;
 import org.mozilla.jss.pkcs7.Attribute;
-import org.mozilla.jss.crypto.*;
-import java.security.PublicKey;
-import org.mozilla.jss.pkix.cert.*;
+import org.mozilla.jss.pkcs7.ContentInfo;
+import org.mozilla.jss.pkcs7.EncryptedContentInfo;
+import org.mozilla.jss.pkcs7.EnvelopedData;
+import org.mozilla.jss.pkcs7.IssuerAndSerialNumber;
+import org.mozilla.jss.pkcs7.RecipientInfo;
+import org.mozilla.jss.pkcs7.SignedData;
+import org.mozilla.jss.pkcs7.SignerInfo;
+import org.mozilla.jss.pkix.cert.Certificate;
+import org.mozilla.jss.pkix.cert.CertificateInfo;
+import org.mozilla.jss.pkix.primitive.AlgorithmIdentifier;
 
 
 public class CRSPKIMessage {
@@ -133,8 +150,6 @@ public class CRSPKIMessage {
     // it's content is a signedData
     private SignedData    sd;
 
-    // In the signed data, we have:
-    private int           sdv;     // Version
     private ContentInfo   data;    // The data to be digested
     private EnvelopedData sded;    // Enveloped data inside of signed data
     private byte[]        signerCertBytes;
@@ -143,7 +158,6 @@ public class CRSPKIMessage {
     private SET           sis;     // set of SignerInfos
     private SignerInfo   si;     // First SignerInfo
     private AlgorithmIdentifier digestAlgorithmId = null;
-    private int          siv;  // Version
     private SET          aa;   // Authenticated Attributes
     private SET          aa_old;   // Authenticated Attributes
     private IssuerAndSerialNumber   sgnIASN; // Signer's Issuer Name and Serialnum
@@ -162,23 +176,18 @@ public class CRSPKIMessage {
     private int                  riv;     // Version
     private AlgorithmIdentifier  riAlgid; // alg that the bulk key is wrapped with
     private byte[]       riKey;           // bulk key, wrapped with above algorithm
-    private byte[]       cKey;            // * 'clear', unwrapped key (not in ASN.1) *
     private IssuerAndSerialNumber rcpIASN; // Recipient's Issuer Name and Serial Number
 
     private EncryptedContentInfo eci;
     private byte[]       iv;              // initialization vector for above key
     private byte[]       ec;              // encrypted content (P10, in case of request)
-    private byte[]       cc;              // * 'clear' content (not in ASN.1) *
     private String       encryptionAlgorithm = null;
 
     // For the CertRep, the enveloped content is another signed Data:
     private SignedData     crsd;
-    private int            rsdVersion;
-    private byte[]         rsdCert;         // certificate to send in response
-
     private Object         myP10;
 
-    private Hashtable      attrs;           // miscellanous
+    private Hashtable      attrs;           // Miscellaneous
 
     //   *** END *** //
 
@@ -211,14 +220,14 @@ public class CRSPKIMessage {
 
     private OBJECT_IDENTIFIER getAlgorithmOID (String hashAlgorithm)
     {
-        OBJECT_IDENTIFIER oid = MD5_DIGEST;
+        OBJECT_IDENTIFIER oid = CRSPKIMessage.MD5_DIGEST;
         if (hashAlgorithm != null) {
             if (hashAlgorithm.equals("SHA1")) {
-                oid = SHA1_DIGEST;
+                oid = CRSPKIMessage.SHA1_DIGEST;
             } else if (hashAlgorithm.equals("SHA256")) {
-                oid = SHA256_DIGEST;
+                oid = CRSPKIMessage.SHA256_DIGEST;
             } else  if (hashAlgorithm.equals("SHA512")) {
-                oid = SHA512_DIGEST;
+                oid = CRSPKIMessage.SHA512_DIGEST;
             }
         }
         return oid;
@@ -228,15 +237,14 @@ public class CRSPKIMessage {
     private String getHashAlgorithm (OBJECT_IDENTIFIER algorithmOID)
     {
         String hashAlgorithm = null;
-        OBJECT_IDENTIFIER oid = MD5_DIGEST;
         if (algorithmOID != null) {
-            if (algorithmOID.equals(MD5_DIGEST)) {
+            if (algorithmOID.equals(CRSPKIMessage.MD5_DIGEST)) {
                 hashAlgorithm = "MD5";
-            } else if (algorithmOID.equals(SHA1_DIGEST)) {
+            } else if (algorithmOID.equals(CRSPKIMessage.SHA1_DIGEST)) {
                 hashAlgorithm = "SHA1";
-            } else if (algorithmOID.equals(SHA256_DIGEST)) {
+            } else if (algorithmOID.equals(CRSPKIMessage.SHA256_DIGEST)) {
                 hashAlgorithm = "SHA256";
-            } else  if (algorithmOID.equals(SHA512_DIGEST)) {
+            } else  if (algorithmOID.equals(CRSPKIMessage.SHA512_DIGEST)) {
                 hashAlgorithm = "SHA512";
             }
         }
@@ -327,42 +335,42 @@ public class CRSPKIMessage {
                 SET tidset = new SET();
 
                 tidset.addElement((new PrintableString(transactionID)));
-                aa.addElement(new Attribute(CRS_TRANSID, tidset));
+                aa.addElement(new Attribute(CRSPKIMessage.CRS_TRANSID, tidset));
             }
             
             if (pkiStatus != null) {
                 SET pkistatusset = new SET();
 
                 pkistatusset.addElement(new PrintableString(pkiStatus));
-                aa.addElement(new Attribute(CRS_PKISTATUS, pkistatusset));
+                aa.addElement(new Attribute(CRSPKIMessage.CRS_PKISTATUS, pkistatusset));
             }
             
             if (messageType != null) {
                 SET aaset = new SET();
 
                 aaset.addElement(new PrintableString(messageType));
-                aa.addElement(new Attribute(CRS_MESSAGETYPE, aaset)); 
+                aa.addElement(new Attribute(CRSPKIMessage.CRS_MESSAGETYPE, aaset)); 
             }
 
             if (failInfo != null) {
                 SET fiset = new SET();
 
                 fiset.addElement(new PrintableString(failInfo));
-                aa.addElement(new Attribute(CRS_FAILINFO, fiset)); 
+                aa.addElement(new Attribute(CRSPKIMessage.CRS_FAILINFO, fiset)); 
             }
             
             if (senderNonce != null) {
                 SET snset = new SET();
 
                 snset.addElement(new OCTET_STRING(senderNonce));
-                aa.addElement(new Attribute(CRS_SENDERNONCE, snset));
+                aa.addElement(new Attribute(CRSPKIMessage.CRS_SENDERNONCE, snset));
             }
 
             if (recipientNonce != null) {
                 SET rnset = new SET();
 
                 rnset.addElement(new OCTET_STRING(recipientNonce));
-                aa.addElement(new Attribute(CRS_RECIPIENTNONCE, rnset));
+                aa.addElement(new Attribute(CRSPKIMessage.CRS_RECIPIENTNONCE, rnset));
             }
 
             // XXX sender nonce
@@ -414,7 +422,7 @@ public class CRSPKIMessage {
     public void makeRecipientInfo(int version, byte[] riKey) {
         this.riv = version;
 
-        this.riAlgid = new AlgorithmIdentifier(RSA_ENCRYPTION, new NULL());
+        this.riAlgid = new AlgorithmIdentifier(CRSPKIMessage.RSA_ENCRYPTION, new NULL());
         this.riKey = riKey;     
         
         this.ri = new RecipientInfo(
@@ -430,9 +438,9 @@ public class CRSPKIMessage {
         this.ec = ec;
 
         try {
-            OBJECT_IDENTIFIER oid = DES_CBC_ENCRYPTION;
+            OBJECT_IDENTIFIER oid = CRSPKIMessage.DES_CBC_ENCRYPTION;
             if (algorithm != null && algorithm.equals("DES3"))
-                oid = DES_EDE3_CBC_ENCRYPTION;
+                oid = CRSPKIMessage.DES_EDE3_CBC_ENCRYPTION;
 
             AlgorithmIdentifier aid = new AlgorithmIdentifier(oid, new OCTET_STRING(iv));
 
@@ -447,8 +455,6 @@ public class CRSPKIMessage {
     }
 
     public byte[] makeSignedRep(int v, byte[] certificate) {
-        rsdVersion = v;
-        rsdCert = certificate;
         try {
             SET certs = new SET();
             ANY cert = new ANY(certificate);
@@ -657,20 +663,20 @@ public class CRSPKIMessage {
     public void setPending() {
         // setIssuerAndSerialNumber();
             
-        setMessageType(mType_CertRep);
-        setPKIStatus(mStatus_PENDING);
+        setMessageType(CRSPKIMessage.mType_CertRep);
+        setPKIStatus(CRSPKIMessage.mStatus_PENDING);
     };
         
     public void setFailure(String failInfo) {
-        setMessageType(mType_CertRep);
-        setPKIStatus(mStatus_FAILURE);
+        setMessageType(CRSPKIMessage.mType_CertRep);
+        setPKIStatus(CRSPKIMessage.mStatus_FAILURE);
         setFailInfo(failInfo);
     }
         
     // Should add a Certificate to this call
     public void setSuccess() {
-        setMessageType(mType_CertRep);
-        setPKIStatus(mStatus_SUCCESS);
+        setMessageType(CRSPKIMessage.mType_CertRep);
+        setPKIStatus(CRSPKIMessage.mStatus_SUCCESS);
     }
     
     /**
@@ -702,7 +708,7 @@ public class CRSPKIMessage {
             
         sd = (SignedData) sdt.decode(
                     new ByteArrayInputStream(
-                        ((ANY) crsci.getContent()).getEncoded()
+                        (crsci.getContent()).getEncoded()
                     ));
         this.decodeSD();
     }
@@ -726,19 +732,19 @@ public class CRSPKIMessage {
         sdci = sd.getContentInfo();
             
         // HACK to work with CRS
-        ANY a = (ANY) sdci.getContent();
+        ANY a = sdci.getContent();
         ByteArrayInputStream s = new ByteArrayInputStream(a.getEncoded());
         OCTET_STRING os = (OCTET_STRING) (new OCTET_STRING.Template()).decode(s);
             
         ByteArrayInputStream s2 = new ByteArrayInputStream(os.toByteArray());
         ContentInfo ci = (ContentInfo) (new ContentInfo.Template()).decode(s2);
-        ByteArrayInputStream s3 = new ByteArrayInputStream(((ANY) ci.getContent()).getEncoded());
+        ByteArrayInputStream s3 = new ByteArrayInputStream((ci.getContent()).getEncoded());
             
         EnvelopedData.Template edt = new EnvelopedData.Template();
 
         sded = (EnvelopedData) edt.decode(s3);
         
-        SET signerCerts = (SET) sd.getCertificates();
+        SET signerCerts = sd.getCertificates();
         Certificate firstCert = (Certificate) signerCerts.elementAt(0);
 
         signerCertBytes = ASN1Util.encode(firstCert);
@@ -767,7 +773,7 @@ public class CRSPKIMessage {
     private void decodeED() throws Exception {
         SET ris;
 
-        ris = (SET) sded.getRecipientInfos();
+        ris = sded.getRecipientInfos();
             
         if (ris.size() == 0) {
             throw new Exception("RecipientInfos is empty");
@@ -775,9 +781,9 @@ public class CRSPKIMessage {
         ri = (RecipientInfo) ris.elementAt(0);
         eci = sded.getEncryptedContentInfo();
 
-        if (eci.getContentEncryptionAlgorithm().getOID().equals(DES_EDE3_CBC_ENCRYPTION)) {
+        if (eci.getContentEncryptionAlgorithm().getOID().equals(CRSPKIMessage.DES_EDE3_CBC_ENCRYPTION)) {
             encryptionAlgorithm = "DES3";
-        } else if (eci.getContentEncryptionAlgorithm().getOID().equals(DES_CBC_ENCRYPTION)) {
+        } else if (eci.getContentEncryptionAlgorithm().getOID().equals(CRSPKIMessage.DES_CBC_ENCRYPTION)) {
             encryptionAlgorithm = "DES";
         } else {
             throw new Exception("P10 encrypted alg is not supported (not DES): " + eci.getContentEncryptionAlgorithm().getOID());
@@ -816,7 +822,7 @@ public class CRSPKIMessage {
 
         riAlgid = ri.getKeyEncryptionAlgorithmID();
   
-        if (!riAlgid.getOID().equals(RSA_ENCRYPTION)) {
+        if (!riAlgid.getOID().equals(CRSPKIMessage.RSA_ENCRYPTION)) {
             throw new Exception("Request is protected by a key which we can't decrypt");
         }
         
@@ -831,7 +837,7 @@ public class CRSPKIMessage {
 
         for (count = 0; count < aa.size(); count++) {
             Attribute a = (Attribute) aa.elementAt(count);
-            SET s = (SET) a.getValues();
+            SET s = a.getValues();
             ANY f = (ANY) s.elementAt(0);
             PrintableString ps;
             PrintableString.Template pst = new PrintableString.Template();
@@ -839,26 +845,26 @@ public class CRSPKIMessage {
             
             OBJECT_IDENTIFIER oid = a.getType();
 
-            if (oid.equals(CRS_MESSAGETYPE)) {
+            if (oid.equals(CRSPKIMessage.CRS_MESSAGETYPE)) {
                 ps = (PrintableString) pst.decode(new ByteArrayInputStream(f.getEncoded()));
                 // We make a new string here
                 messageType = ps.toString();
                 
-            } else if (oid.equals(CRS_PKISTATUS)) {
+            } else if (oid.equals(CRSPKIMessage.CRS_PKISTATUS)) {
                 ps = (PrintableString) pst.decode(new ByteArrayInputStream(f.getEncoded()));
                 pkiStatus = new String (ps.toString());
-            } else if (oid.equals(CRS_FAILINFO)) {
+            } else if (oid.equals(CRSPKIMessage.CRS_FAILINFO)) {
                 ps = (PrintableString) pst.decode(new ByteArrayInputStream(f.getEncoded()));
                 failInfo = new String (ps.toString());
-            } else if (oid.equals(CRS_SENDERNONCE)) {
+            } else if (oid.equals(CRSPKIMessage.CRS_SENDERNONCE)) {
                 OCTET_STRING oss = (OCTET_STRING) ost.decode(new ByteArrayInputStream(f.getEncoded()));
 
                 senderNonce = oss.toByteArray();
-            } else if (oid.equals(CRS_RECIPIENTNONCE)) {
+            } else if (oid.equals(CRSPKIMessage.CRS_RECIPIENTNONCE)) {
                 OCTET_STRING osr = (OCTET_STRING) ost.decode(new ByteArrayInputStream(f.getEncoded()));
 
                 recipientNonce = osr.toByteArray();
-            } else if (oid.equals(CRS_TRANSID)) {
+            } else if (oid.equals(CRSPKIMessage.CRS_TRANSID)) {
                 ps = (PrintableString) pst.decode(new ByteArrayInputStream(f.getEncoded()));
                 transactionID = new String (ps.toString());
             }
@@ -872,19 +878,19 @@ public class CRSPKIMessage {
             return null;
         }
             
-        if (messageType.equals(mType_PKCSReq)) {
+        if (messageType.equals(CRSPKIMessage.mType_PKCSReq)) {
             return "PKCSReq";
         }
-        if (messageType.equals(mType_CertRep)) {
+        if (messageType.equals(CRSPKIMessage.mType_CertRep)) {
             return "CertRep";
         }
-        if (messageType.equals(mType_GetCertInitial)) {
+        if (messageType.equals(CRSPKIMessage.mType_GetCertInitial)) {
             return "GetCertInitial";
         }
-        if (messageType.equals(mType_GetCert)) {
+        if (messageType.equals(CRSPKIMessage.mType_GetCert)) {
             return "GetCert";
         }
-        if (messageType.equals(mType_GetCRL)) {
+        if (messageType.equals(CRSPKIMessage.mType_GetCRL)) {
             return "GetCRL";
         }
         // messageType should match one of the above
diff --git a/pki/base/util/src/com/netscape/cmsutil/util/Cert.java b/pki/base/util/src/com/netscape/cmsutil/util/Cert.java
index 6a2d32b321d79a256fad0c711c7598a2579b2131..692f923275cb926b4c48c33b184e5ddde6505909 100644
--- a/pki/base/util/src/com/netscape/cmsutil/util/Cert.java
+++ b/pki/base/util/src/com/netscape/cmsutil/util/Cert.java
@@ -18,18 +18,19 @@
 package com.netscape.cmsutil.util;
 
 
+import java.io.IOException;
+import java.security.cert.CertificateException;
+import java.security.cert.X509CRL;
+import java.security.cert.X509Certificate;
+
 import netscape.security.pkcs.PKCS7;
 import netscape.security.x509.X509CRLImpl;
 import netscape.security.x509.X509CertImpl;
+
 import org.mozilla.jss.crypto.SignatureAlgorithm;
-//import sun.misc.BASE64Decoder;
+
 import com.netscape.osutil.OSUtil;
 
-import java.io.IOException;
-import java.security.cert.CertificateException;
-import java.security.cert.X509CRL;
-import java.security.cert.X509Certificate;
-
 public class Cert {
 
     public static SignatureAlgorithm mapAlgorithmToJss(String algname) {
@@ -87,14 +88,14 @@ public class Cert {
     }
 
     public static String stripCertBrackets(String s) {
-	return stripBrackets(s);
+	return Cert.stripBrackets(s);
     }
 
  // private static BASE64Decoder mDecoder = new BASE64Decoder();
     public static X509CertImpl mapCert(String mime64)
         throws IOException {
-        mime64 = stripCertBrackets(mime64.trim());
-        String newval = normalizeCertStr(mime64);
+        mime64 = Cert.stripCertBrackets(mime64.trim());
+        String newval = Cert.normalizeCertStr(mime64);
      // byte rawPub[] = mDecoder.decodeBuffer(newval);
         byte rawPub[] = OSUtil.AtoB( newval );
         X509CertImpl cert = null;
@@ -108,8 +109,8 @@ public class Cert {
 
     public static X509Certificate[] mapCertFromPKCS7(String mime64)
         throws IOException {
-        mime64 = stripCertBrackets(mime64.trim());
-        String newval = normalizeCertStr(mime64);
+        mime64 = Cert.stripCertBrackets(mime64.trim());
+        String newval = Cert.normalizeCertStr(mime64);
      // byte rawPub[] = mDecoder.decodeBuffer(newval);
         byte rawPub[] = OSUtil.AtoB( newval );
         PKCS7 p7 = null;
@@ -124,8 +125,8 @@ public class Cert {
 
     public static X509CRL mapCRL(String mime64)
         throws IOException {
-        mime64 = stripCRLBrackets(mime64.trim());
-        String newval = normalizeCertStr(mime64);
+        mime64 = Cert.stripCRLBrackets(mime64.trim());
+        String newval = Cert.normalizeCertStr(mime64);
      // byte rawPub[] = mDecoder.decodeBuffer(newval);
         byte rawPub[] = OSUtil.AtoB( newval );
         X509CRL crl = null;
@@ -139,7 +140,7 @@ public class Cert {
 
     public static X509CRL mapCRL1(String mime64)
         throws IOException {
-        mime64 = stripCRLBrackets(mime64.trim());
+        mime64 = Cert.stripCRLBrackets(mime64.trim());
 
         byte rawPub[] = OSUtil.AtoB(mime64);
         X509CRL crl = null;
diff --git a/pki/base/util/src/com/netscape/cmsutil/util/Fmt.java b/pki/base/util/src/com/netscape/cmsutil/util/Fmt.java
index 49b878c4c6fb2f08242ae1aec903514d1adad290..05031b19453ba6998d02bbc4f4752e4113e51f21 100644
--- a/pki/base/util/src/com/netscape/cmsutil/util/Fmt.java
+++ b/pki/base/util/src/com/netscape/cmsutil/util/Fmt.java
@@ -123,193 +123,193 @@ public class Fmt {
 
     // byte
     public static String fmt(byte b) {
-        return fmt(b, 0, 0);
+        return Fmt.fmt(b, 0, 0);
     }
 
     public static String fmt(byte b, int minWidth) {
-        return fmt(b, minWidth, 0);
+        return Fmt.fmt(b, minWidth, 0);
     }
 
     public static String fmt(byte b, int minWidth, int flags) {
-        boolean hexadecimal = ((flags & HX) != 0);
-        boolean octal = ((flags & OC) != 0);
+        boolean hexadecimal = ((flags & Fmt.HX) != 0);
+        boolean octal = ((flags & Fmt.OC) != 0);
 
         if (hexadecimal)
-            return fmt(Integer.toString(b & 0xff, 16), minWidth, flags | WN);
+            return Fmt.fmt(Integer.toString(b & 0xff, 16), minWidth, flags | Fmt.WN);
         else if (octal)
-            return fmt(Integer.toString(b & 0xff, 8), minWidth, flags | WN);
+            return Fmt.fmt(Integer.toString(b & 0xff, 8), minWidth, flags | Fmt.WN);
         else
-            return fmt(Integer.toString(b & 0xff), minWidth, flags | WN);
+            return Fmt.fmt(Integer.toString(b & 0xff), minWidth, flags | Fmt.WN);
     }
 
     // short
     public static String fmt(short s) {
-        return fmt(s, 0, 0);
+        return Fmt.fmt(s, 0, 0);
     }
 
     public static String fmt(short s, int minWidth) {
-        return fmt(s, minWidth, 0);
+        return Fmt.fmt(s, minWidth, 0);
     }
 
     public static String fmt(short s, int minWidth, int flags) {
-        boolean hexadecimal = ((flags & HX) != 0);
-        boolean octal = ((flags & OC) != 0);
+        boolean hexadecimal = ((flags & Fmt.HX) != 0);
+        boolean octal = ((flags & Fmt.OC) != 0);
 
         if (hexadecimal)
-            return fmt(
-                    Integer.toString(s & 0xffff, 16), minWidth, flags | WN);
+            return Fmt.fmt(
+                    Integer.toString(s & 0xffff, 16), minWidth, flags | Fmt.WN);
         else if (octal)
-            return fmt(
-                    Integer.toString(s & 0xffff, 8), minWidth, flags | WN);
+            return Fmt.fmt(
+                    Integer.toString(s & 0xffff, 8), minWidth, flags | Fmt.WN);
         else
-            return fmt(Integer.toString(s), minWidth, flags | WN);
+            return Fmt.fmt(Integer.toString(s), minWidth, flags | Fmt.WN);
     }
 
     // int
     public static String fmt(int i) {
-        return fmt(i, 0, 0);
+        return Fmt.fmt(i, 0, 0);
     }
 
     public static String fmt(int i, int minWidth) {
-        return fmt(i, minWidth, 0);
+        return Fmt.fmt(i, minWidth, 0);
     }
 
     public static String fmt(int i, int minWidth, int flags) {
-        boolean hexadecimal = ((flags & HX) != 0);
-        boolean octal = ((flags & OC) != 0);
+        boolean hexadecimal = ((flags & Fmt.HX) != 0);
+        boolean octal = ((flags & Fmt.OC) != 0);
 
         if (hexadecimal)
-            return fmt(
-                    Long.toString(i & 0xffffffffL, 16), minWidth, flags | WN);
+            return Fmt.fmt(
+                    Long.toString(i & 0xffffffffL, 16), minWidth, flags | Fmt.WN);
         else if (octal)
-            return fmt(
-                    Long.toString(i & 0xffffffffL, 8), minWidth, flags | WN);
+            return Fmt.fmt(
+                    Long.toString(i & 0xffffffffL, 8), minWidth, flags | Fmt.WN);
         else
-            return fmt(Integer.toString(i), minWidth, flags | WN);
+            return Fmt.fmt(Integer.toString(i), minWidth, flags | Fmt.WN);
     }
 
     // long
     public static String fmt(long l) {
-        return fmt(l, 0, 0);
+        return Fmt.fmt(l, 0, 0);
     }
 
     public static String fmt(long l, int minWidth) {
-        return fmt(l, minWidth, 0);
+        return Fmt.fmt(l, minWidth, 0);
     }
 
     public static String fmt(long l, int minWidth, int flags) {
-        boolean hexadecimal = ((flags & HX) != 0);
-        boolean octal = ((flags & OC) != 0);
+        boolean hexadecimal = ((flags & Fmt.HX) != 0);
+        boolean octal = ((flags & Fmt.OC) != 0);
 
         if (hexadecimal) {
             if ((l & 0xf000000000000000L) != 0)
-                return fmt(
+                return Fmt.fmt(
                         Long.toString(l >>> 60, 16) +
-                        fmt(l & 0x0fffffffffffffffL, 15, HX | ZF),
-                        minWidth, flags | WN);
+                        Fmt.fmt(l & 0x0fffffffffffffffL, 15, Fmt.HX | Fmt.ZF),
+                        minWidth, flags | Fmt.WN);
             else
-                return fmt(Long.toString(l, 16), minWidth, flags | WN);
+                return Fmt.fmt(Long.toString(l, 16), minWidth, flags | Fmt.WN);
         } else if (octal) {
             if ((l & 0x8000000000000000L) != 0)
-                return fmt(
+                return Fmt.fmt(
                         Long.toString(l >>> 63, 8) +
-                        fmt(l & 0x7fffffffffffffffL, 21, OC | ZF),
-                        minWidth, flags | WN);
+                        Fmt.fmt(l & 0x7fffffffffffffffL, 21, Fmt.OC | Fmt.ZF),
+                        minWidth, flags | Fmt.WN);
             else
-                return fmt(Long.toString(l, 8), minWidth, flags | WN);
+                return Fmt.fmt(Long.toString(l, 8), minWidth, flags | Fmt.WN);
         } else
-            return fmt(Long.toString(l), minWidth, flags | WN);
+            return Fmt.fmt(Long.toString(l), minWidth, flags | Fmt.WN);
     }
 
     // float
     public static String fmt(float f) {
-        return fmt(f, 0, 0, 0);
+        return Fmt.fmt(f, 0, 0, 0);
     }
 
     public static String fmt(float f, int minWidth) {
-        return fmt(f, minWidth, 0, 0);
+        return Fmt.fmt(f, minWidth, 0, 0);
     }
 
     public static String fmt(float f, int minWidth, int sigFigs) {
-        return fmt(f, minWidth, sigFigs, 0);
+        return Fmt.fmt(f, minWidth, sigFigs, 0);
     }
 
     public static String fmt(float f, int minWidth, int sigFigs, int flags) {
         if (sigFigs != 0)
-            return fmt(
-                    sigFigFix(Float.toString(f), sigFigs), minWidth,
-                    flags | WN);
+            return Fmt.fmt(
+                    Fmt.sigFigFix(Float.toString(f), sigFigs), minWidth,
+                    flags | Fmt.WN);
         else
-            return fmt(Float.toString(f), minWidth, flags | WN);
+            return Fmt.fmt(Float.toString(f), minWidth, flags | Fmt.WN);
     }
 
     // double
     public static String fmt(double d) {
-        return fmt(d, 0, 0, 0);
+        return Fmt.fmt(d, 0, 0, 0);
     }
 
     public static String fmt(double d, int minWidth) {
-        return fmt(d, minWidth, 0, 0);
+        return Fmt.fmt(d, minWidth, 0, 0);
     }
 
     public static String fmt(double d, int minWidth, int sigFigs) {
-        return fmt(d, minWidth, sigFigs, 0);
+        return Fmt.fmt(d, minWidth, sigFigs, 0);
     }
 
     public static String fmt(double d, int minWidth, int sigFigs, int flags) {
         if (sigFigs != 0)
-            return fmt(
-                    sigFigFix(doubleToString(d), sigFigs), minWidth,
-                    flags | WN);
+            return Fmt.fmt(
+                    Fmt.sigFigFix(Fmt.doubleToString(d), sigFigs), minWidth,
+                    flags | Fmt.WN);
         else
-            return fmt(doubleToString(d), minWidth, flags | WN);
+            return Fmt.fmt(Fmt.doubleToString(d), minWidth, flags | Fmt.WN);
     }
 
     // char
     public static String fmt(char c) {
-        return fmt(c, 0, 0);
+        return Fmt.fmt(c, 0, 0);
     }
 
     public static String fmt(char c, int minWidth) {
-        return fmt(c, minWidth, 0);
+        return Fmt.fmt(c, minWidth, 0);
     }
 
     public static String fmt(char c, int minWidth, int flags) {
         // return fmt( Character.toString( c ), minWidth, flags );
         // Character currently lacks a static toString method.  Workaround
         // is to make a temporary instance and use the instance toString.
-        return fmt(Character.valueOf(c).toString(), minWidth, flags);
+        return Fmt.fmt(Character.valueOf(c).toString(), minWidth, flags);
     }
 
     // Object
     public static String fmt(Object o) {
-        return fmt(o, 0, 0);
+        return Fmt.fmt(o, 0, 0);
     }
 
     public static String fmt(Object o, int minWidth) {
-        return fmt(o, minWidth, 0);
+        return Fmt.fmt(o, minWidth, 0);
     }
 
     public static String fmt(Object o, int minWidth, int flags) {
-        return fmt(o.toString(), minWidth, flags);
+        return Fmt.fmt(o.toString(), minWidth, flags);
     }
 
     // String
     public static String fmt(String s) {
-        return fmt(s, 0, 0);
+        return Fmt.fmt(s, 0, 0);
     }
 
     public static String fmt(String s, int minWidth) {
-        return fmt(s, minWidth, 0);
+        return Fmt.fmt(s, minWidth, 0);
     }
 
     public static String fmt(String s, int minWidth, int flags) {
         int len = s.length();
-        boolean zeroFill = ((flags & ZF) != 0);
-        boolean leftJustify = ((flags & LJ) != 0);
-        boolean hexadecimal = ((flags & HX) != 0);
-        boolean octal = ((flags & OC) != 0);
-        boolean wasNumber = ((flags & WN) != 0);
+        boolean zeroFill = ((flags & Fmt.ZF) != 0);
+        boolean leftJustify = ((flags & Fmt.LJ) != 0);
+        boolean hexadecimal = ((flags & Fmt.HX) != 0);
+        boolean octal = ((flags & Fmt.OC) != 0);
+        boolean wasNumber = ((flags & Fmt.WN) != 0);
 
         if ((hexadecimal || octal || zeroFill) && !wasNumber)
             throw new InternalError("Acme.Fmt: number flag on a non-number");
diff --git a/pki/base/util/src/com/netscape/cmsutil/util/HMACDigest.java b/pki/base/util/src/com/netscape/cmsutil/util/HMACDigest.java
index c1ab2003d652a606dc1be869fb8fa7da6d3fbf60..301758c9f7092e17b75e375a7eef7dee52dde8ab 100644
--- a/pki/base/util/src/com/netscape/cmsutil/util/HMACDigest.java
+++ b/pki/base/util/src/com/netscape/cmsutil/util/HMACDigest.java
@@ -19,7 +19,6 @@ package com.netscape.cmsutil.util;
 
 
 import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
 
 
 /**
@@ -38,12 +37,12 @@ public class HMACDigest implements Cloneable {
     /**
      * inner padding - key XORd with ipad
      */
-    private byte[] mKeyIpad = new byte[PAD_BYTES];
+    private byte[] mKeyIpad = new byte[HMACDigest.PAD_BYTES];
 
     /**
      * outer padding - key XORd with opad
      */
-    private byte[] mKeyOpad = new byte[PAD_BYTES];
+    private byte[] mKeyOpad = new byte[HMACDigest.PAD_BYTES];
 
     /**
      * The real MessageDigest
@@ -108,15 +107,15 @@ public class HMACDigest implements Cloneable {
         }
 
         // Copy the key.  Truncate if key is too long
-        for (i = 0; i < key.length && i < PAD_BYTES; i++) {
+        for (i = 0; i < key.length && i < HMACDigest.PAD_BYTES; i++) {
             mKeyIpad[i] = key[i];
             mKeyOpad[i] = key[i];
         }
 
         // XOR in the pads
-        for (i = 0; i < PAD_BYTES; i++) {
-            mKeyIpad[i] ^= IPAD;
-            mKeyOpad[i] ^= OPAD;
+        for (i = 0; i < HMACDigest.PAD_BYTES; i++) {
+            mKeyIpad[i] ^= HMACDigest.IPAD;
+            mKeyOpad[i] ^= HMACDigest.OPAD;
         }
 
         mMD.update(mKeyIpad);
@@ -124,7 +123,7 @@ public class HMACDigest implements Cloneable {
         // Hmmm, we really shouldn't key Opad around in memory for so
         // long, but it would just force the user to key their key around
         // until digest() time. Oh well, at least clear the key and Ipad
-        for (i = 0; i < PAD_BYTES; i++) {
+        for (i = 0; i < HMACDigest.PAD_BYTES; i++) {
             mKeyIpad[i] = 0;
         }
         for (i = 0; i < key.length; i++) {
@@ -168,7 +167,7 @@ public class HMACDigest implements Cloneable {
         mMD.reset();
 
         // Clear out the pads
-        for (i = 0; i < PAD_BYTES; i++) {
+        for (i = 0; i < HMACDigest.PAD_BYTES; i++) {
             mKeyIpad[i] = 0;
             mKeyOpad[i] = 0;
         }
@@ -187,10 +186,10 @@ public class HMACDigest implements Cloneable {
 
         HMACDigest hd = (HMACDigest) super.clone();	
 
-        hd.mKeyOpad = new byte[PAD_BYTES];
-        hd.mKeyIpad = new byte[PAD_BYTES];
+        hd.mKeyOpad = new byte[HMACDigest.PAD_BYTES];
+        hd.mKeyIpad = new byte[HMACDigest.PAD_BYTES];
 
-        for (i = 0; i < PAD_BYTES; i++) {
+        for (i = 0; i < HMACDigest.PAD_BYTES; i++) {
             hd.mKeyOpad[i] = mKeyOpad[i];
             hd.mKeyIpad[i] = mKeyIpad[i];
         }
diff --git a/pki/base/util/src/com/netscape/cmsutil/util/Utils.java b/pki/base/util/src/com/netscape/cmsutil/util/Utils.java
index 9d0fb05ac2baa7fc1cd7dca3f57ebec013d90d3b..4ce0c0c440e167f0773b3d0868969bfdf2a5e777 100644
--- a/pki/base/util/src/com/netscape/cmsutil/util/Utils.java
+++ b/pki/base/util/src/com/netscape/cmsutil/util/Utils.java
@@ -18,10 +18,22 @@
 package com.netscape.cmsutil.util;
 
 
-import java.net.*;
-import java.io.*;
-import java.util.*;
-import java.text.*;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Vector;
 
 public class Utils {
 	/**
@@ -34,7 +46,7 @@ public class Utils {
 	public static boolean exec(String cmd) {
 		try {
 			String cmds[] = null;
-			if (isNT()) {
+			if (Utils.isNT()) {
 				// NT
 				cmds = new String[3];
 				cmds[0] = "cmd";
@@ -49,9 +61,6 @@ public class Utils {
 			}
 			Process process = Runtime.getRuntime().exec(cmds);
 			process.waitFor();
-			BufferedReader pOut = null;
-			String l = null;
-
 			if (process.exitValue() == 0) {
 				/**
 				pOut = new BufferedReader(
@@ -83,7 +92,7 @@ public class Utils {
         ByteArrayOutputStream out = new ByteArrayOutputStream(s.length());
         
         for (int i = 0; i < s.length(); i++) {
-            int c = (int) s.charAt(i);
+            int c = s.charAt(i);
 
             if (c == '+') {
                 out.write(' ');
@@ -105,7 +114,7 @@ public class Utils {
         ByteArrayOutputStream out = new ByteArrayOutputStream(s.length());
         
         for (int i = 0; i < s.length(); i++) {
-            int c = (int) s.charAt(i);
+            int c = s.charAt(i);
 
             if (c == '+') {
                 out.write(' ');
@@ -134,7 +143,7 @@ public class Utils {
      }
 
     public static void checkHost(String hostname) throws UnknownHostException {
-        InetAddress addr = InetAddress.getByName(hostname);
+        InetAddress.getByName(hostname);
     }
 
     public static void copy(String orig, String dest) {
diff --git a/pki/base/util/src/com/netscape/cmsutil/xml/XMLObject.java b/pki/base/util/src/com/netscape/cmsutil/xml/XMLObject.java
index e140c309883100da3073da4410bc4b99630df259..e7fd04e265eaf5d8c919ab6e76c6fc9742775137 100644
--- a/pki/base/util/src/com/netscape/cmsutil/xml/XMLObject.java
+++ b/pki/base/util/src/com/netscape/cmsutil/xml/XMLObject.java
@@ -16,16 +16,32 @@
 // All rights reserved.
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmsutil.xml;
-import org.w3c.dom.*;
-import org.xml.sax.*;
-import org.apache.xerces.parsers.DOMParser;
-import org.apache.xerces.dom.*;
-import javax.xml.parsers.*;
-import javax.xml.transform.*;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.StringWriter;
+import java.util.Vector;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
-import java.io.*;
-import java.util.*;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.Text;
+import org.xml.sax.SAXException;
 
 public class XMLObject
 {
@@ -61,7 +77,7 @@ public class XMLObject
     public Node createRoot(String name) {
         Element root = mDoc.createElement(name);
         mDoc.appendChild(root);
-        return (Node)root;
+        return root;
     }
 
     public Node getRoot() {
@@ -82,7 +98,7 @@ public class XMLObject
     public Node createContainer(Node containerParent, String containerName) {
         Element node = mDoc.createElement(containerName);
         containerParent.appendChild(node);
-        return (Node)node;
+        return node;
     }
 
     public void addItemToContainer(Node container, String tagname, String value) {
-- 
1.7.6.4

