>From 0cd158454d5dc2f9998b3ea6ff20083b8ff51c60 Mon Sep 17 00:00:00 2001
From: Abhishek Koneru <akoneru@redhat.com>
Date: Thu, 5 Jul 2012 10:22:37 -0400
Subject: [PATCH] SE_BAD_FIELD, MIGHT_IGNORE , STATIC_INNER_CLASS

---
 .../src/com/netscape/certsrv/request/IRequest.java |    3 +-
 .../com/netscape/certsrv/request/RequestId.java    |    3 +-
 .../netscape/certsrv/request/RequestStatus.java    |    8 +-
 .../src/com/netscape/certsrv/usrgrp/IUsrGrp.java   |    4 +-
 .../cmscore/dbs/CertificateRepository.java         |    2 +-
 .../netscape/cmscore/ldap/PublisherProcessor.java  |    3 +-
 .../cmscore/ldapconn/LdapJssSSLSocketFactory.java  |    2 +-
 .../netscape/cmscore/request/ARequestQueue.java    |   14 ++-
 .../com/netscape/cmscore/usrgrp/UGSubsystem.java   |    8 +-
 .../netscape/cmscore/util/ProfileSubsystem.java    |    1 +
 .../certsrv/authentication/AuthTokenTest.java      |    2 +-
 .../netscape/cmscore/dbs/CertRecordListTest.java   |    2 +-
 .../com/netscape/cmscore/dbs/DBRegistryTest.java   |    2 +-
 .../cmscore/request/ExtAttrDynMapperTest.java      |    2 +-
 .../cmscore/request/RequestDefaultStub.java        |    2 +
 .../netscape/cmscore/request/RequestQueueTest.java |    4 +-
 .../cmscore/request/RequestRecordTest.java         |    2 +-
 .../com/netscape/cmscore/request/RequestTest.java  |    2 +-
 .../src/com/netscape/cmstools/HttpClient.java      |    2 +-
 .../src/com/netscape/cmstools/PKCS10Client.java    |  112 ++++++++++----------
 .../com/netscape/pkisilent/common/ParseXML.java    |    1 +
 .../com/netscape/pkisilent/http/HTMLDocument.java  |   11 +-
 .../netscape/cmsutil/http/JssSSLSocketFactory.java |    2 +-
 .../com/netscape/cmsutil/scep/CRSPKIMessage.java   |   32 +++---
 base/util/src/netscape/security/util/BigInt.java   |    4 +-
 .../netscape/security/util/PrettyPrintFormat.java  |    1 +
 .../src/netscape/security/x509/DisplayText.java    |    5 +-
 .../src/netscape/security/x509/GeneralSubtree.java |    7 +-
 .../netscape/security/x509/GeneralSubtrees.java    |    5 +-
 .../security/x509/NSCCommentExtension.java         |    5 +-
 .../security/x509/NameConstraintsExtension.java    |    5 +-
 .../netscape/security/x509/NoticeReference.java    |    4 +-
 .../netscape/security/x509/RevocationReason.java   |    5 +-
 .../src/netscape/security/x509/SerialNumber.java   |    5 +-
 34 files changed, 157 insertions(+), 115 deletions(-)

diff --git a/base/common/src/com/netscape/certsrv/request/IRequest.java b/base/common/src/com/netscape/certsrv/request/IRequest.java
index ded0145ab6762455e2668cc6b87e1f826e16607c..3459af6025345c0f6f35d12e730765a22f93f647 100644
--- a/base/common/src/com/netscape/certsrv/request/IRequest.java
+++ b/base/common/src/com/netscape/certsrv/request/IRequest.java
@@ -19,6 +19,7 @@ package com.netscape.certsrv.request;
 
 //import java.io.Serializable;
 
+import java.io.Serializable;
 import java.math.BigInteger;
 import java.util.Date;
 import java.util.Enumeration;
@@ -40,7 +41,7 @@ import com.netscape.certsrv.base.IAttrSet;
  *
  * @version $Revision$, $Date$
  */
-public interface IRequest {
+public interface IRequest extends Serializable {
 
     public static final String REQ_VERSION = "requestVersion";
 
diff --git a/base/common/src/com/netscape/certsrv/request/RequestId.java b/base/common/src/com/netscape/certsrv/request/RequestId.java
index 8cd8c5711dde2219fec95cf517e2e5658f7980fc..8e67ca481bdcfaf51bb9d75519bda4d491b70b27 100644
--- a/base/common/src/com/netscape/certsrv/request/RequestId.java
+++ b/base/common/src/com/netscape/certsrv/request/RequestId.java
@@ -17,6 +17,7 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.certsrv.request;
 
+import java.io.Serializable;
 import java.math.BigInteger;
 
 /**
@@ -27,7 +28,7 @@ import java.math.BigInteger;
  *
  * @version $Revision$ $Date$
  */
-public class RequestId {
+public class RequestId implements Serializable {
 
     protected BigInteger value;
 
diff --git a/base/common/src/com/netscape/certsrv/request/RequestStatus.java b/base/common/src/com/netscape/certsrv/request/RequestStatus.java
index fd501ef0f5a4a241db9a3347339d49cef043b8e1..ead42b5448b934fd7ba5007cdd9957ac3ff8bce2 100644
--- a/base/common/src/com/netscape/certsrv/request/RequestStatus.java
+++ b/base/common/src/com/netscape/certsrv/request/RequestStatus.java
@@ -17,6 +17,8 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.certsrv.request;
 
+import java.io.Serializable;
+
 /**
  * The RequestStatus class represents the current state of a request
  * in a request queue. The state of the request changes as actions
@@ -33,7 +35,11 @@ package com.netscape.certsrv.request;
  *
  * @version $Revision$ $Date$
  */
-public final class RequestStatus {
+public final class RequestStatus implements Serializable {
+    /**
+     *
+     */
+    private static final long serialVersionUID = -8176052970922133411L;
     public static String BEGIN_STRING = "begin";
     public static String PENDING_STRING = "pending";
     public static String APPROVED_STRING = "approved";
diff --git a/base/common/src/com/netscape/certsrv/usrgrp/IUsrGrp.java b/base/common/src/com/netscape/certsrv/usrgrp/IUsrGrp.java
index d5d37614ed7c8584d10ee42a194bcee8f11b4825..db9c1539fba6f310ae4fe77f8f063c192823ec25 100644
--- a/base/common/src/com/netscape/certsrv/usrgrp/IUsrGrp.java
+++ b/base/common/src/com/netscape/certsrv/usrgrp/IUsrGrp.java
@@ -17,6 +17,8 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.certsrv.usrgrp;
 
+import java.io.Serializable;
+
 import netscape.ldap.LDAPException;
 
 /**
@@ -25,7 +27,7 @@ import netscape.ldap.LDAPException;
  *
  * @version $Revision$, $Date$
  */
-public interface IUsrGrp extends IIdEvaluator {
+public interface IUsrGrp extends IIdEvaluator , Serializable {
 
     /**
      * Retrieves usr/grp manager identifier.
diff --git a/base/common/src/com/netscape/cmscore/dbs/CertificateRepository.java b/base/common/src/com/netscape/cmscore/dbs/CertificateRepository.java
index 14e06aeb3e840750ace1c0b73f4c07980fb223dc..8ef516c0e99c8d6963f6e0a3688716b5952839d1 100644
--- a/base/common/src/com/netscape/cmscore/dbs/CertificateRepository.java
+++ b/base/common/src/com/netscape/cmscore/dbs/CertificateRepository.java
@@ -1042,7 +1042,7 @@ public class CertificateRepository extends Repository
     /**
      * temp solution...
      */
-    public class RenewableCertificateCollection {
+    static public class RenewableCertificateCollection {
         Vector<Object> mToRenew = null;
         Vector<Object> mToNotify = null;
 
diff --git a/base/common/src/com/netscape/cmscore/ldap/PublisherProcessor.java b/base/common/src/com/netscape/cmscore/ldap/PublisherProcessor.java
index ab99b4f0669a933d8a1c60e7b83437270c07bd95..4e2a9c42338679d69f1f411ea7bc78712206782a 100644
--- a/base/common/src/com/netscape/cmscore/ldap/PublisherProcessor.java
+++ b/base/common/src/com/netscape/cmscore/ldap/PublisherProcessor.java
@@ -443,8 +443,9 @@ public class PublisherProcessor implements
                 //mLdapRequestListener.shutdown();
                 mAuthority.removeRequestListener(mLdapRequestListener);
             }
-        } catch (Exception e) {
+        } catch (ELdapException e) {
             // ignore
+            e.printStackTrace();
         }
     }
 
diff --git a/base/common/src/com/netscape/cmscore/ldapconn/LdapJssSSLSocketFactory.java b/base/common/src/com/netscape/cmscore/ldapconn/LdapJssSSLSocketFactory.java
index 38651d0ba170d304957bee6596d5b729933abc39..4d9e602514a064e7a5cd583a2ca76953eb0144de 100644
--- a/base/common/src/com/netscape/cmscore/ldapconn/LdapJssSSLSocketFactory.java
+++ b/base/common/src/com/netscape/cmscore/ldapconn/LdapJssSSLSocketFactory.java
@@ -102,7 +102,7 @@ public class LdapJssSSLSocketFactory implements LDAPSSLSocketFactoryExt {
     public void log(int level, String msg) {
     }
 
-    class ClientHandshakeCB implements SSLHandshakeCompletedListener {
+    static class ClientHandshakeCB implements SSLHandshakeCompletedListener {
         Object sc;
 
         public ClientHandshakeCB(Object sc) {
diff --git a/base/common/src/com/netscape/cmscore/request/ARequestQueue.java b/base/common/src/com/netscape/cmscore/request/ARequestQueue.java
index 0a156b003eac2c1b30cf7a634ffb6fe7a080dd3c..8bb7fb71ba5f0bc75deb496081164ffaff60030e 100644
--- a/base/common/src/com/netscape/cmscore/request/ARequestQueue.java
+++ b/base/common/src/com/netscape/cmscore/request/ARequestQueue.java
@@ -750,8 +750,13 @@ public abstract class ARequestQueue
 // Request - implementation of the IRequest interface.  This
 // version is returned by ARequestQueue (and its derivatives)
 //
-class Request
-        implements IRequest {
+class Request implements IRequest {
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = -1510479502681392568L;
+
     // IRequest.getRequestId
     public RequestId getRequestId() {
         return mRequestId;
@@ -1463,6 +1468,11 @@ class RequestIAttrSetWrapper implements IAttrSet {
 class EnrollmentRequest
         extends Request
         implements IEnrollmentRequest {
+    /**
+     *
+     */
+    private static final long serialVersionUID = 8214498908217267555L;
+
     EnrollmentRequest(RequestId id) {
         super(id);
     }
diff --git a/base/common/src/com/netscape/cmscore/usrgrp/UGSubsystem.java b/base/common/src/com/netscape/cmscore/usrgrp/UGSubsystem.java
index ee53708ec254783dcd6d0aa5e97cba86f845d2e0..25f396f0108c958fa038492915f1ff447f7faad4 100644
--- a/base/common/src/com/netscape/cmscore/usrgrp/UGSubsystem.java
+++ b/base/common/src/com/netscape/cmscore/usrgrp/UGSubsystem.java
@@ -63,6 +63,10 @@ import com.netscape.cmscore.util.Debug;
  */
 public final class UGSubsystem implements IUGSubsystem {
 
+    /**
+     *
+     */
+    private static final long serialVersionUID = 8080165044652629774L;
     public static final String ID = "usrgrp";
     private String mId = ID;
 
@@ -77,11 +81,11 @@ public final class UGSubsystem implements IUGSubsystem {
     protected static final String PROP_BASEDN = "basedn";
 
     protected IConfigStore mConfig = null;
-    protected LdapBoundConnFactory mLdapConnFactory = null;
+    protected transient LdapBoundConnFactory mLdapConnFactory = null;
     protected String mBaseDN = null;
     protected static UGSubsystem mUG = null;
 
-    private ILogger mLogger = null;
+    private transient ILogger mLogger = null;
 
     // singleton enforcement
 
diff --git a/base/common/src/com/netscape/cmscore/util/ProfileSubsystem.java b/base/common/src/com/netscape/cmscore/util/ProfileSubsystem.java
index 40499577e80fe065ebeede5d2925022c4eb670dd..31eb995c51a972775a8888cc47e2cdf261df2951 100644
--- a/base/common/src/com/netscape/cmscore/util/ProfileSubsystem.java
+++ b/base/common/src/com/netscape/cmscore/util/ProfileSubsystem.java
@@ -208,6 +208,7 @@ public class ProfileSubsystem extends Frame implements ISubsystem, Runnable {
                 // update every second
                 Thread.sleep(1000);
             } catch (Exception e) {
+                e.printStackTrace();
             }
         }
     }
diff --git a/base/common/test/com/netscape/certsrv/authentication/AuthTokenTest.java b/base/common/test/com/netscape/certsrv/authentication/AuthTokenTest.java
index 370973f0a9912f70b7736f4b6e284cdbd1bdd569..1a5d999f6e57f003a55c21f871a3111379504a04 100644
--- a/base/common/test/com/netscape/certsrv/authentication/AuthTokenTest.java
+++ b/base/common/test/com/netscape/certsrv/authentication/AuthTokenTest.java
@@ -255,7 +255,7 @@ public class AuthTokenTest extends CMSBaseTestCase {
      * getting a value out. It assumes BtoA is always called first, stores
      * the value passed in, and then returns that value for BtoA.
      */
-    class CMSMemoryStub extends CMSEngineDefaultStub {
+    static class CMSMemoryStub extends CMSEngineDefaultStub {
         boolean bToACalled = false;
         byte[] bToACalledWith = null;
 
diff --git a/base/common/test/com/netscape/cmscore/dbs/CertRecordListTest.java b/base/common/test/com/netscape/cmscore/dbs/CertRecordListTest.java
index d3177f62c3d7002a0e0dac85ce1780d042761440..9c425565487e55ae2d553ce22119c0aae71da258 100644
--- a/base/common/test/com/netscape/cmscore/dbs/CertRecordListTest.java
+++ b/base/common/test/com/netscape/cmscore/dbs/CertRecordListTest.java
@@ -80,7 +80,7 @@ public class CertRecordListTest extends CMSBaseTestCase {
         }
     }
 
-    public class ElementProcessorStub implements IElementProcessor {
+    static class ElementProcessorStub implements IElementProcessor {
         public void process(Object o) throws EBaseException {
         }
     }
diff --git a/base/common/test/com/netscape/cmscore/dbs/DBRegistryTest.java b/base/common/test/com/netscape/cmscore/dbs/DBRegistryTest.java
index c74f66ba1aedaa8992485610a898b07b0153337e..4a52bbcef720e8ed0013c8ebceb28388c7bfe1d2 100644
--- a/base/common/test/com/netscape/cmscore/dbs/DBRegistryTest.java
+++ b/base/common/test/com/netscape/cmscore/dbs/DBRegistryTest.java
@@ -118,7 +118,7 @@ public class DBRegistryTest extends CMSBaseTestCase {
         }
     }
 
-    class DBDynAttrMapperStub extends DBDynAttrMapperDefaultStub {
+    static class DBDynAttrMapperStub extends DBDynAttrMapperDefaultStub {
         boolean mapObjectCalled = false;
         Object mapObjectCalledWithObject = null;
         boolean mapLDAPAttrsCalled = false;
diff --git a/base/common/test/com/netscape/cmscore/request/ExtAttrDynMapperTest.java b/base/common/test/com/netscape/cmscore/request/ExtAttrDynMapperTest.java
index a0ad0a8a3cfe3c92b5502bd5e9a515d959aab215..35f999de737e7737a8d01138d59fe5adcb49cf3c 100644
--- a/base/common/test/com/netscape/cmscore/request/ExtAttrDynMapperTest.java
+++ b/base/common/test/com/netscape/cmscore/request/ExtAttrDynMapperTest.java
@@ -259,7 +259,7 @@ public class ExtAttrDynMapperTest extends CMSBaseTestCase {
 
     }
 
-    class RequestRecordStub extends RequestRecordDefaultStub {
+    static class RequestRecordStub extends RequestRecordDefaultStub {
         private static final long serialVersionUID = 4106967075497999274L;
         Hashtable<String, Object> extAttrData = new Hashtable<String, Object>();
         int setCallCounter = 0;
diff --git a/base/common/test/com/netscape/cmscore/request/RequestDefaultStub.java b/base/common/test/com/netscape/cmscore/request/RequestDefaultStub.java
index fd53c2ea9f0594b33ebe4218316e1e0a093199b5..7a6bde40886733bf64e97ac6d63cccef96b98de8 100644
--- a/base/common/test/com/netscape/cmscore/request/RequestDefaultStub.java
+++ b/base/common/test/com/netscape/cmscore/request/RequestDefaultStub.java
@@ -23,6 +23,8 @@ import com.netscape.certsrv.request.RequestStatus;
  * Default testing stub for the IRequest interface.
  */
 public class RequestDefaultStub implements IRequest {
+    private static final long serialVersionUID = -8466522941927034614L;
+
     public RequestId getRequestId() {
         return null;
     }
diff --git a/base/common/test/com/netscape/cmscore/request/RequestQueueTest.java b/base/common/test/com/netscape/cmscore/request/RequestQueueTest.java
index a66326d0349e965382e24211ba6b77173ada9a79..6a0527572ad59da2fededdfa429532615f43940e 100644
--- a/base/common/test/com/netscape/cmscore/request/RequestQueueTest.java
+++ b/base/common/test/com/netscape/cmscore/request/RequestQueueTest.java
@@ -40,7 +40,9 @@ public class RequestQueueTest extends CMSBaseTestCase {
         assertTrue(request.getExtDataKeysCalled);
     }
 
-    class RequestStub extends RequestDefaultStub {
+    static class RequestStub extends RequestDefaultStub {
+        private static final long serialVersionUID = -9058189963961484835L;
+
         String[] keys = new String[] { "key1", "key2" };
         boolean getExtDataKeysCalled = false;
 
diff --git a/base/common/test/com/netscape/cmscore/request/RequestRecordTest.java b/base/common/test/com/netscape/cmscore/request/RequestRecordTest.java
index 0ebf3beabd1a85cba4250e7c57c583832deb0210..025684853da2f9aa216c8265cd696877eaa7d180 100644
--- a/base/common/test/com/netscape/cmscore/request/RequestRecordTest.java
+++ b/base/common/test/com/netscape/cmscore/request/RequestRecordTest.java
@@ -138,7 +138,7 @@ public class RequestRecordTest extends CMSBaseTestCase {
         }
     }
 
-    class DBRegistryStub extends DBRegistryDefaultStub {
+    static class DBRegistryStub extends DBRegistryDefaultStub {
         boolean registerCalledWithExtAttr = false;
         IDBAttrMapper extAttrMapper = null;
 
diff --git a/base/common/test/com/netscape/cmscore/request/RequestTest.java b/base/common/test/com/netscape/cmscore/request/RequestTest.java
index 1de96a20350680dfb46b8835ac333c68a4c8435f..b3a8c6ee561ea63dc5003cd828bdd0e8ec35e3cc 100644
--- a/base/common/test/com/netscape/cmscore/request/RequestTest.java
+++ b/base/common/test/com/netscape/cmscore/request/RequestTest.java
@@ -667,7 +667,7 @@ public class RequestTest extends CMSBaseTestCase {
 
     }
 
-    class RevokedCertImplStub extends RevokedCertImpl {
+    static class RevokedCertImplStub extends RevokedCertImpl {
         /**
          *
          */
diff --git a/base/java-tools/src/com/netscape/cmstools/HttpClient.java b/base/java-tools/src/com/netscape/cmstools/HttpClient.java
index a3e27c70ed194f01f0dc788f4c20cf32d9f25b87..fe89dd4284acfaeec8553855377316296fe63c8e 100644
--- a/base/java-tools/src/com/netscape/cmstools/HttpClient.java
+++ b/base/java-tools/src/com/netscape/cmstools/HttpClient.java
@@ -415,7 +415,7 @@ public class HttpClient {
         }
     }
 
-    class ClientHandshakeCB implements SSLHandshakeCompletedListener {
+    static class ClientHandshakeCB implements SSLHandshakeCompletedListener {
         Object sc;
 
         public ClientHandshakeCB(Object sc) {
diff --git a/base/java-tools/src/com/netscape/cmstools/PKCS10Client.java b/base/java-tools/src/com/netscape/cmstools/PKCS10Client.java
index 1e60a1c0e79182b5aa93194ef42a9cbf2b2549b3..95acc53cf98ec1c6aac4d89b7cbc79328b2db093 100644
--- a/base/java-tools/src/com/netscape/cmstools/PKCS10Client.java
+++ b/base/java-tools/src/com/netscape/cmstools/PKCS10Client.java
@@ -69,7 +69,7 @@ public class PKCS10Client {
                 "Usage: PKCS10Client -p <certdb password> -d <location of certdb> -o <output file which saves the base64 PKCS10> -s <subjectDN>\n");
     }
 
-    public static void main(String args[]) {
+    public static void main(String args[]) throws Exception {
         String dbdir = null, ofilename = null, password = null, subjectName = null;
 
         if (args.length != 8) {
@@ -99,73 +99,71 @@ public class PKCS10Client {
         if (dbdir == null)
             dbdir = ".";
 
-        try {
-            String mPrefix = "";
-            CryptoManager.InitializationValues vals =
-                    new CryptoManager.InitializationValues(dbdir, mPrefix,
-                            mPrefix, "secmod.db");
+        String mPrefix = "";
+        CryptoManager.InitializationValues vals =
+                new CryptoManager.InitializationValues(dbdir, mPrefix,
+                        mPrefix, "secmod.db");
 
-            CryptoManager.initialize(vals);
-            CryptoManager cm = CryptoManager.getInstance();
-            CryptoToken token = cm.getInternalKeyStorageToken();
-            Password pass = new Password(password.toCharArray());
+        CryptoManager.initialize(vals);
+        CryptoManager cm = CryptoManager.getInstance();
+        CryptoToken token = cm.getInternalKeyStorageToken();
+        Password pass = new Password(password.toCharArray());
 
-            token.login(pass);
-            KeyPairGenerator kg = token.getKeyPairGenerator(KeyPairAlgorithm.RSA);
-            kg.initialize(1024);
-            KeyPair pair = kg.genKeyPair();
+        token.login(pass);
+        KeyPairGenerator kg = token.getKeyPairGenerator(KeyPairAlgorithm.RSA);
+        kg.initialize(1024);
+        KeyPair pair = kg.genKeyPair();
 
-            // Add idPOPLinkWitness control
-            String secretValue = "testing";
-            byte[] key1 = null;
-            byte[] finalDigest = null;
-            MessageDigest SHA1Digest = MessageDigest.getInstance("SHA1");
-            key1 = SHA1Digest.digest(secretValue.getBytes());
+        // Add idPOPLinkWitness control
+        String secretValue = "testing";
+        byte[] key1 = null;
+        byte[] finalDigest = null;
+        MessageDigest SHA1Digest = MessageDigest.getInstance("SHA1");
+        key1 = SHA1Digest.digest(secretValue.getBytes());
 
-            /* seed */
-            byte[] b =
-            { 0x10, 0x53, 0x42, 0x24, 0x1a, 0x2a, 0x35, 0x3c,
-                    0x7a, 0x52, 0x54, 0x56, 0x71, 0x65, 0x66, 0x4c,
-                    0x51, 0x34, 0x35, 0x23, 0x3c, 0x42, 0x43, 0x45,
-                    0x61, 0x4f, 0x6e, 0x43, 0x1e, 0x2a, 0x2b, 0x31,
-                    0x32, 0x34, 0x35, 0x36, 0x55, 0x51, 0x48, 0x14,
-                    0x16, 0x29, 0x41, 0x42, 0x43, 0x7b, 0x63, 0x44,
-                    0x6a, 0x12, 0x6b, 0x3c, 0x4c, 0x3f, 0x00, 0x14,
-                    0x51, 0x61, 0x15, 0x22, 0x23, 0x5f, 0x5e, 0x69 };
+        /* seed */
+        byte[] b =
+        { 0x10, 0x53, 0x42, 0x24, 0x1a, 0x2a, 0x35, 0x3c,
+                0x7a, 0x52, 0x54, 0x56, 0x71, 0x65, 0x66, 0x4c,
+                0x51, 0x34, 0x35, 0x23, 0x3c, 0x42, 0x43, 0x45,
+                0x61, 0x4f, 0x6e, 0x43, 0x1e, 0x2a, 0x2b, 0x31,
+                0x32, 0x34, 0x35, 0x36, 0x55, 0x51, 0x48, 0x14,
+                0x16, 0x29, 0x41, 0x42, 0x43, 0x7b, 0x63, 0x44,
+                0x6a, 0x12, 0x6b, 0x3c, 0x4c, 0x3f, 0x00, 0x14,
+                0x51, 0x61, 0x15, 0x22, 0x23, 0x5f, 0x5e, 0x69 };
 
-            HMACDigest hmacDigest = new HMACDigest(SHA1Digest, key1);
-            hmacDigest.update(b);
-            finalDigest = hmacDigest.digest();
+        HMACDigest hmacDigest = new HMACDigest(SHA1Digest, key1);
+        hmacDigest.update(b);
+        finalDigest = hmacDigest.digest();
 
-            OCTET_STRING ostr = new OCTET_STRING(finalDigest);
-            Attribute attr = new Attribute(OBJECT_IDENTIFIER.id_cmc_idPOPLinkWitness, ostr);
+        OCTET_STRING ostr = new OCTET_STRING(finalDigest);
+        Attribute attr = new Attribute(OBJECT_IDENTIFIER.id_cmc_idPOPLinkWitness, ostr);
 
-            SET attributes = new SET();
-            attributes.addElement(attr);
-            Name n = getJssName(subjectName);
-            SubjectPublicKeyInfo subjectPub = new SubjectPublicKeyInfo(pair.getPublic());
-            CertificationRequestInfo certReqInfo =
-                    new CertificationRequestInfo(new INTEGER(0), n, subjectPub, attributes);
-            CertificationRequest certRequest = new CertificationRequest(certReqInfo,
-                    pair.getPrivate(), SignatureAlgorithm.RSASignatureWithMD5Digest);
+        SET attributes = new SET();
+        attributes.addElement(attr);
+        Name n = getJssName(subjectName);
+        SubjectPublicKeyInfo subjectPub = new SubjectPublicKeyInfo(pair.getPublic());
+        CertificationRequestInfo certReqInfo =
+                new CertificationRequestInfo(new INTEGER(0), n, subjectPub, attributes);
+        CertificationRequest certRequest = new CertificationRequest(certReqInfo,
+                pair.getPrivate(), SignatureAlgorithm.RSASignatureWithMD5Digest);
 
-            ByteArrayOutputStream bos = new ByteArrayOutputStream();
-            certRequest.encode(bos);
-            byte[] bb = bos.toByteArray();
+        ByteArrayOutputStream bos = new ByteArrayOutputStream();
+        certRequest.encode(bos);
+        byte[] bb = bos.toByteArray();
 
-            String b64E = Utils.base64encode(bb);
+        String b64E = Utils.base64encode(bb);
 
-            System.out.println("");
-            System.out.println(b64E);
-            System.out.println("");
+        System.out.println("");
+        System.out.println(b64E);
+        System.out.println("");
+
+        PrintStream ps = null;
+        ps = new PrintStream(new FileOutputStream(ofilename));
+        ps.println(b64E);
+        ps.flush();
+        ps.close();
 
-            PrintStream ps = null;
-            ps = new PrintStream(new FileOutputStream(ofilename));
-            ps.println(b64E);
-            ps.flush();
-            ps.close();
-        } catch (Exception e) {
-        }
     }
 
     static Name getJssName(String dn) {
diff --git a/base/silent/src/com/netscape/pkisilent/common/ParseXML.java b/base/silent/src/com/netscape/pkisilent/common/ParseXML.java
index 3e434498f405e8863ac37328352a05cfa5ff8af7..cee867740b2e4c26737d8a9e11483ffb87f86a13 100644
--- a/base/silent/src/com/netscape/pkisilent/common/ParseXML.java
+++ b/base/silent/src/com/netscape/pkisilent/common/ParseXML.java
@@ -113,6 +113,7 @@ public class ParseXML {
             writer.write(dom, output);
 
         } catch (Exception e) {
+            e.printStackTrace();
         }
     }
 
diff --git a/base/silent/src/com/netscape/pkisilent/http/HTMLDocument.java b/base/silent/src/com/netscape/pkisilent/http/HTMLDocument.java
index 75610c15ba7bfac0ad048db376cbcc1ff2df220f..ac935674c382408a75cf207c39ba604d418dbc67 100644
--- a/base/silent/src/com/netscape/pkisilent/http/HTMLDocument.java
+++ b/base/silent/src/com/netscape/pkisilent/http/HTMLDocument.java
@@ -328,13 +328,10 @@ public class HTMLDocument {
             while (tokenizer.hasMoreTokens()) {
                 token = tokenizer.nextToken();
                 if (token.equalsIgnoreCase("href")) {
-                    try {
-                        Matcher matcher = hrefPattern.matcher(tag);
-                        lastURL = uriToURL(matcher.replaceAll("$1"));
-                        if (lastURL != null) {
-                            lastElementIsLink = true;
-                        }
-                    } catch (Exception e) {
+                    Matcher matcher = hrefPattern.matcher(tag);
+                    lastURL = uriToURL(matcher.replaceAll("$1"));
+                    if (lastURL != null) {
+                        lastElementIsLink = true;
                     }
                     break;
                 }
diff --git a/base/util/src/com/netscape/cmsutil/http/JssSSLSocketFactory.java b/base/util/src/com/netscape/cmsutil/http/JssSSLSocketFactory.java
index aca93b2f0acc9ac900de26db4bc434180331262f..fcf5fc16e719906fde6f6ad656dfd570bc3b2b6e 100644
--- a/base/util/src/com/netscape/cmsutil/http/JssSSLSocketFactory.java
+++ b/base/util/src/com/netscape/cmsutil/http/JssSSLSocketFactory.java
@@ -169,7 +169,7 @@ public class JssSSLSocketFactory implements ISocketFactory {
     public void log(int level, String msg) {
     }
 
-    class ClientHandshakeCB implements SSLHandshakeCompletedListener {
+    static class ClientHandshakeCB implements SSLHandshakeCompletedListener {
         Object sc;
 
         public ClientHandshakeCB(Object sc) {
diff --git a/base/util/src/com/netscape/cmsutil/scep/CRSPKIMessage.java b/base/util/src/com/netscape/cmsutil/scep/CRSPKIMessage.java
index afde8b6c1bec434f20f3e46653fa3366d06d5f54..48fee56fc8f7416baace2637603ae484b9e93010 100644
--- a/base/util/src/com/netscape/cmsutil/scep/CRSPKIMessage.java
+++ b/base/util/src/com/netscape/cmsutil/scep/CRSPKIMessage.java
@@ -255,32 +255,28 @@ public class CRSPKIMessage {
 
     // These functions are used to initialize the various blobs
 
-    public void makeSignedData(int version,
-            byte[] certificate, String hashAlgorithm) {
+    public void makeSignedData(int version, byte[] certificate, String hashAlgorithm) {
 
-        try {
-            SET digest_algs = new SET();
+        SET digest_algs = new SET();
 
-            digest_algs.addElement(new AlgorithmIdentifier(getAlgorithmOID(hashAlgorithm), new NULL()));
+        digest_algs.addElement(new AlgorithmIdentifier(getAlgorithmOID(hashAlgorithm), new NULL()));
 
-            //      SET certs = new SET();
-            //      certs.addElement(new ANY(certificate));
+        //      SET certs = new SET();
+        //      certs.addElement(new ANY(certificate));
 
-            SET sis = new SET();
+        SET sis = new SET();
 
-            sis.addElement(si);
+        sis.addElement(si);
 
-            ContentInfo data = this.data;
+        ContentInfo data = this.data;
 
-            this.sd = new SignedData(
-                        digest_algs,
-                        data,
-                        null, // don't send the certs, he already has them
-                    null, // crl's
-                    sis);
+        this.sd = new SignedData(
+                digest_algs,
+                data,
+                null, // don't send the certs, he already has them
+                null, // crl's
+                sis);
 
-        } catch (Exception e) {
-        }
     }
 
     public byte[] getResponse() throws IOException, InvalidBERException {
diff --git a/base/util/src/netscape/security/util/BigInt.java b/base/util/src/netscape/security/util/BigInt.java
index 1bf00684e968957617e59acd681a84de0e72eef0..62a03cef50f240ec849ca1b5a4f6c676626e0263 100644
--- a/base/util/src/netscape/security/util/BigInt.java
+++ b/base/util/src/netscape/security/util/BigInt.java
@@ -17,6 +17,7 @@
 // --- END COPYRIGHT BLOCK ---
 package netscape.security.util;
 
+import java.io.Serializable;
 import java.math.BigInteger;
 
 /**
@@ -34,8 +35,9 @@ import java.math.BigInteger;
  * @version 1.23
  * @author David Brownell
  */
-public final class BigInt {
+public final class BigInt implements Serializable {
 
+    private static final long serialVersionUID = 705094142021888265L;
     // Big endian -- MSB first.
     private byte[] places;
 
diff --git a/base/util/src/netscape/security/util/PrettyPrintFormat.java b/base/util/src/netscape/security/util/PrettyPrintFormat.java
index 30ae33b107a110be400c7b74572366f90180ccc4..959eb28bfa951cca17d4820e329c20a5663b011d 100644
--- a/base/util/src/netscape/security/util/PrettyPrintFormat.java
+++ b/base/util/src/netscape/security/util/PrettyPrintFormat.java
@@ -17,6 +17,7 @@
 // --- END COPYRIGHT BLOCK ---
 package netscape.security.util;
 
+
 /**
  * This class will display the certificate content in predefined
  * format.
diff --git a/base/util/src/netscape/security/x509/DisplayText.java b/base/util/src/netscape/security/x509/DisplayText.java
index 1c43d494624a159d339bcfbdc1c74640185b784c..f0e712ff45b098ba76c2742138a73fae3de6a143 100644
--- a/base/util/src/netscape/security/x509/DisplayText.java
+++ b/base/util/src/netscape/security/x509/DisplayText.java
@@ -18,6 +18,7 @@
 package netscape.security.x509;
 
 import java.io.IOException;
+import java.io.Serializable;
 
 import netscape.security.util.DerOutputStream;
 import netscape.security.util.DerValue;
@@ -33,7 +34,9 @@ import netscape.security.util.DerValue;
  *
  * @author Thomas Kwan
  */
-public class DisplayText {
+public class DisplayText implements Serializable {
+
+    private static final long serialVersionUID = -6521458152495173328L;
 
     /** Tag value indicating an ASN.1 "BMPString" value. */
     public final static byte tag_IA5String = 0x16;
diff --git a/base/util/src/netscape/security/x509/GeneralSubtree.java b/base/util/src/netscape/security/x509/GeneralSubtree.java
index 6a5cdc5401de85510b7a3faa011b6a58ce761160..8851031c385ae692b3379a59ffd917b8ddf2db92 100644
--- a/base/util/src/netscape/security/x509/GeneralSubtree.java
+++ b/base/util/src/netscape/security/x509/GeneralSubtree.java
@@ -18,6 +18,7 @@
 package netscape.security.x509;
 
 import java.io.IOException;
+import java.io.Serializable;
 
 import netscape.security.util.BigInt;
 import netscape.security.util.DerOutputStream;
@@ -40,7 +41,11 @@ import netscape.security.util.PrettyPrintFormat;
  * @author Amit Kapoor
  * @author Hemma Prafullchandra
  */
-public class GeneralSubtree {
+public class GeneralSubtree implements Serializable {
+    /**
+     *
+     */
+    private static final long serialVersionUID = -2835481424013062770L;
     private static final byte TAG_MIN = 0;
     private static final byte TAG_MAX = 1;
     private static final int MIN_DEFAULT = 0;
diff --git a/base/util/src/netscape/security/x509/GeneralSubtrees.java b/base/util/src/netscape/security/x509/GeneralSubtrees.java
index 66ccdba847e93c3b2131d20821ceaa4aec6cf3b6..9d8c632a353cae2c332d8ccb3c1de74635ed579e 100644
--- a/base/util/src/netscape/security/x509/GeneralSubtrees.java
+++ b/base/util/src/netscape/security/x509/GeneralSubtrees.java
@@ -18,6 +18,7 @@
 package netscape.security.x509;
 
 import java.io.IOException;
+import java.io.Serializable;
 import java.util.Enumeration;
 import java.util.Vector;
 
@@ -33,7 +34,9 @@ import netscape.security.util.PrettyPrintFormat;
  * @author Amit Kapoor
  * @author Hemma Prafullchandra
  */
-public class GeneralSubtrees {
+public class GeneralSubtrees implements Serializable {
+
+    private static final long serialVersionUID = 6308776640697100848L;
     private Vector<GeneralSubtree> trees;
     private PrettyPrintFormat pp = new PrettyPrintFormat(":");
 
diff --git a/base/util/src/netscape/security/x509/NSCCommentExtension.java b/base/util/src/netscape/security/x509/NSCCommentExtension.java
index 8bf1d68824ae8a5d099bb7721527af50d84de30b..6ba4775049ec2f401ccd139864cda27b88977f15 100644
--- a/base/util/src/netscape/security/x509/NSCCommentExtension.java
+++ b/base/util/src/netscape/security/x509/NSCCommentExtension.java
@@ -36,8 +36,7 @@ import netscape.security.util.PrettyPrintFormat;
  * @see Extension
  * @see CertAttrSet
  */
-public class NSCCommentExtension extends Extension
-        implements CertAttrSet {
+public class NSCCommentExtension extends Extension implements CertAttrSet {
 
     /**
      *
@@ -60,7 +59,7 @@ public class NSCCommentExtension extends Extension
     // Private data members
     private Vector<Object> mInfos;
 
-    private PrettyPrintFormat pp = new PrettyPrintFormat(":");
+    private transient PrettyPrintFormat pp = new PrettyPrintFormat(":");
 
     // Encode this extension value
     private void encodeThis() throws IOException {
diff --git a/base/util/src/netscape/security/x509/NameConstraintsExtension.java b/base/util/src/netscape/security/x509/NameConstraintsExtension.java
index 018dd507494fdc16b1e1f4eb2b6319c7c7b44ef9..87309080b4574534b84a117732b4f9513f40c40e 100644
--- a/base/util/src/netscape/security/x509/NameConstraintsExtension.java
+++ b/base/util/src/netscape/security/x509/NameConstraintsExtension.java
@@ -57,8 +57,7 @@ import netscape.security.util.PrettyPrintFormat;
  * @see Extension
  * @see CertAttrSet
  */
-public class NameConstraintsExtension extends Extension
-        implements CertAttrSet {
+public class NameConstraintsExtension extends Extension implements CertAttrSet {
     /**
      *
      */
@@ -82,7 +81,7 @@ public class NameConstraintsExtension extends Extension
     private GeneralSubtrees permitted;
     private GeneralSubtrees excluded;
 
-    private PrettyPrintFormat pp = new PrettyPrintFormat(":");
+    private transient PrettyPrintFormat pp = new PrettyPrintFormat(":");
 
     // Encode this extension value.
     private void encodeThis() throws IOException {
diff --git a/base/util/src/netscape/security/x509/NoticeReference.java b/base/util/src/netscape/security/x509/NoticeReference.java
index d4703b20027476ae545891ffaa99d997fc4e90ed..66701518b555f420032bf14f24324e97f5ec9aad 100644
--- a/base/util/src/netscape/security/x509/NoticeReference.java
+++ b/base/util/src/netscape/security/x509/NoticeReference.java
@@ -18,6 +18,7 @@
 package netscape.security.x509;
 
 import java.io.IOException;
+import java.io.Serializable;
 import java.util.Vector;
 
 import netscape.security.util.BigInt;
@@ -34,8 +35,9 @@ import netscape.security.util.DerValue;
  *
  * @author Thomas Kwan
  */
-public class NoticeReference {
+public class NoticeReference implements Serializable {
 
+    private static final long serialVersionUID = 1986080941078808200L;
     private DisplayText mOrg = null;
     private int mNumbers[] = null;
 
diff --git a/base/util/src/netscape/security/x509/RevocationReason.java b/base/util/src/netscape/security/x509/RevocationReason.java
index cbd7fe73d0cb0f2104fc15ca61a4a85dcab2d3b4..ae68ec5259b9692c8ee082c37e4cd008aa83ee9e 100644
--- a/base/util/src/netscape/security/x509/RevocationReason.java
+++ b/base/util/src/netscape/security/x509/RevocationReason.java
@@ -17,6 +17,8 @@
 // --- END COPYRIGHT BLOCK ---
 package netscape.security.x509;
 
+import java.io.Serializable;
+
 /**
  * Represent the enumerated type used in CRLReason Extension of CRL entry.
  *
@@ -25,7 +27,8 @@ package netscape.security.x509;
  * @version $Revision$, $Date$
  */
 
-public final class RevocationReason {
+public final class RevocationReason implements Serializable {
+    private static final long serialVersionUID = -2582403666913588806L;
     /**
      * Reasons
      */
diff --git a/base/util/src/netscape/security/x509/SerialNumber.java b/base/util/src/netscape/security/x509/SerialNumber.java
index eee2f8169383496bbfb5362b73b86ec7b9ec1449..857547a757ad466ee9787cec37c4c6bd5c752b4b 100644
--- a/base/util/src/netscape/security/x509/SerialNumber.java
+++ b/base/util/src/netscape/security/x509/SerialNumber.java
@@ -19,6 +19,7 @@ package netscape.security.x509;
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.Serializable;
 import java.math.BigInteger;
 
 import netscape.security.util.BigInt;
@@ -33,7 +34,9 @@ import netscape.security.util.DerValue;
  * @author Hemma Prafullchandra
  * @version 1.5
  */
-public class SerialNumber {
+public class SerialNumber implements Serializable {
+
+    private static final long serialVersionUID = 1600956411497203535L;
     private BigInt serialNum;
 
     // Construct the class from the DerValue
-- 
1.7.10.2

