summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Young <ayoung@redhat.com>2011-11-10 22:12:52 -0500
committerAdam Young <ayoung@redhat.com>2011-12-06 11:20:03 -0500
commit6119a0222dee4953d51311489d8863daa62d9b14 (patch)
treedc30408d3be499e1f84c1c49d41bbc109731fb7a
parent3c1a4af339dc1761b3a68abe9b0f26bd3cb389cf (diff)
downloadpki-6119a0222dee4953d51311489d8863daa62d9b14.tar.gz
pki-6119a0222dee4953d51311489d8863daa62d9b14.tar.xz
pki-6119a0222dee4953d51311489d8863daa62d9b14.zip
call statics statically
https://bugzilla.redhat.com/show_bug.cgi?id=728303 Updated with changes from code review Leaving in the warning in GenericASN1Extension, ans that is an indication of a real problem, which will get addressed in a separate patch.
-rw-r--r--pki/base/ca/src/com/netscape/ca/CAService.java10
-rw-r--r--pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java8
-rw-r--r--pki/base/ca/src/com/netscape/ca/CertificateAuthority.java2
-rw-r--r--pki/base/common/src/com/netscape/certsrv/apps/CMS.java4
-rw-r--r--pki/base/common/src/com/netscape/cms/jobs/RenewalNotificationJob.java6
-rw-r--r--pki/base/common/src/com/netscape/cms/logging/LogFile.java10
-rw-r--r--pki/base/common/src/com/netscape/cms/servlet/admin/CAAdminServlet.java50
-rw-r--r--pki/base/common/src/com/netscape/cms/servlet/admin/OCSPAdminServlet.java4
-rw-r--r--pki/base/common/src/com/netscape/cms/servlet/admin/RAAdminServlet.java24
-rw-r--r--pki/base/common/src/com/netscape/cms/servlet/cert/GetEnableStatus.java2
-rw-r--r--pki/base/common/src/com/netscape/cms/servlet/cert/GetInfo.java8
-rw-r--r--pki/base/common/src/com/netscape/cms/servlet/cert/UpdateCRL.java2
-rw-r--r--pki/base/common/src/com/netscape/cms/servlet/cert/scep/CRSEnrollment.java52
-rw-r--r--pki/base/common/src/com/netscape/cms/servlet/key/RecoverBySerial.java2
-rw-r--r--pki/base/common/src/com/netscape/cms/servlet/ocsp/OCSPServlet.java4
-rw-r--r--pki/base/common/src/com/netscape/cms/servlet/profile/ProfileSubmitCMCServlet.java2
-rw-r--r--pki/base/common/src/com/netscape/cms/servlet/profile/ProfileSubmitServlet.java2
-rw-r--r--pki/base/common/src/com/netscape/cmscore/apps/CMSEngine.java2
-rw-r--r--pki/base/common/src/com/netscape/cmscore/apps/CommandQueue.java2
-rw-r--r--pki/base/common/src/com/netscape/cmscore/base/JDialogPasswordCallback.java44
-rw-r--r--pki/base/common/src/com/netscape/cmscore/jobs/JobsScheduler.java10
-rw-r--r--pki/base/common/src/com/netscape/cmscore/ldapconn/LdapJssSSLSocketFactory.java3
-rw-r--r--pki/base/common/src/com/netscape/cmscore/util/ProfileSubsystem.java9
-rw-r--r--pki/base/silent/src/com/netscape/pkisilent/ConfigureCA.java4
-rw-r--r--pki/base/silent/src/com/netscape/pkisilent/ConfigureDRM.java4
-rw-r--r--pki/base/silent/src/com/netscape/pkisilent/ConfigureOCSP.java4
-rw-r--r--pki/base/silent/src/com/netscape/pkisilent/ConfigureRA.java4
-rw-r--r--pki/base/silent/src/com/netscape/pkisilent/ConfigureSubCA.java4
-rw-r--r--pki/base/silent/src/com/netscape/pkisilent/ConfigureTKS.java4
-rw-r--r--pki/base/silent/src/com/netscape/pkisilent/ConfigureTPS.java4
-rw-r--r--pki/base/silent/src/com/netscape/pkisilent/common/CMSTask.java2
-rw-r--r--pki/base/silent/src/com/netscape/pkisilent/http/HTTPClient.java6
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java4
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/http/JssSSLSocketFactory.java3
-rw-r--r--pki/base/util/src/netscape/security/pkcs/PKCS8Key.java12
-rw-r--r--pki/base/util/src/netscape/security/x509/CRLDistributionPoint.java6
-rw-r--r--pki/base/util/src/netscape/security/x509/IssuingDistributionPointExtension.java6
37 files changed, 164 insertions, 165 deletions
diff --git a/pki/base/ca/src/com/netscape/ca/CAService.java b/pki/base/ca/src/com/netscape/ca/CAService.java
index 9297d421c..159539d45 100644
--- a/pki/base/ca/src/com/netscape/ca/CAService.java
+++ b/pki/base/ca/src/com/netscape/ca/CAService.java
@@ -1422,7 +1422,7 @@ class serviceRenewal implements IServant {
if (metaInfo != null) {
String renewed = (String)
- metaInfo.get(certRecord.META_RENEWED_CERT);
+ metaInfo.get(ICertRecord.META_RENEWED_CERT);
if (renewed != null) {
BigInteger serial = new BigInteger(renewed);
@@ -1891,7 +1891,7 @@ class serviceGetCRL implements IServant {
throws EBaseException {
try {
ICRLIssuingPointRecord crlRec =
- (ICRLIssuingPointRecord) mCA.getCRLRepository().readCRLIssuingPointRecord(mCA.PROP_MASTER_CRL);
+ (ICRLIssuingPointRecord) mCA.getCRLRepository().readCRLIssuingPointRecord(ICertificateAuthority.PROP_MASTER_CRL);
X509CRLImpl crl = new X509CRLImpl(crlRec.getCRL());
request.setExtData(IRequest.CRL, crl.getEncoded());
@@ -1900,14 +1900,14 @@ class serviceGetCRL implements IServant {
throw new ECAException(
CMS.getUserMessage("CMS_CA_CRL_ISSUEPT_NOT_FOUND", e.toString()));
} catch (CRLException e) {
- mCA.log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_CA_GETCRL_INST_CRL", mCA.PROP_MASTER_CRL));
+ mCA.log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_CA_GETCRL_INST_CRL", ICertificateAuthority.PROP_MASTER_CRL));
throw new ECAException(
- CMS.getUserMessage("CMS_CA_CRL_ISSUEPT_NOGOOD", mCA.PROP_MASTER_CRL));
+ CMS.getUserMessage("CMS_CA_CRL_ISSUEPT_NOGOOD", ICertificateAuthority.PROP_MASTER_CRL));
} catch (X509ExtensionException e) {
mCA.log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_CA_GETCRL_NO_ISSUING_REC"));
throw new ECAException(
CMS.getUserMessage("CMS_CA_CRL_ISSUEPT_EXT_NOGOOD",
- mCA.PROP_MASTER_CRL));
+ ICertificateAuthority.PROP_MASTER_CRL));
}
return true;
}
diff --git a/pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java b/pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java
index f02d0905b..e939d03e6 100644
--- a/pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java
+++ b/pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java
@@ -449,8 +449,8 @@ public class CRLIssuingPoint implements ICRLIssuingPoint, Runnable {
mConfigStore = config;
- IConfigStore crlSubStore = mCA.getConfigStore().getSubStore(mCA.PROP_CRL_SUBSTORE);
- mPageSize = crlSubStore.getInteger(mCA.PROP_CRL_PAGE_SIZE, CRL_PAGE_SIZE);
+ IConfigStore crlSubStore = mCA.getConfigStore().getSubStore(ICertificateAuthority.PROP_CRL_SUBSTORE);
+ mPageSize = crlSubStore.getInteger(ICertificateAuthority.PROP_CRL_PAGE_SIZE, CRL_PAGE_SIZE);
CMS.debug("CRL Page Size: "+ mPageSize);
mCountMod = config.getInteger("countMod",0);
@@ -1154,10 +1154,10 @@ public class CRLIssuingPoint implements ICRLIssuingPoint, Runnable {
if(onlyContainsCACerts != mCACertsOnly) {
IConfigStore config = mCA.getConfigStore();
IConfigStore crlsSubStore =
- config.getSubStore(mCA.PROP_CRL_SUBSTORE);
+ config.getSubStore(ICertificateAuthority.PROP_CRL_SUBSTORE);
IConfigStore crlSubStore = crlsSubStore.getSubStore(mId);
IConfigStore crlExtsSubStore =
- crlSubStore.getSubStore(mCA.PROP_CRLEXT_SUBSTORE);
+ crlSubStore.getSubStore(ICertificateAuthority.PROP_CRLEXT_SUBSTORE);
crlExtsSubStore = crlExtsSubStore.getSubStore(IssuingDistributionPointExtension.NAME);
if(crlExtsSubStore != null) {
diff --git a/pki/base/ca/src/com/netscape/ca/CertificateAuthority.java b/pki/base/ca/src/com/netscape/ca/CertificateAuthority.java
index d8130b022..5353b019e 100644
--- a/pki/base/ca/src/com/netscape/ca/CertificateAuthority.java
+++ b/pki/base/ca/src/com/netscape/ca/CertificateAuthority.java
@@ -491,7 +491,7 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
* check if the ca is a clone.
*/
public boolean isClone() {
- if (mService.mCLAConnector != null)
+ if (CAService.mCLAConnector != null)
return true;
else
return false;
diff --git a/pki/base/common/src/com/netscape/certsrv/apps/CMS.java b/pki/base/common/src/com/netscape/certsrv/apps/CMS.java
index 8136c0b39..137a609f1 100644
--- a/pki/base/common/src/com/netscape/certsrv/apps/CMS.java
+++ b/pki/base/common/src/com/netscape/certsrv/apps/CMS.java
@@ -1563,8 +1563,8 @@ public final class CMS {
cms = new CMS(engine);
IConfigStore mainConfig = createFileConfigStore(path);
- cms.init(null, mainConfig);
- cms.startup();
+ CMS.init(null, mainConfig);
+ CMS.startup();
} catch (EBaseException e) { // catch everything here purposely
CMS.debug("CMS:Caught EBaseException");
diff --git a/pki/base/common/src/com/netscape/cms/jobs/RenewalNotificationJob.java b/pki/base/common/src/com/netscape/cms/jobs/RenewalNotificationJob.java
index 59116bd91..70be18a61 100644
--- a/pki/base/common/src/com/netscape/cms/jobs/RenewalNotificationJob.java
+++ b/pki/base/common/src/com/netscape/cms/jobs/RenewalNotificationJob.java
@@ -652,7 +652,7 @@ class CertRecProcessor implements IElementProcessor {
numFailCounted = true;
if (mJob.mSummary == true)
mJob.buildItemParams(IEmailFormProcessor.TOKEN_STATUS,
- mJob.STATUS_FAILURE);
+ AJobBase.STATUS_FAILURE);
mJob.log(ILogger.LL_FAILURE,
CMS.getLogMessage("JOBS_GET_CERT_ERROR",
cr.getCertificate().getSerialNumber().toString(16)));
@@ -693,13 +693,13 @@ class CertRecProcessor implements IElementProcessor {
cr);
mJob.buildItemParams(IEmailFormProcessor.TOKEN_STATUS,
- mJob.STATUS_SUCCESS);
+ AJobBase.STATUS_SUCCESS);
mIC.mNumSuccessful++;
} catch (Exception e) {
CMS.debug("RenewalNotificationJob Exception: "+e.toString());
- mJob.buildItemParams(IEmailFormProcessor.TOKEN_STATUS, mJob.STATUS_FAILURE);
+ mJob.buildItemParams(IEmailFormProcessor.TOKEN_STATUS, AJobBase.STATUS_FAILURE);
mJob.log(ILogger.LL_FAILURE, e.toString(), ILogger.L_MULTILINE);
if (numFailCounted == false) {
mIC.mNumFail++;
diff --git a/pki/base/common/src/com/netscape/cms/logging/LogFile.java b/pki/base/common/src/com/netscape/cms/logging/LogFile.java
index b3adeb991..284ff02d7 100644
--- a/pki/base/common/src/com/netscape/cms/logging/LogFile.java
+++ b/pki/base/common/src/com/netscape/cms/logging/LogFile.java
@@ -673,8 +673,7 @@ public class LogFile implements ILogEventListener, IExtendedPluginInfo {
* Retrieves the log on/off.
*/
public String getOn() {
- String logStatus = null;
- return logStatus.valueOf( mOn );
+ return String.valueOf( mOn );
}
/**
@@ -1399,7 +1398,6 @@ public class LogFile implements ILogEventListener, IExtendedPluginInfo {
Vector v = new Vector();
try {
- String logStatus = null;
if (mType == null) {
v.addElement(PROP_TYPE + "=");
@@ -1407,7 +1405,7 @@ public class LogFile implements ILogEventListener, IExtendedPluginInfo {
v.addElement(PROP_TYPE + "=" +
mConfig.getString(PROP_TYPE));
}
- v.addElement(PROP_ON + "=" + logStatus.valueOf( mOn ) );
+ v.addElement(PROP_ON + "=" + String.valueOf( mOn ) );
if (mLevel == 0)
v.addElement(PROP_LEVEL + "=" + ILogger.LL_DEBUG_STRING);
else if (mLevel == 1)
@@ -1433,10 +1431,8 @@ public class LogFile implements ILogEventListener, IExtendedPluginInfo {
v.addElement(PROP_FLUSH_INTERVAL + "=" + mFlushInterval / 1000);
if( (mType != null) && mType.equals( ILogger.PROP_SIGNED_AUDIT ) ) {
- String logSigning = null;
-
v.addElement( PROP_SIGNED_AUDIT_LOG_SIGNING + "="
- + logSigning.valueOf( mLogSigning ) );
+ + String.valueOf( mLogSigning ) );
if( mSAuditCertNickName == null ) {
v.addElement( PROP_SIGNED_AUDIT_CERT_NICKNAME + "=" );
diff --git a/pki/base/common/src/com/netscape/cms/servlet/admin/CAAdminServlet.java b/pki/base/common/src/com/netscape/cms/servlet/admin/CAAdminServlet.java
index eea0b29df..1cd3240fb 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/admin/CAAdminServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/admin/CAAdminServlet.java
@@ -259,8 +259,8 @@ public class CAAdminServlet extends AdminServlet {
IConfigStore config = mCA.getConfigStore();
IConfigStore nc =
- config.getSubStore(mCA.PROP_NOTIFY_SUBSTORE);
- IConfigStore rc = nc.getSubStore(mCA.PROP_CERT_REVOKED_SUBSTORE);
+ config.getSubStore(ICertificateAuthority.PROP_NOTIFY_SUBSTORE);
+ IConfigStore rc = nc.getSubStore(ICertificateAuthority.PROP_CERT_REVOKED_SUBSTORE);
getNotificationCompConfig(req, resp, rc);
}
@@ -271,8 +271,8 @@ public class CAAdminServlet extends AdminServlet {
IConfigStore config = mCA.getConfigStore();
IConfigStore nc =
- config.getSubStore(mCA.PROP_NOTIFY_SUBSTORE);
- IConfigStore rc = nc.getSubStore(mCA.PROP_CERT_ISSUED_SUBSTORE);
+ config.getSubStore(ICertificateAuthority.PROP_NOTIFY_SUBSTORE);
+ IConfigStore rc = nc.getSubStore(ICertificateAuthority.PROP_CERT_ISSUED_SUBSTORE);
getNotificationCompConfig(req, resp, rc);
}
@@ -288,9 +288,9 @@ public class CAAdminServlet extends AdminServlet {
IConfigStore config = mCA.getConfigStore();
IConfigStore nc =
- config.getSubStore(mCA.PROP_NOTIFY_SUBSTORE);
+ config.getSubStore(ICertificateAuthority.PROP_NOTIFY_SUBSTORE);
- IConfigStore riq = nc.getSubStore(mCA.PROP_REQ_IN_Q_SUBSTORE);
+ IConfigStore riq = nc.getSubStore(ICertificateAuthority.PROP_REQ_IN_Q_SUBSTORE);
Enumeration e = req.getParameterNames();
@@ -321,9 +321,9 @@ public class CAAdminServlet extends AdminServlet {
IOException, EBaseException {
IConfigStore config = mCA.getConfigStore();
IConfigStore nc =
- config.getSubStore(mCA.PROP_NOTIFY_SUBSTORE);
+ config.getSubStore(ICertificateAuthority.PROP_NOTIFY_SUBSTORE);
- IConfigStore riq = nc.getSubStore(mCA.PROP_REQ_IN_Q_SUBSTORE);
+ IConfigStore riq = nc.getSubStore(ICertificateAuthority.PROP_REQ_IN_Q_SUBSTORE);
//set rest of the parameters
Enumeration e = req.getParameterNames();
@@ -433,9 +433,9 @@ public class CAAdminServlet extends AdminServlet {
IOException, EBaseException {
IConfigStore config = mCA.getConfigStore();
IConfigStore nc =
- config.getSubStore(mCA.PROP_NOTIFY_SUBSTORE);
+ config.getSubStore(ICertificateAuthority.PROP_NOTIFY_SUBSTORE);
- IConfigStore rc = nc.getSubStore(mCA.PROP_CERT_REVOKED_SUBSTORE);
+ IConfigStore rc = nc.getSubStore(ICertificateAuthority.PROP_CERT_REVOKED_SUBSTORE);
setNotificationCompConfig(req, resp, rc, mCA.getCertRevokedListener());
}
@@ -445,9 +445,9 @@ public class CAAdminServlet extends AdminServlet {
IOException, EBaseException {
IConfigStore config = mCA.getConfigStore();
IConfigStore nc =
- config.getSubStore(mCA.PROP_NOTIFY_SUBSTORE);
+ config.getSubStore(ICertificateAuthority.PROP_NOTIFY_SUBSTORE);
- IConfigStore rc = nc.getSubStore(mCA.PROP_CERT_ISSUED_SUBSTORE);
+ IConfigStore rc = nc.getSubStore(ICertificateAuthority.PROP_CERT_ISSUED_SUBSTORE);
setNotificationCompConfig(req, resp, rc, mCA.getCertIssuedListener());
@@ -586,7 +586,7 @@ public class CAAdminServlet extends AdminServlet {
}
IConfigStore crlSubStore =
- mCA.getConfigStore().getSubStore(mCA.PROP_CRL_SUBSTORE);
+ mCA.getConfigStore().getSubStore(ICertificateAuthority.PROP_CRL_SUBSTORE);
Enumeration crlNames = crlSubStore.getSubStoreNames();
while (crlNames.hasMoreElements()) {
@@ -741,7 +741,7 @@ public class CAAdminServlet extends AdminServlet {
}
IConfigStore crlSubStore =
- mCA.getConfigStore().getSubStore(mCA.PROP_CRL_SUBSTORE);
+ mCA.getConfigStore().getSubStore(ICertificateAuthority.PROP_CRL_SUBSTORE);
boolean done = false;
Enumeration crlNames = crlSubStore.getSubStoreNames();
@@ -859,7 +859,7 @@ public class CAAdminServlet extends AdminServlet {
if (id != null && id.length() > 0) {
IConfigStore crlSubStore =
- mCA.getConfigStore().getSubStore(mCA.PROP_CRL_SUBSTORE);
+ mCA.getConfigStore().getSubStore(ICertificateAuthority.PROP_CRL_SUBSTORE);
boolean done = false;
Enumeration crlNames = crlSubStore.getSubStoreNames();
@@ -1007,10 +1007,10 @@ public class CAAdminServlet extends AdminServlet {
IConfigStore config = mCA.getConfigStore();
IConfigStore crlsSubStore =
- config.getSubStore(mCA.PROP_CRL_SUBSTORE);
+ config.getSubStore(ICertificateAuthority.PROP_CRL_SUBSTORE);
IConfigStore crlSubStore = crlsSubStore.getSubStore(ipId);
IConfigStore crlExtsSubStore =
- crlSubStore.getSubStore(mCA.PROP_CRLEXT_SUBSTORE);
+ crlSubStore.getSubStore(ICertificateAuthority.PROP_CRLEXT_SUBSTORE);
String id = req.getParameter(Constants.RS_ID);
@@ -1099,13 +1099,13 @@ public class CAAdminServlet extends AdminServlet {
String id = req.getParameter(Constants.PR_ID);
if (id == null || id.length() <= 0) {
- id = mCA.PROP_MASTER_CRL;
+ id = ICertificateAuthority.PROP_MASTER_CRL;
}
IConfigStore config = mCA.getConfigStore();
- IConfigStore crlsSubStore = config.getSubStore(mCA.PROP_CRL_SUBSTORE);
+ IConfigStore crlsSubStore = config.getSubStore(ICertificateAuthority.PROP_CRL_SUBSTORE);
IConfigStore crlSubStore = crlsSubStore.getSubStore(id);
- IConfigStore crlExtsSubStore = crlSubStore.getSubStore(mCA.PROP_CRLEXT_SUBSTORE);
+ IConfigStore crlExtsSubStore = crlSubStore.getSubStore(ICertificateAuthority.PROP_CRLEXT_SUBSTORE);
if (crlExtsSubStore != null) {
Enumeration enumExts = crlExtsSubStore.getSubStoreNames();
@@ -1216,13 +1216,13 @@ public class CAAdminServlet extends AdminServlet {
if (id == null || id.length() <= 0 ||
id.equals(Constants.RS_ID_CONFIG)) {
- id = mCA.PROP_MASTER_CRL;
+ id = ICertificateAuthority.PROP_MASTER_CRL;
}
ICRLIssuingPoint ip = mCA.getCRLIssuingPoint(id);
//Save New Settings to the config file
IConfigStore config = mCA.getConfigStore();
- IConfigStore crlsSubStore = config.getSubStore(mCA.PROP_CRL_SUBSTORE);
+ IConfigStore crlsSubStore = config.getSubStore(ICertificateAuthority.PROP_CRL_SUBSTORE);
IConfigStore crlSubStore = crlsSubStore.getSubStore(id);
//set reset of the parameters
@@ -1310,10 +1310,10 @@ public class CAAdminServlet extends AdminServlet {
if (id == null || id.length() <= 0 ||
id.equals(Constants.RS_ID_CONFIG)) {
- id = mCA.PROP_MASTER_CRL;
+ id = ICertificateAuthority.PROP_MASTER_CRL;
}
IConfigStore crlsSubStore =
- mCA.getConfigStore().getSubStore(mCA.PROP_CRL_SUBSTORE);
+ mCA.getConfigStore().getSubStore(ICertificateAuthority.PROP_CRL_SUBSTORE);
IConfigStore crlSubStore = crlsSubStore.getSubStore(id);
Enumeration e = req.getParameterNames();
@@ -1479,7 +1479,7 @@ public class CAAdminServlet extends AdminServlet {
IConfigStore caConfig = mCA.getConfigStore();
- value = caConfig.getString(mCA.PROP_ENABLE_PAST_CATIME, "false");
+ value = caConfig.getString(ICertificateAuthority.PROP_ENABLE_PAST_CATIME, "false");
params.add(Constants.PR_VALIDITY, value);
getSigningAlgConfig(params);
diff --git a/pki/base/common/src/com/netscape/cms/servlet/admin/OCSPAdminServlet.java b/pki/base/common/src/com/netscape/cms/servlet/admin/OCSPAdminServlet.java
index 78b88fd82..9464f48ff 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/admin/OCSPAdminServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/admin/OCSPAdminServlet.java
@@ -422,8 +422,8 @@ public class OCSPAdminServlet extends AdminServlet {
throws ServletException, IOException, EBaseException {
NameValuePairs params = new NameValuePairs();
IConfigStore config = mOCSP.getConfigStore();
- String defStore = config.getString(mOCSP.PROP_DEF_STORE_ID);
- IConfigStore SubStore = config.getSubStore(mOCSP.PROP_STORE);
+ String defStore = config.getString(IOCSPAuthority.PROP_DEF_STORE_ID);
+ IConfigStore SubStore = config.getSubStore(IOCSPAuthority.PROP_STORE);
Enumeration enumStores = SubStore.getSubStoreNames();
while (enumStores.hasMoreElements()) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/admin/RAAdminServlet.java b/pki/base/common/src/com/netscape/cms/servlet/admin/RAAdminServlet.java
index 24fffd8b8..35bbb91aa 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/admin/RAAdminServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/admin/RAAdminServlet.java
@@ -215,9 +215,9 @@ public class RAAdminServlet extends AdminServlet {
IConfigStore config = mRA.getConfigStore();
IConfigStore nc =
- config.getSubStore(mRA.PROP_NOTIFY_SUBSTORE);
+ config.getSubStore(IRegistrationAuthority.PROP_NOTIFY_SUBSTORE);
- IConfigStore rc = nc.getSubStore(mRA.PROP_CERT_ISSUED_SUBSTORE);
+ IConfigStore rc = nc.getSubStore(IRegistrationAuthority.PROP_CERT_ISSUED_SUBSTORE);
getNotificationCompConfig(req, resp, rc);
@@ -229,9 +229,9 @@ public class RAAdminServlet extends AdminServlet {
IConfigStore config = mRA.getConfigStore();
IConfigStore nc =
- config.getSubStore(mRA.PROP_NOTIFY_SUBSTORE);
+ config.getSubStore(IRegistrationAuthority.PROP_NOTIFY_SUBSTORE);
- IConfigStore rc = nc.getSubStore(mRA.PROP_CERT_REVOKED_SUBSTORE);
+ IConfigStore rc = nc.getSubStore(IRegistrationAuthority.PROP_CERT_REVOKED_SUBSTORE);
getNotificationCompConfig(req, resp, rc);
@@ -248,9 +248,9 @@ public class RAAdminServlet extends AdminServlet {
IConfigStore config = mRA.getConfigStore();
IConfigStore nc =
- config.getSubStore(mRA.PROP_NOTIFY_SUBSTORE);
+ config.getSubStore(IRegistrationAuthority.PROP_NOTIFY_SUBSTORE);
- IConfigStore riq = nc.getSubStore(mRA.PROP_REQ_IN_Q_SUBSTORE);
+ IConfigStore riq = nc.getSubStore(IRegistrationAuthority.PROP_REQ_IN_Q_SUBSTORE);
Enumeration e = req.getParameterNames();
@@ -282,9 +282,9 @@ public class RAAdminServlet extends AdminServlet {
IOException, EBaseException {
IConfigStore config = mRA.getConfigStore();
IConfigStore nc =
- config.getSubStore(mRA.PROP_NOTIFY_SUBSTORE);
+ config.getSubStore(IRegistrationAuthority.PROP_NOTIFY_SUBSTORE);
- IConfigStore riq = nc.getSubStore(mRA.PROP_REQ_IN_Q_SUBSTORE);
+ IConfigStore riq = nc.getSubStore(IRegistrationAuthority.PROP_REQ_IN_Q_SUBSTORE);
//set rest of the parameters
Enumeration e = req.getParameterNames();
@@ -359,9 +359,9 @@ public class RAAdminServlet extends AdminServlet {
IOException, EBaseException {
IConfigStore config = mRA.getConfigStore();
IConfigStore nc =
- config.getSubStore(mRA.PROP_NOTIFY_SUBSTORE);
+ config.getSubStore(IRegistrationAuthority.PROP_NOTIFY_SUBSTORE);
- IConfigStore rc = nc.getSubStore(mRA.PROP_CERT_ISSUED_SUBSTORE);
+ IConfigStore rc = nc.getSubStore(IRegistrationAuthority.PROP_CERT_ISSUED_SUBSTORE);
setNotificationCompConfig(req, resp, rc, mRA.getCertIssuedListener());
@@ -372,9 +372,9 @@ public class RAAdminServlet extends AdminServlet {
IOException, EBaseException {
IConfigStore config = mRA.getConfigStore();
IConfigStore nc =
- config.getSubStore(mRA.PROP_NOTIFY_SUBSTORE);
+ config.getSubStore(IRegistrationAuthority.PROP_NOTIFY_SUBSTORE);
- IConfigStore rc = nc.getSubStore(mRA.PROP_CERT_REVOKED_SUBSTORE);
+ IConfigStore rc = nc.getSubStore(IRegistrationAuthority.PROP_CERT_REVOKED_SUBSTORE);
setNotificationCompConfig(req, resp, rc, mRA.getCertRevokedListener());
}
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/GetEnableStatus.java b/pki/base/common/src/com/netscape/cms/servlet/cert/GetEnableStatus.java
index 5ac681106..8b5536ea8 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/GetEnableStatus.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/GetEnableStatus.java
@@ -145,7 +145,7 @@ public class GetEnableStatus extends CMSServlet {
IAuthSubsystem authSS = (IAuthSubsystem) CMS.getSubsystem(CMS.SUBSYSTEM_AUTH);
IAuthManager authMgr = authSS.get(val);
HashAuthentication mgr = (HashAuthentication) authMgr;
- long timeout = mgr.DEFAULT_TIMEOUT / 1000;
+ long timeout = HashAuthentication.DEFAULT_TIMEOUT / 1000;
header.addStringValue("timeout", "" + timeout);
header.addStringValue("reqHost", reqHost);
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/GetInfo.java b/pki/base/common/src/com/netscape/cms/servlet/cert/GetInfo.java
index 5b6b02fa2..9d83d430c 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/GetInfo.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/GetInfo.java
@@ -303,9 +303,9 @@ CMS.debug("*** formFile = "+formFile);
if (recentChanges.length() > 0)
recentChanges += "+";
- if (ip.isCRLUpdateInProgress() == ip.CRL_PUBLISHING_STARTED) {
+ if (ip.isCRLUpdateInProgress() == ICRLIssuingPoint.CRL_PUBLISHING_STARTED) {
recentChanges += "Publishing CRL #" + ip.getCRLNumber();
- } else if (ip.isCRLUpdateInProgress() == ip.CRL_UPDATE_STARTED) {
+ } else if (ip.isCRLUpdateInProgress() == ICRLIssuingPoint.CRL_UPDATE_STARTED) {
recentChanges += "Creating CRL #" + ip.getNextCRLNumber();
} else { // ip.CRL_UPDATE_DONE
recentChanges += ip.getNumberOfRecentlyRevokedCerts() + ", " +
@@ -345,8 +345,8 @@ CMS.debug("*** formFile = "+formFile);
header.addStringValue("master_host", masterHost);
header.addStringValue("master_port", masterPort);
- header.addStringValue("masterCRLIssuingPoint", mCA.PROP_MASTER_CRL);
- ICRLIssuingPoint ip0 = mCA.getCRLIssuingPoint(mCA.PROP_MASTER_CRL);
+ header.addStringValue("masterCRLIssuingPoint", ICertificateAuthority.PROP_MASTER_CRL);
+ ICRLIssuingPoint ip0 = mCA.getCRLIssuingPoint(ICertificateAuthority.PROP_MASTER_CRL);
if (ip0 != null) {
header.addStringValue("defaultAlgorithm", ip0.getSigningAlgorithm());
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/UpdateCRL.java b/pki/base/common/src/com/netscape/cms/servlet/cert/UpdateCRL.java
index 1047c97c3..396f333bc 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/UpdateCRL.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/UpdateCRL.java
@@ -325,7 +325,7 @@ public class UpdateCRL extends CMSServlet {
}
}
if (crlIssuingPointId == null) {
- crlIssuingPointId = mCA.PROP_MASTER_CRL;
+ crlIssuingPointId = ICertificateAuthority.PROP_MASTER_CRL;
}
ICRLIssuingPoint crlIssuingPoint =
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/scep/CRSEnrollment.java b/pki/base/common/src/com/netscape/cms/servlet/cert/scep/CRSEnrollment.java
index 1222621de..79151072d 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/scep/CRSEnrollment.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/scep/CRSEnrollment.java
@@ -882,7 +882,7 @@ protected IProfileSubsystem mProfileSubsystem = null;
CMS.debug(e);
throw new ServletException("Could not decode the request.");
}
- crsResp.setMessageType(crsResp.mType_CertRep);
+ crsResp.setMessageType(CRSPKIMessage.mType_CertRep);
// Create a new crypto context for doing all the crypto operations
cx = new CryptoContext();
@@ -925,7 +925,7 @@ protected IProfileSubsystem mProfileSubsystem = null;
}
// now run appropriate code, depending on message type
- if (mt.equals(req.mType_PKCSReq)) {
+ if (mt.equals(CRSPKIMessage.mType_PKCSReq)) {
CMS.debug("Processing PKCSReq");
try {
// Check if there is an existing request. If this returns non-null,
@@ -949,7 +949,7 @@ protected IProfileSubsystem mProfileSubsystem = null;
throw new ServletException("Couldn't handle CEP request (PKCSReq) - "+e.getMessage());
}
}
- else if (mt.equals(req.mType_GetCertInitial)) {
+ else if (mt.equals(CRSPKIMessage.mType_GetCertInitial)) {
CMS.debug("Processing GetCertInitial");
cert = handleGetCertInitial(req,crsResp);
} else {
@@ -962,7 +962,7 @@ protected IProfileSubsystem mProfileSubsystem = null;
catch (CRSInvalidSignatureException e) {
CMS.debug("handlePKIMessage exception " + e);
CMS.debug(e);
- crsResp.setFailInfo(crsResp.mFailInfo_badMessageCheck);
+ crsResp.setFailInfo(CRSPKIMessage.mFailInfo_badMessageCheck);
}
catch (Exception e) {
CMS.debug("handlePKIMessage exception " + e);
@@ -1064,8 +1064,8 @@ protected IProfileSubsystem mProfileSubsystem = null;
}
if (foundRequest == null) {
- resp.setFailInfo(resp.mFailInfo_badCertId);
- resp.setPKIStatus(resp.mStatus_FAILURE);
+ resp.setFailInfo(CRSPKIMessage.mFailInfo_badCertId);
+ resp.setPKIStatus(CRSPKIMessage.mStatus_FAILURE);
return null;
}
@@ -1203,8 +1203,8 @@ private void getDetailFromRequest(CRSPKIMessage req, CRSPKIMessage crsResp)
PKCS10 p10 = (PKCS10)req.getP10();
if (p10 == null) {
- crsResp.setFailInfo(crsResp.mFailInfo_badMessageCheck);
- crsResp.setPKIStatus(crsResp.mStatus_FAILURE);
+ crsResp.setFailInfo(CRSPKIMessage.mFailInfo_badMessageCheck);
+ crsResp.setPKIStatus(CRSPKIMessage.mStatus_FAILURE);
throw new CRSFailureException("Failed to decode pkcs10 from CEP request");
}
@@ -1389,8 +1389,8 @@ private void getDetailFromRequest(CRSPKIMessage req, CRSPKIMessage crsResp)
req.put(CERTINFO, certInfo);
} catch (Exception e) {
- crsResp.setFailInfo(crsResp.mFailInfo_badMessageCheck);
- crsResp.setPKIStatus(crsResp.mStatus_FAILURE);
+ crsResp.setFailInfo(CRSPKIMessage.mFailInfo_badMessageCheck);
+ crsResp.setPKIStatus(CRSPKIMessage.mStatus_FAILURE);
return ;
} // NEED TO FIX
}
@@ -1532,8 +1532,8 @@ private void getDetailFromRequest(CRSPKIMessage req, CRSPKIMessage crsResp)
else {
CMS.debug("duplicated transaction id");
log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSGW_ENROLL_FAIL_DUP_TRANS_ID"));
- crsResp.setFailInfo(crsResp.mFailInfo_badRequest);
- crsResp.setPKIStatus(crsResp.mStatus_FAILURE);
+ crsResp.setFailInfo(CRSPKIMessage.mFailInfo_badRequest);
+ crsResp.setPKIStatus(CRSPKIMessage.mStatus_FAILURE);
return null;
}
}
@@ -1544,8 +1544,8 @@ private void getDetailFromRequest(CRSPKIMessage req, CRSPKIMessage crsResp)
if (authFailed) {
CMS.debug("authentication failed");
log(ILogger.LL_SECURITY, CMS.getLogMessage("CMSGW_ENROLL_FAIL_NO_AUTH"));
- crsResp.setFailInfo(crsResp.mFailInfo_badIdentity);
- crsResp.setPKIStatus(crsResp.mStatus_FAILURE);
+ crsResp.setFailInfo(CRSPKIMessage.mFailInfo_badIdentity);
+ crsResp.setPKIStatus(CRSPKIMessage.mStatus_FAILURE);
// perform audit log
@@ -1576,14 +1576,14 @@ private void getDetailFromRequest(CRSPKIMessage req, CRSPKIMessage crsResp)
CMS.debug("failed to decrypt the request " + e);
log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSGW_ENROLL_FAIL_NO_DECRYPT_PKCS10",
e.getMessage()));
- crsResp.setFailInfo(crsResp.mFailInfo_badMessageCheck);
- crsResp.setPKIStatus(crsResp.mStatus_FAILURE);
+ crsResp.setFailInfo(CRSPKIMessage.mFailInfo_badMessageCheck);
+ crsResp.setPKIStatus(CRSPKIMessage.mStatus_FAILURE);
} catch (EBaseException e) {
CMS.debug("operation failure - " + e);
log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSGW_ERNOLL_FAIL_NO_NEW_REQUEST_POSTED",
e.getMessage()));
- crsResp.setFailInfo(crsResp.mFailInfo_internalCAError);
- crsResp.setPKIStatus(crsResp.mStatus_FAILURE);
+ crsResp.setFailInfo(CRSPKIMessage.mFailInfo_internalCAError);
+ crsResp.setPKIStatus(CRSPKIMessage.mStatus_FAILURE);
}
return null;
}
@@ -1743,7 +1743,7 @@ throws EBaseException {
rq.processRequest(pkiReq);
- crsResp.setPKIStatus(crsResp.mStatus_SUCCESS);
+ crsResp.setPKIStatus(CRSPKIMessage.mStatus_SUCCESS);
mLogger.log(ILogger.EV_AUDIT, ILogger.S_OTHER,
AuditFormat.LEVEL,
@@ -1807,7 +1807,7 @@ throws EBaseException {
} else {
CMS.debug("CRSEnrollment: Found certificate");
}
- crsResp.setPKIStatus(crsResp.mStatus_SUCCESS);
+ crsResp.setPKIStatus(CRSPKIMessage.mStatus_SUCCESS);
return cert;
}
@@ -1827,22 +1827,22 @@ throws EBaseException {
return null;
}
issuedCert = issuedCertBuf[0];
- crsResp.setPKIStatus(crsResp.mStatus_SUCCESS);
+ crsResp.setPKIStatus(CRSPKIMessage.mStatus_SUCCESS);
}
else { // status is not 'success' - there must've been a problem
- crsResp.setPKIStatus(crsResp.mStatus_FAILURE);
- crsResp.setFailInfo(crsResp.mFailInfo_badAlg);
+ crsResp.setPKIStatus(CRSPKIMessage.mStatus_FAILURE);
+ crsResp.setFailInfo(CRSPKIMessage.mFailInfo_badAlg);
}
}
else if (status.equals(RequestStatus.REJECTED_STRING) ||
status.equals(RequestStatus.CANCELED_STRING)) {
- crsResp.setPKIStatus(crsResp.mStatus_FAILURE);
- crsResp.setFailInfo(crsResp.mFailInfo_badRequest);
+ crsResp.setPKIStatus(CRSPKIMessage.mStatus_FAILURE);
+ crsResp.setFailInfo(CRSPKIMessage.mFailInfo_badRequest);
}
else { // not complete
- crsResp.setPKIStatus(crsResp.mStatus_PENDING);
+ crsResp.setPKIStatus(CRSPKIMessage.mStatus_PENDING);
}
return issuedCert;
diff --git a/pki/base/common/src/com/netscape/cms/servlet/key/RecoverBySerial.java b/pki/base/common/src/com/netscape/cms/servlet/key/RecoverBySerial.java
index b39b3aa69..edcd2bdf6 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/key/RecoverBySerial.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/key/RecoverBySerial.java
@@ -238,7 +238,7 @@ public class RecoverBySerial extends CMSServlet {
header.addStringValue(OUT_ERROR,
CMS.getUserMessage(locale[0], "CMS_BASE_INTERNAL_ERROR", e.toString()));
} finally {
- ctx.releaseContext();
+ SessionContext.releaseContext();
}
// return status page
diff --git a/pki/base/common/src/com/netscape/cms/servlet/ocsp/OCSPServlet.java b/pki/base/common/src/com/netscape/cms/servlet/ocsp/OCSPServlet.java
index d1742f2fa..cfc919750 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/ocsp/OCSPServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/ocsp/OCSPServlet.java
@@ -22,6 +22,7 @@ import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
+import java.net.URLDecoder;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
@@ -122,9 +123,8 @@ public class OCSPServlet extends CMSServlet {
CMS.debug("Servlet Path=" + httpReq.getServletPath());
CMS.debug("RequestURI=" + httpReq.getRequestURI());
String pathInfo = httpReq.getPathInfo();
- java.net.URLDecoder urldecoder = new java.net.URLDecoder();
if (pathInfo != null && pathInfo.indexOf('%') != -1) {
- pathInfo = urldecoder.decode(pathInfo);
+ pathInfo = URLDecoder.decode(pathInfo);
}
CMS.debug("PathInfo=" + pathInfo);
diff --git a/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileSubmitCMCServlet.java b/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileSubmitCMCServlet.java
index 0787ebb44..b00b13a9d 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileSubmitCMCServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileSubmitCMCServlet.java
@@ -809,7 +809,7 @@ profile, IRequest req) {
error_codes);
}
} finally {
- context.releaseContext();
+ SessionContext.releaseContext();
}
}
diff --git a/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileSubmitServlet.java b/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileSubmitServlet.java
index 8ca3b6f2d..184a82b2e 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileSubmitServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileSubmitServlet.java
@@ -1457,7 +1457,7 @@ public class ProfileSubmitServlet extends ProfileServlet {
}
throw eAudit1;
} finally {
- context.releaseContext();
+ SessionContext.releaseContext();
}
if (statsSub != null) {
statsSub.endTiming("enrollment");
diff --git a/pki/base/common/src/com/netscape/cmscore/apps/CMSEngine.java b/pki/base/common/src/com/netscape/cmscore/apps/CMSEngine.java
index 92331a20d..59b387127 100644
--- a/pki/base/common/src/com/netscape/cmscore/apps/CMSEngine.java
+++ b/pki/base/common/src/com/netscape/cmscore/apps/CMSEngine.java
@@ -1644,7 +1644,7 @@ public class CMSEngine implements ICMSEngine {
while (t1.isAlive() && ((timeOut - startTime) < (60 * 1000))) //wait for 1 minute
{
try {
- Thread.currentThread().sleep(5000); // sleep for 5 sec
+ Thread.sleep(5000); // sleep for 5 sec
}catch (java.lang.InterruptedException e) {
}
timeOut = time.getTime();
diff --git a/pki/base/common/src/com/netscape/cmscore/apps/CommandQueue.java b/pki/base/common/src/com/netscape/cmscore/apps/CommandQueue.java
index e9f1f77aa..5a4dd6fb8 100644
--- a/pki/base/common/src/com/netscape/cmscore/apps/CommandQueue.java
+++ b/pki/base/common/src/com/netscape/cmscore/apps/CommandQueue.java
@@ -62,7 +62,7 @@ public class CommandQueue implements Runnable, ICommandQueue {
mShuttingDown = true;
while (mCommandQueue.isEmpty() == false) {
try {
- Thread.currentThread().sleep(5 * 1000);
+ Thread.sleep(5 * 1000);
//gcProcess();
} catch (Exception e) {
diff --git a/pki/base/common/src/com/netscape/cmscore/base/JDialogPasswordCallback.java b/pki/base/common/src/com/netscape/cmscore/base/JDialogPasswordCallback.java
index 2a7a1ef23..cd6959676 100644
--- a/pki/base/common/src/com/netscape/cmscore/base/JDialogPasswordCallback.java
+++ b/pki/base/common/src/com/netscape/cmscore/base/JDialogPasswordCallback.java
@@ -68,12 +68,12 @@ public class JDialogPasswordCallback implements PasswordCallback {
}
private void resetGBC(GridBagConstraints gbc) {
- gbc.gridx = gbc.RELATIVE;
- gbc.gridy = gbc.RELATIVE;
+ gbc.gridx = GridBagConstraints.RELATIVE;
+ gbc.gridy = GridBagConstraints.RELATIVE;
gbc.gridwidth = 1;
gbc.gridheight = 1;
- gbc.fill = gbc.HORIZONTAL;
- gbc.anchor = gbc.CENTER;
+ gbc.fill = GridBagConstraints.HORIZONTAL;
+ gbc.anchor = GridBagConstraints.CENTER;
gbc.ipadx = 0;
gbc.ipady = 0;
gbc.weightx = 0.0;
@@ -115,8 +115,8 @@ public class JDialogPasswordCallback implements PasswordCallback {
warning.setForeground(Color.red);
resetGBC(c);
- c.anchor = c.NORTHWEST;
- c.gridwidth = c.REMAINDER;
+ c.anchor = GridBagConstraints.NORTHWEST;
+ c.gridwidth = GridBagConstraints.REMAINDER;
// Setting this to NULL causes nasty Exception stack traces
// to be printed, although the program still seems to work
//warning.setHighlighter(null);
@@ -131,8 +131,8 @@ public class JDialogPasswordCallback implements PasswordCallback {
// to be printed, although the program still seems to work
//label.setHighlighter(null);
resetGBC(c);
- c.anchor = c.NORTHWEST;
- c.gridwidth = c.REMAINDER;
+ c.anchor = GridBagConstraints.NORTHWEST;
+ c.gridwidth = GridBagConstraints.REMAINDER;
contentPane.add(label, c);
///////////////////////////////////////////////////
@@ -163,10 +163,10 @@ public class JDialogPasswordCallback implements PasswordCallback {
pwField.setEchoChar('*');
pwField.addActionListener(getPasswordListener);
resetGBC(c);
- c.anchor = c.CENTER;
- c.fill = c.NONE;
+ c.anchor = GridBagConstraints.CENTER;
+ c.fill = GridBagConstraints.NONE;
c.insets = new Insets(16, 0, 0, 0);
- c.gridwidth = c.REMAINDER;
+ c.gridwidth = GridBagConstraints.REMAINDER;
//c.gridy++;
contentPane.add(pwField, c);
@@ -180,9 +180,9 @@ public class JDialogPasswordCallback implements PasswordCallback {
ok.addActionListener(getPasswordListener);
resetGBC(c);
- c.fill = c.NONE;
- c.anchor = c.CENTER;
- c.gridheight = c.REMAINDER;
+ c.fill = GridBagConstraints.NONE;
+ c.anchor = GridBagConstraints.CENTER;
+ c.gridheight = GridBagConstraints.REMAINDER;
c.insets = new Insets(10, 0, 0, 4);
buttonPanel.add(ok, c);
@@ -196,18 +196,18 @@ public class JDialogPasswordCallback implements PasswordCallback {
cancel.addActionListener(buttonListener);
resetGBC(c);
- c.fill = c.NONE;
- c.anchor = c.CENTER;
+ c.fill = GridBagConstraints.NONE;
+ c.anchor = GridBagConstraints.CENTER;
c.insets = new Insets(10, 4, 0, 0);
- c.gridheight = c.REMAINDER;
- c.gridwidth = c.REMAINDER;
+ c.gridheight = GridBagConstraints.REMAINDER;
+ c.gridwidth = GridBagConstraints.REMAINDER;
buttonPanel.add(cancel, c);
resetGBC(c);
- c.fill = c.NONE;
- c.anchor = c.CENTER;
- c.gridwidth = c.REMAINDER;
- c.gridheight = c.REMAINDER;
+ c.fill = GridBagConstraints.NONE;
+ c.anchor = GridBagConstraints.CENTER;
+ c.gridwidth = GridBagConstraints.REMAINDER;
+ c.gridheight = GridBagConstraints.REMAINDER;
c.insets = new Insets(0, 0, 0, 0);
contentPane.add(buttonPanel, c);
diff --git a/pki/base/common/src/com/netscape/cmscore/jobs/JobsScheduler.java b/pki/base/common/src/com/netscape/cmscore/jobs/JobsScheduler.java
index a37fcf93d..5d1d3668c 100644
--- a/pki/base/common/src/com/netscape/cmscore/jobs/JobsScheduler.java
+++ b/pki/base/common/src/com/netscape/cmscore/jobs/JobsScheduler.java
@@ -338,7 +338,7 @@ public class JobsScheduler implements Runnable, IJobsScheduler {
* is it the right month?
*/
Vector moy =
- jcron.getItem(jcron.CRON_MONTH_OF_YEAR).getElements();
+ jcron.getItem(JobCron.CRON_MONTH_OF_YEAR).getElements();
int cronMoy = jcron.MOY_cal2cron(now);
@@ -350,8 +350,8 @@ public class JobsScheduler implements Runnable, IJobsScheduler {
/**
* is it the right date?
*/
- Vector dow = jcron.getItem(jcron.CRON_DAY_OF_WEEK).getElements();
- Vector dom = jcron.getItem(jcron.CRON_DAY_OF_MONTH).getElements();
+ Vector dow = jcron.getItem(JobCron.CRON_DAY_OF_WEEK).getElements();
+ Vector dom = jcron.getItem(JobCron.CRON_DAY_OF_MONTH).getElements();
// can't be both empty
if ((dow.isEmpty()) && dom.isEmpty()) {
@@ -369,7 +369,7 @@ public class JobsScheduler implements Runnable, IJobsScheduler {
/**
* is it the right hour?
*/
- Vector hour = jcron.getItem(jcron.CRON_HOUR).getElements();
+ Vector hour = jcron.getItem(JobCron.CRON_HOUR).getElements();
if (jcron.isElement(now.get(Calendar.HOUR_OF_DAY), hour) == false) {
return false;
@@ -379,7 +379,7 @@ public class JobsScheduler implements Runnable, IJobsScheduler {
/**
* is it the right minute?
*/
- Vector minute = jcron.getItem(jcron.CRON_MINUTE).getElements();
+ Vector minute = jcron.getItem(JobCron.CRON_MINUTE).getElements();
if (jcron.isElement(now.get(Calendar.MINUTE), minute) == false) {
return false;
diff --git a/pki/base/common/src/com/netscape/cmscore/ldapconn/LdapJssSSLSocketFactory.java b/pki/base/common/src/com/netscape/cmscore/ldapconn/LdapJssSSLSocketFactory.java
index 1b9898840..8aa59e304 100644
--- a/pki/base/common/src/com/netscape/cmscore/ldapconn/LdapJssSSLSocketFactory.java
+++ b/pki/base/common/src/com/netscape/cmscore/ldapconn/LdapJssSSLSocketFactory.java
@@ -56,7 +56,8 @@ public class LdapJssSSLSocketFactory implements LDAPSSLSocketFactoryExt {
s = new SSLSocket(host, port);
s.setUseClientMode(true);
s.enableSSL2(false);
- s.enableSSL2Default(false);
+ //TODO Do we really want to set the default each time?
+ SSLSocket.enableSSL2Default(false);
s.enableV2CompatibleHello(false);
SSLHandshakeCompletedListener listener = null;
diff --git a/pki/base/common/src/com/netscape/cmscore/util/ProfileSubsystem.java b/pki/base/common/src/com/netscape/cmscore/util/ProfileSubsystem.java
index 85c2a5af1..2d8e63c9f 100644
--- a/pki/base/common/src/com/netscape/cmscore/util/ProfileSubsystem.java
+++ b/pki/base/common/src/com/netscape/cmscore/util/ProfileSubsystem.java
@@ -212,7 +212,7 @@ public class ProfileSubsystem extends Frame implements ISubsystem, Runnable {
updateGeneralPanel();
updateThreadPanel();
// update every second
- mMonitoring.sleep(1000);
+ Thread.sleep(1000);
} catch (Exception e) {
}
}
@@ -294,8 +294,11 @@ class ThreadTableEvent extends MouseAdapter {
continue;
PrintStream err = System.err;
- System.setErr(new PrintStream(outArray));
- threads[i].dumpStack(); // not working, print only current thread
+ System.setErr(new PrintStream(outArray));
+ //TODO remove. This was being called on the array object
+ //But you can only dump stack on the current thread
+ Thread.dumpStack();
+
System.setErr(err);
}
diff --git a/pki/base/silent/src/com/netscape/pkisilent/ConfigureCA.java b/pki/base/silent/src/com/netscape/pkisilent/ConfigureCA.java
index 0a1c16660..337bf9275 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/ConfigureCA.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/ConfigureCA.java
@@ -244,7 +244,7 @@ public class ConfigureCA {
if (temp != null) {
int index = temp.indexOf(";");
- hc.j_session_id = temp.substring(0, index);
+ HTTPClient.j_session_id = temp.substring(0, index);
st = true;
}
@@ -1561,7 +1561,7 @@ public class ConfigureCA {
// and then match the arguments
String[] unmatched = null;
- unmatched = parser.matchAllArgs(args, 0, parser.EXIT_ON_UNMATCHED);
+ unmatched = parser.matchAllArgs(args, 0, ArgParser.EXIT_ON_UNMATCHED);
if (unmatched != null) {
System.out.println("ERROR: Argument Mismatch");
diff --git a/pki/base/silent/src/com/netscape/pkisilent/ConfigureDRM.java b/pki/base/silent/src/com/netscape/pkisilent/ConfigureDRM.java
index 29e3cf19c..c79ec4edd 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/ConfigureDRM.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/ConfigureDRM.java
@@ -217,7 +217,7 @@ public class ConfigureDRM
if (temp!=null) {
int index = temp.indexOf(";");
- hc.j_session_id = temp.substring(0,index);
+ HTTPClient.j_session_id = temp.substring(0,index);
st = true;
}
@@ -1272,7 +1272,7 @@ public class ConfigureDRM
// and then match the arguments
String [] unmatched = null;
- unmatched = parser.matchAllArgs (args,0,parser.EXIT_ON_UNMATCHED);
+ unmatched = parser.matchAllArgs (args,0,ArgParser.EXIT_ON_UNMATCHED);
if (unmatched!=null) {
System.out.println("ERROR: Argument Mismatch");
diff --git a/pki/base/silent/src/com/netscape/pkisilent/ConfigureOCSP.java b/pki/base/silent/src/com/netscape/pkisilent/ConfigureOCSP.java
index 55f008181..f237b0c70 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/ConfigureOCSP.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/ConfigureOCSP.java
@@ -193,7 +193,7 @@ public class ConfigureOCSP
if (temp!=null) {
int index = temp.indexOf(";");
- hc.j_session_id = temp.substring(0,index);
+ HTTPClient.j_session_id = temp.substring(0,index);
st = true;
}
@@ -1136,7 +1136,7 @@ public class ConfigureOCSP
// and then match the arguments
String [] unmatched = null;
- unmatched = parser.matchAllArgs (args,0,parser.EXIT_ON_UNMATCHED);
+ unmatched = parser.matchAllArgs (args,0,ArgParser.EXIT_ON_UNMATCHED);
if (unmatched!=null) {
System.out.println("ERROR: Argument Mismatch");
diff --git a/pki/base/silent/src/com/netscape/pkisilent/ConfigureRA.java b/pki/base/silent/src/com/netscape/pkisilent/ConfigureRA.java
index 6bb7cd2c9..fc28e8b42 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/ConfigureRA.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/ConfigureRA.java
@@ -148,7 +148,7 @@ public class ConfigureRA
if(temp!=null)
{
int index = temp.indexOf(";");
- hc.j_session_id = temp.substring(0,index);
+ HTTPClient.j_session_id = temp.substring(0,index);
st = true;
}
@@ -882,7 +882,7 @@ public class ConfigureRA
// and then match the arguments
String [] unmatched = null;
- unmatched = parser.matchAllArgs (args,0,parser.EXIT_ON_UNMATCHED);
+ unmatched = parser.matchAllArgs (args,0,ArgParser.EXIT_ON_UNMATCHED);
if(unmatched!=null)
{
diff --git a/pki/base/silent/src/com/netscape/pkisilent/ConfigureSubCA.java b/pki/base/silent/src/com/netscape/pkisilent/ConfigureSubCA.java
index d492d5fcb..93d115fce 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/ConfigureSubCA.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/ConfigureSubCA.java
@@ -199,7 +199,7 @@ public class ConfigureSubCA
if (temp!=null)
{
int index = temp.indexOf(";");
- hc.j_session_id = temp.substring(0,index);
+ HTTPClient.j_session_id = temp.substring(0,index);
st = true;
}
@@ -1191,7 +1191,7 @@ public class ConfigureSubCA
// and then match the arguments
String [] unmatched = null;
- unmatched = parser.matchAllArgs (args,0,parser.EXIT_ON_UNMATCHED);
+ unmatched = parser.matchAllArgs (args,0,ArgParser.EXIT_ON_UNMATCHED);
if (unmatched!=null) {
System.out.println("ERROR: Argument Mismatch");
diff --git a/pki/base/silent/src/com/netscape/pkisilent/ConfigureTKS.java b/pki/base/silent/src/com/netscape/pkisilent/ConfigureTKS.java
index b681b84c7..d89fb5dd0 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/ConfigureTKS.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/ConfigureTKS.java
@@ -176,7 +176,7 @@ public class ConfigureTKS
if (temp!=null) {
int index = temp.indexOf(";");
- hc.j_session_id = temp.substring(0,index);
+ HTTPClient.j_session_id = temp.substring(0,index);
st = true;
}
@@ -1087,7 +1087,7 @@ public class ConfigureTKS
// and then match the arguments
String [] unmatched = null;
- unmatched = parser.matchAllArgs (args,0,parser.EXIT_ON_UNMATCHED);
+ unmatched = parser.matchAllArgs (args,0,ArgParser.EXIT_ON_UNMATCHED);
if (unmatched!=null) {
System.out.println("ERROR: Argument Mismatch");
diff --git a/pki/base/silent/src/com/netscape/pkisilent/ConfigureTPS.java b/pki/base/silent/src/com/netscape/pkisilent/ConfigureTPS.java
index fde32131c..5273fda73 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/ConfigureTPS.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/ConfigureTPS.java
@@ -182,7 +182,7 @@ public class ConfigureTPS
if(temp!=null)
{
int index = temp.indexOf(";");
- hc.j_session_id = temp.substring(0,index);
+ HTTPClient.j_session_id = temp.substring(0,index);
st = true;
}
@@ -1085,7 +1085,7 @@ public class ConfigureTPS
// and then match the arguments
String [] unmatched = null;
- unmatched = parser.matchAllArgs (args,0,parser.EXIT_ON_UNMATCHED);
+ unmatched = parser.matchAllArgs (args,0,ArgParser.EXIT_ON_UNMATCHED);
if(unmatched!=null)
{
diff --git a/pki/base/silent/src/com/netscape/pkisilent/common/CMSTask.java b/pki/base/silent/src/com/netscape/pkisilent/common/CMSTask.java
index 479e13e6e..593de3838 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/common/CMSTask.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/common/CMSTask.java
@@ -165,7 +165,7 @@ public class CMSTask {
// and then match the arguments
String[] unmatched = null;
- unmatched = parser.matchAllArgs(args, 0, parser.EXIT_ON_UNMATCHED);
+ unmatched = parser.matchAllArgs(args, 0, ArgParser.EXIT_ON_UNMATCHED);
if (unmatched != null) {
System.out.println("ERROR: Argument Mismatch");
diff --git a/pki/base/silent/src/com/netscape/pkisilent/http/HTTPClient.java b/pki/base/silent/src/com/netscape/pkisilent/http/HTTPClient.java
index 9c840fcdc..066fb0b4d 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/http/HTTPClient.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/http/HTTPClient.java
@@ -130,10 +130,10 @@ public class HTTPClient implements SSLCertificateApprovalCallback
{
try
{
- socket.enableSSL3Default(true);
+ SSLSocket.enableSSL3Default(true);
socket.enableSSL3(true);
socket.enableSSL2(false);
- socket.enableSSL2Default(false);
+ SSLSocket.enableSSL2Default(false);
socket.enableV2CompatibleHello(false);
}
catch(Exception e)
@@ -1296,7 +1296,7 @@ public class HTTPClient implements SSLCertificateApprovalCallback
// and then match the arguments
String [] unmatched = null;
- unmatched = parser.matchAllArgs (args,0,parser.EXIT_ON_UNMATCHED);
+ unmatched = parser.matchAllArgs (args,0,ArgParser.EXIT_ON_UNMATCHED);
if(unmatched!=null)
{
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 2cd13111c..e659da9b9 100644
--- a/pki/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java
+++ b/pki/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java
@@ -661,10 +661,8 @@ public class CryptoUtil {
CertificateSubjectName(new X500Name(subjname)));
info.set(X509CertInfo.VALIDITY, new
CertificateValidity(notBefore, notAfter));
- AlgorithmId sigAlgId = 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;
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 ed4e95187..501886b54 100644
--- a/pki/base/util/src/com/netscape/cmsutil/http/JssSSLSocketFactory.java
+++ b/pki/base/util/src/com/netscape/cmsutil/http/JssSSLSocketFactory.java
@@ -121,7 +121,8 @@ public class JssSSLSocketFactory implements ISocketFactory {
s.setUseClientMode(true);
s.enableSSL2(false);
- s.enableSSL2Default(false);
+ //TODO Do we rally want to set the default each time?
+ SSLSocket.enableSSL2Default(false);
s.enableV2CompatibleHello(false);
SSLHandshakeCompletedListener listener = null;
diff --git a/pki/base/util/src/netscape/security/pkcs/PKCS8Key.java b/pki/base/util/src/netscape/security/pkcs/PKCS8Key.java
index dfa5a728d..20a788fcb 100644
--- a/pki/base/util/src/netscape/security/pkcs/PKCS8Key.java
+++ b/pki/base/util/src/netscape/security/pkcs/PKCS8Key.java
@@ -60,7 +60,7 @@ public class PKCS8Key implements PrivateKey {
protected byte[] encodedKey;
/* The version for this key */
- public static final BigInteger version = BigInteger.valueOf(0);
+ public static final BigInteger VERSION = BigInteger.valueOf(0);
/**
* Default constructor. The key constructed must have its key
@@ -104,9 +104,9 @@ public class PKCS8Key implements PrivateKey {
throw new IOException ("corrupt private key");
BigInteger parsedVersion = in.data.getInteger().toBigInteger();
- if (!version.equals(parsedVersion)) {
+ if (!VERSION.equals(parsedVersion)) {
throw new IOException("version mismatch: (supported: " +
- version + ", parsed: " +
+ VERSION + ", parsed: " +
parsedVersion);
}
@@ -324,9 +324,9 @@ public class PKCS8Key implements PrivateKey {
BigInteger version = val.data.getInteger().toBigInteger();
- if (!version.equals(this.version)) {
+ if (!version.equals(PKCS8Key.VERSION)) {
throw new IOException("version mismatch: (supported: " +
- this.version + ", parsed: " +
+ PKCS8Key.VERSION + ", parsed: " +
version);
}
algid = AlgorithmId.parse (val.data.getDerValue ());
@@ -389,7 +389,7 @@ public class PKCS8Key implements PrivateKey {
static void encode(DerOutputStream out, AlgorithmId algid, byte[] key)
throws IOException {
DerOutputStream tmp = new DerOutputStream();
- tmp.putInteger(new BigInt(version.toByteArray()));
+ tmp.putInteger(new BigInt(VERSION.toByteArray()));
algid.encode(tmp);
tmp.putOctetString(key);
out.write(DerValue.tag_Sequence, tmp);
diff --git a/pki/base/util/src/netscape/security/x509/CRLDistributionPoint.java b/pki/base/util/src/netscape/security/x509/CRLDistributionPoint.java
index 532e313a5..5207e3199 100644
--- a/pki/base/util/src/netscape/security/x509/CRLDistributionPoint.java
+++ b/pki/base/util/src/netscape/security/x509/CRLDistributionPoint.java
@@ -405,7 +405,7 @@ public static class Template implements ASN1Template {
try {
DerValue dv = new DerValue(distPoint.getEncoded());
//toFile("encodedFullName", distPoint.getEncoded());
- dv.resetTag(dv.tag_Sequence);
+ dv.resetTag(DerValue.tag_Sequence);
cdp.setFullName( new GeneralNames(dv) );
} catch(GeneralNamesException e) {
throw new InvalidBERException( "fullName: " + e.toString());
@@ -435,7 +435,7 @@ public static class Template implements ASN1Template {
: }
: }
*/
- dv.resetTag(dv.tag_Set);
+ dv.resetTag(DerValue.tag_Set);
cdp.setRelativeName( new RDN(dv) );
} catch(IOException e) {
throw new InvalidBERException( "relativeName " +
@@ -464,7 +464,7 @@ public static class Template implements ASN1Template {
}
try {
DerValue dv = new DerValue( issuer.getEncoded() );
- dv.resetTag(dv.tag_Sequence);
+ dv.resetTag(DerValue.tag_Sequence);
cdp.setCRLIssuer( new GeneralNames(dv) );
} catch(GeneralNamesException e) {
throw new InvalidBERException( "cRLIssuer " + e.toString() );
diff --git a/pki/base/util/src/netscape/security/x509/IssuingDistributionPointExtension.java b/pki/base/util/src/netscape/security/x509/IssuingDistributionPointExtension.java
index 36cce0300..d6afd54cc 100644
--- a/pki/base/util/src/netscape/security/x509/IssuingDistributionPointExtension.java
+++ b/pki/base/util/src/netscape/security/x509/IssuingDistributionPointExtension.java
@@ -393,14 +393,14 @@ public class IssuingDistributionPointExtension extends Extension
generalNames = new GeneralNames();
generalNames.addElement(dn);
idp.setFullName(generalNames);
- idpExt.set(idpExt.ISSUING_DISTRIBUTION_POINT, idp);
+ idpExt.set(IssuingDistributionPointExtension.ISSUING_DISTRIBUTION_POINT, idp);
// DN + reason
BitArray ba = new BitArray(5, new byte[] {(byte)0x28} );
idp = new IssuingDistributionPoint();
idp.setFullName(generalNames);
idp.setOnlySomeReasons(ba);
- idpExt.set(idpExt.ISSUING_DISTRIBUTION_POINT, idp);
+ idpExt.set(IssuingDistributionPointExtension.ISSUING_DISTRIBUTION_POINT, idp);
// relative DN + reason + crlIssuer
@@ -411,7 +411,7 @@ public class IssuingDistributionPointExtension extends Extension
idp.setOnlyContainsCACerts(true);
idp.setOnlyContainsUserCerts(true);
idp.setIndirectCRL(true);
- idpExt.set(idpExt.ISSUING_DISTRIBUTION_POINT, idp);
+ idpExt.set(IssuingDistributionPointExtension.ISSUING_DISTRIBUTION_POINT, idp);
idpExt.setCritical(false);
idpExt.encode(bos);