summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/cms/policy/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'pki/base/common/src/com/netscape/cms/policy/extensions')
-rw-r--r--pki/base/common/src/com/netscape/cms/policy/extensions/AuthInfoAccessExt.java32
-rw-r--r--pki/base/common/src/com/netscape/cms/policy/extensions/AuthorityKeyIdentifierExt.java8
-rw-r--r--pki/base/common/src/com/netscape/cms/policy/extensions/BasicConstraintsExt.java10
-rw-r--r--pki/base/common/src/com/netscape/cms/policy/extensions/CRLDistributionPointsExt.java14
-rw-r--r--pki/base/common/src/com/netscape/cms/policy/extensions/CertificatePoliciesExt.java18
-rw-r--r--pki/base/common/src/com/netscape/cms/policy/extensions/CertificateRenewalWindowExt.java10
-rw-r--r--pki/base/common/src/com/netscape/cms/policy/extensions/CertificateScopeOfUseExt.java24
-rw-r--r--pki/base/common/src/com/netscape/cms/policy/extensions/ExtendedKeyUsageExt.java14
-rw-r--r--pki/base/common/src/com/netscape/cms/policy/extensions/GenericASN1Ext.java14
-rw-r--r--pki/base/common/src/com/netscape/cms/policy/extensions/IssuerAltNameExt.java10
-rw-r--r--pki/base/common/src/com/netscape/cms/policy/extensions/KeyUsageExt.java8
-rw-r--r--pki/base/common/src/com/netscape/cms/policy/extensions/NSCCommentExt.java8
-rw-r--r--pki/base/common/src/com/netscape/cms/policy/extensions/NSCertTypeExt.java8
-rw-r--r--pki/base/common/src/com/netscape/cms/policy/extensions/NameConstraintsExt.java20
-rw-r--r--pki/base/common/src/com/netscape/cms/policy/extensions/OCSPNoCheckExt.java8
-rw-r--r--pki/base/common/src/com/netscape/cms/policy/extensions/PolicyConstraintsExt.java10
-rw-r--r--pki/base/common/src/com/netscape/cms/policy/extensions/PolicyMappingsExt.java14
-rw-r--r--pki/base/common/src/com/netscape/cms/policy/extensions/PresenceExt.java8
-rw-r--r--pki/base/common/src/com/netscape/cms/policy/extensions/PrivateKeyUsagePeriodExt.java12
-rw-r--r--pki/base/common/src/com/netscape/cms/policy/extensions/RemoveBasicConstraintsExt.java8
-rw-r--r--pki/base/common/src/com/netscape/cms/policy/extensions/SubjAltNameExt.java24
-rw-r--r--pki/base/common/src/com/netscape/cms/policy/extensions/SubjectAltNameExt.java16
-rw-r--r--pki/base/common/src/com/netscape/cms/policy/extensions/SubjectDirectoryAttributesExt.java22
-rw-r--r--pki/base/common/src/com/netscape/cms/policy/extensions/SubjectKeyIdentifierExt.java8
24 files changed, 165 insertions, 163 deletions
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/AuthInfoAccessExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/AuthInfoAccessExt.java
index cf94d73ee..fea126567 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/AuthInfoAccessExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/AuthInfoAccessExt.java
@@ -18,6 +18,7 @@
package com.netscape.cms.policy.extensions;
import java.io.IOException;
+import java.io.Serializable;
import java.security.cert.CertificateException;
import java.util.Enumeration;
import java.util.Locale;
@@ -104,7 +105,7 @@ public class AuthInfoAccessExt extends APolicyRule implements
}
public String[] getExtendedPluginInfo(Locale locale) {
- Vector v = new Vector();
+ Vector<String> v = new Vector<String>();
v.addElement(PROP_CRITICAL +
";boolean;RFC 2459 recommendation: This extension MUST be non-critical.");
@@ -122,10 +123,10 @@ public class AuthInfoAccessExt extends APolicyRule implements
+ PROP_METHOD
+ ";string;"
+ "A unique,valid OID specified in dot-separated numeric component notation. e.g. 1.3.6.1.5.5.7.48.1 (ocsp), 1.3.6.1.5.5.7.48.2 (caIssuers), 2.16.840.1.113730.1.16.1 (renewal)");
- v.addElement(PROP_AD + Integer.toString(i) + "_" + PROP_LOCATION_TYPE + ";"
- + IGeneralNameUtil.GENNAME_CHOICE_INFO);
- v.addElement(PROP_AD + Integer.toString(i) + "_" + PROP_LOCATION + ";"
- + IGeneralNameUtil.GENNAME_VALUE_INFO);
+ v.addElement(PROP_AD
+ + Integer.toString(i) + "_" + PROP_LOCATION_TYPE + ";" + IGeneralNameUtil.GENNAME_CHOICE_INFO);
+ v.addElement(PROP_AD
+ + Integer.toString(i) + "_" + PROP_LOCATION + ";" + IGeneralNameUtil.GENNAME_VALUE_INFO);
}
return com.netscape.cmsutil.util.Utils.getStringArrayFromVector(v);
}
@@ -149,8 +150,8 @@ public class AuthInfoAccessExt extends APolicyRule implements
/**
* Returns a sequence of access descriptions.
*/
- private Enumeration getAccessDescriptions() throws EBaseException {
- Vector ads = new Vector();
+ private Enumeration<Vector<Serializable>> getAccessDescriptions() throws EBaseException {
+ Vector<Vector<Serializable>> ads = new Vector<Vector<Serializable>>();
//
// read until there is *NO* ad<NUM>_method
@@ -200,7 +201,7 @@ public class AuthInfoAccessExt extends APolicyRule implements
if (location == null)
break;
GeneralName gn = CMS.form_GeneralName(location_type, location);
- Vector e = new Vector();
+ Vector<Serializable> e = new Vector<Serializable>();
e.addElement(methodOID);
e.addElement(gn);
@@ -245,7 +246,7 @@ public class AuthInfoAccessExt extends APolicyRule implements
certInfo.get(X509CertInfo.EXTENSIONS);
// add access descriptions
- Enumeration e = getAccessDescriptions();
+ Enumeration<Vector<Serializable>> e = getAccessDescriptions();
if (!e.hasMoreElements()) {
return res;
@@ -261,7 +262,8 @@ public class AuthInfoAccessExt extends APolicyRule implements
// check to see if AIA is already exist
try {
extensions.delete(AuthInfoAccessExtension.NAME);
- log(ILogger.LL_WARN, "Previous extension deleted: " + AuthInfoAccessExtension.NAME);
+ log(ILogger.LL_WARN,
+ "Previous extension deleted: " + AuthInfoAccessExtension.NAME);
} catch (IOException ex) {
}
}
@@ -272,7 +274,7 @@ public class AuthInfoAccessExt extends APolicyRule implements
PROP_CRITICAL, false));
while (e.hasMoreElements()) {
- Vector ad = (Vector) e.nextElement();
+ Vector<Serializable> ad = e.nextElement();
ObjectIdentifier oid = (ObjectIdentifier) ad.elementAt(0);
GeneralName gn = (GeneralName) ad.elementAt(1);
@@ -306,8 +308,8 @@ public class AuthInfoAccessExt extends APolicyRule implements
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getInstanceParams() {
- Vector params = new Vector();
+ public Vector<String> getInstanceParams() {
+ Vector<String> params = new Vector<String>();
try {
params.addElement(PROP_CRITICAL + "=" +
@@ -368,8 +370,8 @@ public class AuthInfoAccessExt extends APolicyRule implements
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getDefaultParams() {
- Vector defParams = new Vector();
+ public Vector<String> getDefaultParams() {
+ Vector<String> defParams = new Vector<String>();
defParams.addElement(PROP_CRITICAL + "=false");
defParams.addElement(PROP_NUM_ADS + "=" + MAX_AD);
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/AuthorityKeyIdentifierExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/AuthorityKeyIdentifierExt.java
index 94a1f19a7..971379a46 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/AuthorityKeyIdentifierExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/AuthorityKeyIdentifierExt.java
@@ -80,10 +80,10 @@ public class AuthorityKeyIdentifierExt extends APolicyRule
protected AuthorityKeyIdentifierExtension mTheExtension = null;
// instance params for console
- protected Vector mInstanceParams = new Vector();
+ protected Vector<String> mInstanceParams = new Vector<String>();
// default params for console.
- protected static Vector mDefaultParams = new Vector();
+ protected static Vector<String> mDefaultParams = new Vector<String>();
static {
// form static default params.
mDefaultParams.addElement(PROP_CRITICAL + "=" + DEF_CRITICAL);
@@ -390,7 +390,7 @@ public class AuthorityKeyIdentifierExt extends APolicyRule
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getInstanceParams() {
+ public Vector<String> getInstanceParams() {
return mInstanceParams;
}
@@ -399,7 +399,7 @@ public class AuthorityKeyIdentifierExt extends APolicyRule
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getDefaultParams() {
+ public Vector<String> getDefaultParams() {
return mDefaultParams;
}
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/BasicConstraintsExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/BasicConstraintsExt.java
index 10aa8630f..1d22d48ec 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/BasicConstraintsExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/BasicConstraintsExt.java
@@ -464,8 +464,8 @@ public class BasicConstraintsExt extends APolicyRule
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getInstanceParams() {
- Vector params = new Vector();
+ public Vector<String> getInstanceParams() {
+ Vector<String> params = new Vector<String>();
// Because of one of the UI bugs 385273, we should leave the empty space
// as is. Do not convert the space to some definite numbers.
@@ -480,8 +480,8 @@ public class BasicConstraintsExt extends APolicyRule
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getDefaultParams() {
- Vector defParams = new Vector();
+ public Vector<String> getDefaultParams() {
+ Vector<String> defParams = new Vector<String>();
defParams.addElement(PROP_IS_CRITICAL + "=true");
defParams.addElement(PROP_MAXPATHLEN + "=");
@@ -501,7 +501,7 @@ public class BasicConstraintsExt extends APolicyRule
";configuration-policyrules-basicconstraints",
IExtendedPluginInfo.HELP_TEXT +
";Adds the Basic Constraints extension. See RFC 2459 (4.2.1.10)"
- };
+ };
return params;
}
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/CRLDistributionPointsExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/CRLDistributionPointsExt.java
index 4ba2a44dc..1ede3d5d0 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/CRLDistributionPointsExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/CRLDistributionPointsExt.java
@@ -75,14 +75,14 @@ class NameType {
stringRep = s;
}
- private static Hashtable map = new Hashtable();
+ private static Hashtable<String, NameType> map = new Hashtable<String, NameType>();
/**
* Looks up a NameType from its string representation. Returns null
* if no matching NameType was found.
*/
public static NameType fromString(String s) {
- return (NameType) map.get(s);
+ return map.get(s);
}
public String toString() {
@@ -144,9 +144,9 @@ public class CRLDistributionPointsExt extends APolicyRule
// PKIX specifies the that the extension SHOULD NOT be critical
public static final boolean DEFAULT_CRITICALITY = false;
- private Vector defaultParams = new Vector();
+ private Vector<String> defaultParams = new Vector<String>();
- private Vector mParams = new Vector();
+ private Vector<String> mParams = new Vector<String>();
private String mExtParams[] = null;
private CRLDistributionPointsExtension mCrldpExt = null;
@@ -165,7 +165,7 @@ public class CRLDistributionPointsExt extends APolicyRule
}
private void setExtendedPluginInfo() {
- Vector v = new Vector();
+ Vector<String> v = new Vector<String>();
// should replace MAX_POINTS with mNumPoints if bug 385118 is fixed
for (int i = 0; i < MAX_POINTS; i++) {
@@ -462,7 +462,7 @@ public class CRLDistributionPointsExt extends APolicyRule
}
// parameters must be entered in the config file
- public Vector getDefaultParams() {
+ public Vector<String> getDefaultParams() {
for (int i = DEFAULT_NUM_BLANK_POINTS; i < mNumPoints; i++) {
defaultParams.addElement(PROP_POINT_NAME + i + "=");
defaultParams.addElement(PROP_POINT_TYPE + i + "=");
@@ -478,7 +478,7 @@ public class CRLDistributionPointsExt extends APolicyRule
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getInstanceParams() {
+ public Vector<String> getInstanceParams() {
return mParams;
}
}
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/CertificatePoliciesExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/CertificatePoliciesExt.java
index e2c31cf5a..7ea2d6fb8 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/CertificatePoliciesExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/CertificatePoliciesExt.java
@@ -79,7 +79,7 @@ public class CertificatePoliciesExt extends APolicyRule
protected int mNumCertPolicies = DEF_NUM_CERTPOLICIES;
protected CertPolicy[] mCertPolicies = null;
- protected Vector mInstanceParams = new Vector();
+ protected Vector<String> mInstanceParams = new Vector<String>();
protected CertificatePoliciesExtension mCertificatePoliciesExtension = null;
public CertificatePoliciesExt() {
@@ -132,7 +132,7 @@ public class CertificatePoliciesExt extends APolicyRule
// create instance of certificate policy extension if enabled.
if (mEnabled) {
try {
- Vector CertPolicies = new Vector();
+ Vector<CertificatePolicyInfo> CertPolicies = new Vector<CertificatePolicyInfo>();
for (int j = 0; j < mNumCertPolicies; j++) {
CertPolicies.addElement(
@@ -239,7 +239,7 @@ public class CertificatePoliciesExt extends APolicyRule
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getInstanceParams() {
+ public Vector<String> getInstanceParams() {
return mInstanceParams;
}
@@ -249,7 +249,7 @@ public class CertificatePoliciesExt extends APolicyRule
* increase the num to greater than 0 and more configuration params
* will show up in the console.
*/
- private static Vector mDefParams = new Vector();
+ private static Vector<String> mDefParams = new Vector<String>();
static {
mDefParams.addElement(PROP_CRITICAL + "=" + DEF_CRITICAL);
mDefParams.addElement(
@@ -274,12 +274,12 @@ public class CertificatePoliciesExt extends APolicyRule
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getDefaultParams() {
+ public Vector<String> getDefaultParams() {
return mDefParams;
}
public String[] getExtendedPluginInfo(Locale locale) {
- Vector theparams = new Vector();
+ Vector<String> theparams = new Vector<String>();
theparams.addElement(PROP_CRITICAL + ";boolean;RFC 3280 recommendation: MUST be non-critical.");
theparams.addElement(PROP_NUM_CERTPOLICIES
@@ -445,7 +445,7 @@ class CertPolicy {
// should add a method to NoticeReference to take a
// Vector...but let's do this for now
- Vector numsVector = new Vector();
+ Vector<String> numsVector = new Vector<String>();
StringTokenizer tokens = new StringTokenizer(mNoticeRefNums,
",");
@@ -458,7 +458,7 @@ class CertPolicy {
nums = new int[numsVector.size()];
for (int i = 0; i < numsVector.size(); i++) {
- Integer ii = new Integer((String) numsVector.elementAt(i));
+ Integer ii = new Integer(numsVector.elementAt(i));
nums[i] = ii.intValue();
}
@@ -516,7 +516,7 @@ class CertPolicy {
}
}
- protected void getInstanceParams(Vector instanceParams) {
+ protected void getInstanceParams(Vector<String> instanceParams) {
instanceParams.addElement(
mNameDot + PROP_POLICY_IDENTIFIER + "=" + (mPolicyId == null ? "" :
mPolicyId));
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/CertificateRenewalWindowExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/CertificateRenewalWindowExt.java
index 305c11b2e..28366ade8 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/CertificateRenewalWindowExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/CertificateRenewalWindowExt.java
@@ -210,7 +210,7 @@ public class CertificateRenewalWindowExt extends APolicyRule
";configuration-policyrules-certificaterenewalwindow",
IExtendedPluginInfo.HELP_TEXT +
";Adds 'Certificate Renewal Window' extension. See manual"
- };
+ };
return params;
@@ -221,8 +221,8 @@ public class CertificateRenewalWindowExt extends APolicyRule
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getInstanceParams() {
- Vector params = new Vector();
+ public Vector<String> getInstanceParams() {
+ Vector<String> params = new Vector<String>();
params.addElement(PROP_CRITICAL + "=" + mCritical);
if (mBeginTime == null) {
@@ -243,8 +243,8 @@ public class CertificateRenewalWindowExt extends APolicyRule
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getDefaultParams() {
- Vector defParams = new Vector();
+ public Vector<String> getDefaultParams() {
+ Vector<String> defParams = new Vector<String>();
defParams.addElement(PROP_CRITICAL + "=false");
defParams.addElement(PROP_BEGIN_TIME + "=");
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/CertificateScopeOfUseExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/CertificateScopeOfUseExt.java
index 88ffb4dff..b385923af 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/CertificateScopeOfUseExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/CertificateScopeOfUseExt.java
@@ -78,7 +78,7 @@ public class CertificateScopeOfUseExt extends APolicyRule implements
}
public String[] getExtendedPluginInfo(Locale locale) {
- Vector v = new Vector();
+ Vector<String> v = new Vector<String>();
v.addElement(PROP_CRITICAL +
";boolean; This extension may be either critical or non-critical.");
@@ -89,10 +89,10 @@ public class CertificateScopeOfUseExt extends APolicyRule implements
for (int i = 0; i < MAX_ENTRY; i++) {
v.addElement(PROP_ENTRY + Integer.toString(i) + "_" + PROP_NAME + ";" + IGeneralNameUtil.GENNAME_VALUE_INFO);
- v.addElement(PROP_ENTRY + Integer.toString(i) + "_" + PROP_NAME_TYPE + ";"
- + IGeneralNameUtil.GENNAME_CHOICE_INFO);
- v.addElement(PROP_ENTRY + Integer.toString(i) + "_" + PROP_PORT_NUMBER + ";string;"
- + "The port number (optional).");
+ v.addElement(PROP_ENTRY
+ + Integer.toString(i) + "_" + PROP_NAME_TYPE + ";" + IGeneralNameUtil.GENNAME_CHOICE_INFO);
+ v.addElement(PROP_ENTRY
+ + Integer.toString(i) + "_" + PROP_PORT_NUMBER + ";string;" + "The port number (optional).");
}
return com.netscape.cmsutil.util.Utils.getStringArrayFromVector(v);
}
@@ -116,8 +116,8 @@ public class CertificateScopeOfUseExt extends APolicyRule implements
/**
* Returns a sequence of scope entry.
*/
- private Vector getScopeEntries() throws EBaseException {
- Vector entries = new Vector();
+ private Vector<CertificateScopeEntry> getScopeEntries() throws EBaseException {
+ Vector<CertificateScopeEntry> entries = new Vector<CertificateScopeEntry>();
//
// read until there is *NO* ad<NUM>_method
@@ -190,7 +190,7 @@ public class CertificateScopeOfUseExt extends APolicyRule implements
certInfo.get(X509CertInfo.EXTENSIONS);
// add access descriptions
- Vector entries = getScopeEntries();
+ Vector<CertificateScopeEntry> entries = getScopeEntries();
if (entries.size() == 0) {
return res;
@@ -247,8 +247,8 @@ public class CertificateScopeOfUseExt extends APolicyRule implements
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getInstanceParams() {
- Vector params = new Vector();
+ public Vector<String> getInstanceParams() {
+ Vector<String> params = new Vector<String>();
try {
params.addElement(PROP_CRITICAL + "=" +
@@ -303,8 +303,8 @@ public class CertificateScopeOfUseExt extends APolicyRule implements
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getDefaultParams() {
- Vector defParams = new Vector();
+ public Vector<String> getDefaultParams() {
+ Vector<String> defParams = new Vector<String>();
defParams.addElement(PROP_CRITICAL + "=false");
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/ExtendedKeyUsageExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/ExtendedKeyUsageExt.java
index 98ab09166..65ef6b937 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/ExtendedKeyUsageExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/ExtendedKeyUsageExt.java
@@ -59,7 +59,7 @@ public class ExtendedKeyUsageExt extends APolicyRule
protected static int MAX_PURPOSE_ID = 10;
private boolean mCritical = false;
private IConfigStore mConfig = null;
- private Vector mUsages = null;
+ private Vector<ObjectIdentifier> mUsages = null;
private String[] mParams = null;
@@ -156,8 +156,8 @@ public class ExtendedKeyUsageExt extends APolicyRule
/**
* Returns instance specific parameters.
*/
- public Vector getInstanceParams() {
- Vector params = new Vector();
+ public Vector<String> getInstanceParams() {
+ Vector<String> params = new Vector<String>();
params.addElement(PROP_CRITICAL + "=" + mCritical);
int numIds = MAX_PURPOSE_ID;
@@ -188,7 +188,7 @@ public class ExtendedKeyUsageExt extends APolicyRule
}
private void setExtendedPluginInfo() {
- Vector v = new Vector();
+ Vector<String> v = new Vector<String>();
int mNum = MAX_PURPOSE_ID;
if (mConfig != null) {
@@ -228,8 +228,8 @@ public class ExtendedKeyUsageExt extends APolicyRule
/**
* Returns default parameters.
*/
- public Vector getDefaultParams() {
- Vector defParams = new Vector();
+ public Vector<String> getDefaultParams() {
+ Vector<String> defParams = new Vector<String>();
defParams.addElement(PROP_CRITICAL + "=false");
defParams.addElement(PROP_NUM_IDS + "=" + MAX_PURPOSE_ID);
@@ -246,7 +246,7 @@ public class ExtendedKeyUsageExt extends APolicyRule
mCritical = mConfig.getBoolean(PROP_CRITICAL, false);
if (mUsages == null) {
- mUsages = new Vector();
+ mUsages = new Vector<ObjectIdentifier>();
}
int mNum = mConfig.getInteger(PROP_NUM_IDS, MAX_PURPOSE_ID);
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/GenericASN1Ext.java b/pki/base/common/src/com/netscape/cms/policy/extensions/GenericASN1Ext.java
index 495788a1a..0202ee784 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/GenericASN1Ext.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/GenericASN1Ext.java
@@ -388,7 +388,7 @@ public class GenericASN1Ext extends APolicyRule implements
// Create the extension
GenericASN1Extension priExt = mkExtension();
- extensions.set(GenericASN1Extension.NAME, priExt);
+ extensions.set(priExt.getName(), priExt);
} catch (IOException e) {
log(ILogger.LL_FAILURE, CMS.getLogMessage("BASE_IO_ERROR", e.getMessage()));
@@ -429,9 +429,9 @@ public class GenericASN1Ext extends APolicyRule implements
throws IOException, EBaseException, ParseException {
GenericASN1Extension ext;
- Hashtable h = new Hashtable();
+ Hashtable<String, String> h = new Hashtable<String, String>();
// This only show one level, not substores!
- Enumeration e = mConfig.getPropertyNames();
+ Enumeration<String> e = mConfig.getPropertyNames();
while (e.hasMoreElements()) {
String n = (String) e.nextElement();
@@ -456,9 +456,9 @@ public class GenericASN1Ext extends APolicyRule implements
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getInstanceParams() {
+ public Vector<String> getInstanceParams() {
int idx = 0;
- Vector params = new Vector();
+ Vector<String> params = new Vector<String>();
try {
params.addElement(PROP_CRITICAL + "=" + mConfig.getBoolean(PROP_CRITICAL, false));
@@ -488,10 +488,10 @@ public class GenericASN1Ext extends APolicyRule implements
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getDefaultParams() {
+ public Vector<String> getDefaultParams() {
int idx = 0;
- Vector defParams = new Vector();
+ Vector<String> defParams = new Vector<String>();
defParams.addElement(PROP_CRITICAL + "=false");
defParams.addElement(PROP_NAME + "=");
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/IssuerAltNameExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/IssuerAltNameExt.java
index b76651ea6..21afaa188 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/IssuerAltNameExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/IssuerAltNameExt.java
@@ -62,14 +62,14 @@ public class IssuerAltNameExt extends APolicyRule
// PKIX specifies the that the extension SHOULD NOT be critical
public static final boolean DEFAULT_CRITICALITY = false;
- private static Vector defaultParams = new Vector();
+ private static Vector<String> defaultParams = new Vector<String>();
private static String[] mInfo = null;
static {
defaultParams.addElement(PROP_CRITICAL + "=" + DEFAULT_CRITICALITY);
CMS.getGeneralNamesConfigDefaultParams(null, true, defaultParams);
- Vector info = new Vector();
+ Vector<String> info = new Vector<String>();
info.addElement(PROP_CRITICAL + ";boolean;RFC 2459 recommendation: SHOULD NOT be marked critical.");
info.addElement(IExtendedPluginInfo.HELP_TOKEN +
@@ -84,7 +84,7 @@ public class IssuerAltNameExt extends APolicyRule
info.copyInto(mInfo);
}
- private Vector mParams = new Vector();
+ private Vector<String> mParams = new Vector<String>();
private IConfigStore mConfig = null;
private boolean mCritical = DEFAULT_CRITICALITY;
private boolean mEnabled = false;
@@ -230,7 +230,7 @@ public class IssuerAltNameExt extends APolicyRule
* @return Empty Vector since this policy has no configuration parameters.
* for this policy instance.
*/
- public Vector getInstanceParams() {
+ public Vector<String> getInstanceParams() {
return mParams;
}
@@ -240,7 +240,7 @@ public class IssuerAltNameExt extends APolicyRule
* @return Empty Vector since this policy implementation has no
* configuration parameters.
*/
- public Vector getDefaultParams() {
+ public Vector<String> getDefaultParams() {
return defaultParams;
}
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/KeyUsageExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/KeyUsageExt.java
index e89aa8488..037206b89 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/KeyUsageExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/KeyUsageExt.java
@@ -282,8 +282,8 @@ public class KeyUsageExt extends APolicyRule
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getInstanceParams() {
- Vector params = new Vector();
+ public Vector<String> getInstanceParams() {
+ Vector<String> params = new Vector<String>();
params.addElement(PROP_CRITICAL + "=" + mCritical);
params.addElement(PROP_DIGITAL_SIGNATURE + "=" + mDigitalSignature);
@@ -298,7 +298,7 @@ public class KeyUsageExt extends APolicyRule
return params;
}
- private static Vector mDefParams = new Vector();
+ private static Vector<String> mDefParams = new Vector<String>();
static {
mDefParams.addElement(PROP_CRITICAL + "=true");
mDefParams.addElement(PROP_DIGITAL_SIGNATURE + "=");
@@ -348,7 +348,7 @@ public class KeyUsageExt extends APolicyRule
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getDefaultParams() {
+ public Vector<String> getDefaultParams() {
return mDefParams;
}
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/NSCCommentExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/NSCCommentExt.java
index 7540191f3..f3ae4efa4 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/NSCCommentExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/NSCCommentExt.java
@@ -71,7 +71,7 @@ public class NSCCommentExt extends APolicyRule
protected String mCommentFile;
protected String mInputType;
protected boolean mCritical;
- private Vector mParams = new Vector();
+ private Vector<String> mParams = new Vector<String>();
protected String tempCommentFile;
protected boolean certApplied = false;
@@ -276,7 +276,7 @@ public class NSCCommentExt extends APolicyRule
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getInstanceParams() {
+ public Vector<String> getInstanceParams() {
return mParams;
}
@@ -285,8 +285,8 @@ public class NSCCommentExt extends APolicyRule
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getDefaultParams() {
- Vector defParams = new Vector();
+ public Vector<String> getDefaultParams() {
+ Vector<String> defParams = new Vector<String>();
defParams.addElement(PROP_CRITICAL + "=false");
defParams.addElement(PROP_INPUT_TYPE + "=" + TEXT);
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/NSCertTypeExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/NSCertTypeExt.java
index 195a8792a..8903535dd 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/NSCertTypeExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/NSCertTypeExt.java
@@ -494,8 +494,8 @@ public class NSCertTypeExt extends APolicyRule
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getInstanceParams() {
- Vector params = new Vector();
+ public Vector<String> getInstanceParams() {
+ Vector<String> params = new Vector<String>();
params.addElement(PROP_CRITICAL + "=" + mCritical);
params.addElement(PROP_SET_DEFAULT_BITS + "=" + mSetDefaultBits);
@@ -503,7 +503,7 @@ public class NSCertTypeExt extends APolicyRule
return params;
}
- private static Vector mDefParams = new Vector();
+ private static Vector<String> mDefParams = new Vector<String>();
static {
mDefParams.addElement(
PROP_CRITICAL + "=false");
@@ -532,7 +532,7 @@ public class NSCertTypeExt extends APolicyRule
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getDefaultParams() {
+ public Vector<String> getDefaultParams() {
return mDefParams;
}
}
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/NameConstraintsExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/NameConstraintsExt.java
index 3492ea5ed..f010bf3f1 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/NameConstraintsExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/NameConstraintsExt.java
@@ -79,7 +79,7 @@ public class NameConstraintsExt extends APolicyRule
protected Subtree[] mExcludedSubtrees = null;
protected NameConstraintsExtension mNameConstraintsExtension = null;
- protected Vector mInstanceParams = new Vector();
+ protected Vector<String> mInstanceParams = new Vector<String>();
public NameConstraintsExt() {
NAME = "NameConstraintsExt";
@@ -157,13 +157,13 @@ public class NameConstraintsExt extends APolicyRule
// create instance of name constraints extension if enabled.
if (mEnabled) {
try {
- Vector permittedSubtrees = new Vector();
+ Vector<GeneralSubtree> permittedSubtrees = new Vector<GeneralSubtree>();
for (int i = 0; i < mNumPermittedSubtrees; i++) {
permittedSubtrees.addElement(
mPermittedSubtrees[i].mGeneralSubtree);
}
- Vector excludedSubtrees = new Vector();
+ Vector<GeneralSubtree> excludedSubtrees = new Vector<GeneralSubtree>();
for (int j = 0; j < mNumExcludedSubtrees; j++) {
excludedSubtrees.addElement(
@@ -323,7 +323,7 @@ public class NameConstraintsExt extends APolicyRule
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getInstanceParams() {
+ public Vector<String> getInstanceParams() {
return mInstanceParams;
}
@@ -333,7 +333,7 @@ public class NameConstraintsExt extends APolicyRule
* increase the num to greater than 0 and more configuration params
* will show up in the console.
*/
- private static Vector mDefParams = new Vector();
+ private static Vector<String> mDefParams = new Vector<String>();
static {
mDefParams.addElement(PROP_CRITICAL + "=" + DEF_CRITICAL);
mDefParams.addElement(
@@ -353,12 +353,12 @@ public class NameConstraintsExt extends APolicyRule
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getDefaultParams() {
+ public Vector<String> getDefaultParams() {
return mDefParams;
}
public String[] getExtendedPluginInfo(Locale locale) {
- Vector theparams = new Vector();
+ Vector<String> theparams = new Vector<String>();
theparams.addElement(PROP_CRITICAL + ";boolean;RFC 2459 recommendation: MUST be critical.");
theparams.addElement(
@@ -447,13 +447,13 @@ class Subtree {
}
}
- void getInstanceParams(Vector instanceParams) {
+ void getInstanceParams(Vector<String> instanceParams) {
mBase.getInstanceParams(instanceParams);
instanceParams.addElement(mNameDotMin + "=" + mMin);
instanceParams.addElement(mNameDotMax + "=" + mMax);
}
- static void getDefaultParams(String name, Vector params) {
+ static void getDefaultParams(String name, Vector<String> params) {
String nameDot = "";
if (name != null && name.length() >= 0)
@@ -463,7 +463,7 @@ class Subtree {
params.addElement(nameDot + PROP_MAX + "=" + DEF_MAX);
}
- static void getExtendedPluginInfo(String name, Vector info) {
+ static void getExtendedPluginInfo(String name, Vector<String> info) {
String nameDot = "";
if (name != null && name.length() > 0)
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/OCSPNoCheckExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/OCSPNoCheckExt.java
index 2bb3ff803..33f2f85e0 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/OCSPNoCheckExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/OCSPNoCheckExt.java
@@ -169,8 +169,8 @@ public class OCSPNoCheckExt extends APolicyRule
/**
* Returns instance parameters.
*/
- public Vector getInstanceParams() {
- Vector params = new Vector();
+ public Vector<String> getInstanceParams() {
+ Vector<String> params = new Vector<String>();
params.addElement(PROP_CRITICAL + "=" + mCritical);
return params;
@@ -180,8 +180,8 @@ public class OCSPNoCheckExt extends APolicyRule
/**
* Returns default parameters.
*/
- public Vector getDefaultParams() {
- Vector defParams = new Vector();
+ public Vector<String> getDefaultParams() {
+ Vector<String> defParams = new Vector<String>();
defParams.addElement(PROP_CRITICAL + "=false");
return defParams;
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/PolicyConstraintsExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/PolicyConstraintsExt.java
index ec6762701..861107b8e 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/PolicyConstraintsExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/PolicyConstraintsExt.java
@@ -71,9 +71,9 @@ public class PolicyConstraintsExt extends APolicyRule
protected int mInhibitPolicyMapping = DEF_INHIBIT_POLICY_MAPPING;
protected PolicyConstraintsExtension mPolicyConstraintsExtension = null;
- protected Vector mInstanceParams = new Vector();
+ protected Vector<String> mInstanceParams = new Vector<String>();
- protected static Vector mDefaultParams = new Vector();
+ protected static Vector<String> mDefaultParams = new Vector<String>();
static {
mDefaultParams.addElement(PROP_CRITICAL + "=" + DEF_CRITICAL);
mDefaultParams.addElement(
@@ -250,7 +250,7 @@ public class PolicyConstraintsExt extends APolicyRule
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getInstanceParams() {
+ public Vector<String> getInstanceParams() {
return mInstanceParams;
}
@@ -259,7 +259,7 @@ public class PolicyConstraintsExt extends APolicyRule
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getDefaultParams() {
+ public Vector<String> getDefaultParams() {
return mDefaultParams;
}
@@ -280,7 +280,7 @@ public class PolicyConstraintsExt extends APolicyRule
PROP_INHIBIT_POLICY_MAPPING
+ ";integer;Number of addional certificates that may appear in the path before policy mapping is no longer permitted. If less than 0 this field is unset in the extension.",
IExtendedPluginInfo.HELP_TOKEN + ";configuration-policyrules-policyconstraints"
- };
+ };
return params;
}
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/PolicyMappingsExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/PolicyMappingsExt.java
index f3ef6c710..7623f455f 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/PolicyMappingsExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/PolicyMappingsExt.java
@@ -74,7 +74,7 @@ public class PolicyMappingsExt extends APolicyRule
protected PolicyMap[] mPolicyMaps = null;
protected PolicyMappingsExtension mPolicyMappingsExtension = null;
- protected Vector mInstanceParams = new Vector();
+ protected Vector<String> mInstanceParams = new Vector<String>();
public PolicyMappingsExt() {
NAME = "PolicyMappingsExt";
@@ -146,7 +146,7 @@ public class PolicyMappingsExt extends APolicyRule
// create instance of policy mappings extension if enabled.
if (mEnabled) {
try {
- Vector certPolicyMaps = new Vector();
+ Vector<CertificatePolicyMap> certPolicyMaps = new Vector<CertificatePolicyMap>();
for (int j = 0; j < mNumPolicyMappings; j++) {
certPolicyMaps.addElement(
@@ -261,7 +261,7 @@ public class PolicyMappingsExt extends APolicyRule
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getInstanceParams() {
+ public Vector<String> getInstanceParams() {
return mInstanceParams;
}
@@ -271,7 +271,7 @@ public class PolicyMappingsExt extends APolicyRule
* increase the num to greater than 0 and more configuration params
* will show up in the console.
*/
- private static Vector mDefParams = new Vector();
+ private static Vector<String> mDefParams = new Vector<String>();
static {
mDefParams.addElement(PROP_CRITICAL + "=" + DEF_CRITICAL);
mDefParams.addElement(
@@ -289,12 +289,12 @@ public class PolicyMappingsExt extends APolicyRule
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getDefaultParams() {
+ public Vector<String> getDefaultParams() {
return mDefParams;
}
public String[] getExtendedPluginInfo(Locale locale) {
- Vector theparams = new Vector();
+ Vector<String> theparams = new Vector<String>();
theparams.addElement(PROP_CRITICAL + ";boolean;RFC 2459 recommendation: MUST be non-critical.");
theparams.addElement(PROP_NUM_POLICYMAPPINGS
@@ -414,7 +414,7 @@ class PolicyMap {
}
}
- protected void getInstanceParams(Vector instanceParams) {
+ protected void getInstanceParams(Vector<String> instanceParams) {
instanceParams.addElement(
mNameDot + PROP_ISSUER_DOMAIN_POLICY + "=" + (mIssuerDomainPolicy == null ? "" :
mIssuerDomainPolicy));
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/PresenceExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/PresenceExt.java
index 4ce870950..e13a7a84c 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/PresenceExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/PresenceExt.java
@@ -41,7 +41,7 @@ import com.netscape.cms.policy.APolicyRule;
* @version $Revision$, $Date$
*/
public class PresenceExt extends APolicyRule {
- private static Vector mDefParams = new Vector();
+ private static Vector<String> mDefParams = new Vector<String>();
private IConfigStore mConfig = null;
private String mOID = null;
private boolean mCritical;
@@ -106,8 +106,8 @@ public class PresenceExt extends APolicyRule {
return res;
}
- public Vector getInstanceParams() {
- Vector params = new Vector();
+ public Vector<String> getInstanceParams() {
+ Vector<String> params = new Vector<String>();
params.addElement(PROP_IS_CRITICAL + "=" + mCritical);
params.addElement(PROP_OID + "=" + mOID);
@@ -151,7 +151,7 @@ public class PresenceExt extends APolicyRule {
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getDefaultParams() {
+ public Vector<String> getDefaultParams() {
return mDefParams;
}
}
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/PrivateKeyUsagePeriodExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/PrivateKeyUsagePeriodExt.java
index eaf19bb33..52c8f1f69 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/PrivateKeyUsagePeriodExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/PrivateKeyUsagePeriodExt.java
@@ -78,13 +78,13 @@ public class PrivateKeyUsagePeriodExt extends APolicyRule
protected String mNotAfter;
protected boolean mCritical;
- private static Vector defaultParams;
+ private static Vector<String> defaultParams;
static {
formatter.setLenient(false);
- defaultParams = new Vector();
+ defaultParams = new Vector<String>();
defaultParams.addElement(PROP_IS_CRITICAL + "=" + DEFAULT_CRITICALITY);
defaultParams.addElement(PROP_NOT_BEFORE + "=" + DEFAULT_NOT_BEFORE);
defaultParams.addElement(PROP_NOT_AFTER + "=" + DEFAULT_NOT_AFTER);
@@ -230,8 +230,8 @@ public class PrivateKeyUsagePeriodExt extends APolicyRule
* @return Empty Vector since this policy has no configuration parameters.
* for this policy instance.
*/
- public Vector getInstanceParams() {
- Vector params = new Vector();
+ public Vector<String> getInstanceParams() {
+ Vector<String> params = new Vector<String>();
params.addElement(PROP_IS_CRITICAL + "=" + mCritical);
params.addElement(PROP_NOT_BEFORE + "=" + mNotBefore);
@@ -245,8 +245,8 @@ public class PrivateKeyUsagePeriodExt extends APolicyRule
* @return Empty Vector since this policy implementation has no
* configuration parameters.
*/
- public Vector getDefaultParams() {
- Vector defParams = new Vector();
+ public Vector<String> getDefaultParams() {
+ Vector<String> defParams = new Vector<String>();
defParams.addElement(PROP_IS_CRITICAL + "=" + DEFAULT_CRITICALITY);
defParams.addElement(PROP_NOT_BEFORE + "=" + DEFAULT_NOT_BEFORE);
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/RemoveBasicConstraintsExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/RemoveBasicConstraintsExt.java
index 197d1585e..0af977a24 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/RemoveBasicConstraintsExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/RemoveBasicConstraintsExt.java
@@ -113,8 +113,8 @@ public class RemoveBasicConstraintsExt extends APolicyRule
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getInstanceParams() {
- Vector params = new Vector();
+ public Vector<String> getInstanceParams() {
+ Vector<String> params = new Vector<String>();
return params;
}
@@ -124,8 +124,8 @@ public class RemoveBasicConstraintsExt extends APolicyRule
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getDefaultParams() {
- Vector defParams = new Vector();
+ public Vector<String> getDefaultParams() {
+ Vector<String> defParams = new Vector<String>();
return defParams;
}
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/SubjAltNameExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/SubjAltNameExt.java
index 8152db07b..63bd8804c 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/SubjAltNameExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/SubjAltNameExt.java
@@ -107,7 +107,7 @@ public class SubjAltNameExt extends APolicyRule
"the 'mail' or 'mailalternateaddress' values in the authToken. " +
"See the 'ldapStringAttrs' parameter in the Directory-based " +
"authentication plugin"
- };
+ };
return params;
@@ -208,7 +208,7 @@ public class SubjAltNameExt extends APolicyRule
if (tok == null)
break apply;
- Vector emails = getEmailList(tok);
+ Vector<String> emails = getEmailList(tok);
if (emails == null)
break apply;
@@ -251,10 +251,10 @@ public class SubjAltNameExt extends APolicyRule
* Generate a String Vector containing all the email addresses
* found in this Authentication token
*/
- protected Vector /* of String */
- getEmailList(IAuthToken tok) {
+ protected Vector /* of String */<String>
+ getEmailList(IAuthToken tok) {
- Vector v = new Vector();
+ Vector<String> v = new Vector<String>();
addValues(tok, "mail", v);
addValues(tok, "mailalternateaddress", v);
@@ -269,7 +269,7 @@ public class SubjAltNameExt extends APolicyRule
* Add attribute values from an LDAP attribute to a vector
*/
protected void
- addValues(IAuthToken tok, String attrName, Vector v) {
+ addValues(IAuthToken tok, String attrName, Vector<String> v) {
String attr[] = tok.getInStringArray(attrName);
if (attr == null)
@@ -284,13 +284,13 @@ public class SubjAltNameExt extends APolicyRule
* Make a Subject name extension given a list of email addresses
*/
protected SubjectAlternativeNameExtension
- mkExt(Vector emails)
+ mkExt(Vector<String> emails)
throws IOException {
SubjectAlternativeNameExtension sa;
GeneralNames gns = new GeneralNames();
for (int i = 0; i < emails.size(); i++) {
- String email = (String) emails.elementAt(i);
+ String email = emails.elementAt(i);
gns.addElement(new RFC822Name(email));
}
@@ -326,8 +326,8 @@ public class SubjAltNameExt extends APolicyRule
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getInstanceParams() {
- Vector params = new Vector();
+ public Vector<String> getInstanceParams() {
+ Vector<String> params = new Vector<String>();
//params.addElement("PROP_AGENT_OVERR = " + mAllowAgentOverride);
//params.addElement("PROP_EE_OVERR = " + mAllowEEOverride);
@@ -342,8 +342,8 @@ public class SubjAltNameExt extends APolicyRule
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getDefaultParams() {
- Vector defParams = new Vector();
+ public Vector<String> getDefaultParams() {
+ Vector<String> defParams = new Vector<String>();
//defParams.addElement("PROP_AGENT_OVERR = " + DEF_AGENT_OVERR);
//defParams.addElement("PROP_EE_OVERR = " + DEF_EE_OVERR);
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectAltNameExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectAltNameExt.java
index 9a54a7aad..62f0b21da 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectAltNameExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectAltNameExt.java
@@ -80,10 +80,10 @@ public class SubjectAltNameExt extends APolicyRule
protected int mNumGNs = 0;
protected ISubjAltNameConfig[] mGNs = null;
- Vector mInstanceParams = new Vector();
+ Vector<String> mInstanceParams = new Vector<String>();
// init default params and extended plugin info.
- private static Vector mDefParams = new Vector();
+ private static Vector<String> mDefParams = new Vector<String>();
static {
// default params.
mDefParams.addElement(PROP_CRITICAL + "=" + DEF_CRITICAL);
@@ -211,12 +211,12 @@ public class SubjectAltNameExt extends APolicyRule
if (value == null) {
continue;
}
- Vector gn = mGNs[i].formGeneralNames(value);
+ Vector<GeneralName> gn = mGNs[i].formGeneralNames(value);
if (gn.size() == 0)
continue;
- for (Enumeration n = gn.elements(); n.hasMoreElements();) {
- gns.addElement((GeneralName) n.nextElement());
+ for (Enumeration<GeneralName> n = gn.elements(); n.hasMoreElements();) {
+ gns.addElement(n.nextElement());
}
}
@@ -288,7 +288,7 @@ public class SubjectAltNameExt extends APolicyRule
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getInstanceParams() {
+ public Vector<String> getInstanceParams() {
return mInstanceParams;
}
@@ -297,14 +297,14 @@ public class SubjectAltNameExt extends APolicyRule
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getDefaultParams() {
+ public Vector<String> getDefaultParams() {
return mDefParams;
}
public String[] getExtendedPluginInfo(Locale locale) {
// extended plugin info.
- Vector info = new Vector();
+ Vector<String> info = new Vector<String>();
info.addElement(PROP_CRITICAL
+ ";boolean;RFC2459 recommendation: If the certificate subject field contains an empty sequence, the extension MUST be marked critical.");
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectDirectoryAttributesExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectDirectoryAttributesExt.java
index f7e18e8ca..6c1c6a4e8 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectDirectoryAttributesExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectDirectoryAttributesExt.java
@@ -73,9 +73,9 @@ public class SubjectDirectoryAttributesExt extends APolicyRule
protected IConfigStore mConfig;
protected SubjectDirAttributesExtension mExt = null;
- protected Vector mParams = new Vector();
+ protected Vector<String> mParams = new Vector<String>();
private String[] mEPI = null; // extended plugin info
- protected static Vector mDefParams = new Vector();
+ protected static Vector<String> mDefParams = new Vector<String>();
static {
setDefaultParams();
@@ -190,11 +190,11 @@ public class SubjectDirectoryAttributesExt extends APolicyRule
}
}
- public Vector getInstanceParams() {
+ public Vector<String> getInstanceParams() {
return mParams; // inited in init()
}
- public Vector getDefaultParams() {
+ public Vector<String> getDefaultParams() {
return mDefParams;
}
@@ -223,7 +223,7 @@ public class SubjectDirectoryAttributesExt extends APolicyRule
}
private void setExtendedPluginInfo() {
- Vector v = new Vector();
+ Vector<String> v = new Vector<String>();
v.addElement(PROP_CRITICAL + ";boolean;" +
"RFC 2459 recommendation: MUST be non-critical.");
@@ -245,7 +245,7 @@ public class SubjectDirectoryAttributesExt extends APolicyRule
private SubjectDirAttributesExtension formExt(IRequest req)
throws IOException {
- Vector attrs = new Vector();
+ Vector<Attribute> attrs = new Vector<Attribute>();
// if we're called from init and one attribute is from request attribute
// the ext can't be formed yet.
@@ -369,7 +369,7 @@ class AttributeConfig {
}
}
- public static void getDefaultParams(String name, Vector v) {
+ public static void getDefaultParams(String name, Vector<String> v) {
String nameDot = name + ".";
v.addElement(nameDot + PROP_ATTRIBUTE_NAME + "=");
@@ -377,7 +377,7 @@ class AttributeConfig {
v.addElement(nameDot + PROP_VALUE + "=");
}
- public static void getExtendedPluginInfo(String name, Vector v) {
+ public static void getExtendedPluginInfo(String name, Vector<String> v) {
String nameDot = name + ".";
String attrChoices = getAllNames();
@@ -387,7 +387,7 @@ class AttributeConfig {
v.addElement(nameDot + VALUE_INFO);
}
- public void getInstanceParams(Vector v) {
+ public void getInstanceParams(Vector<String> v) {
String nameDot = mName + ".";
v.addElement(nameDot + PROP_ATTRIBUTE_NAME + "=" + mAttributeName);
@@ -407,9 +407,9 @@ class AttributeConfig {
}
static private String getAllNames() {
- Enumeration n = X500NameAttrMap.getDefault().getAllNames();
+ Enumeration<String> n = X500NameAttrMap.getDefault().getAllNames();
StringBuffer sb = new StringBuffer();
- sb.append((String) n.nextElement());
+ sb.append(n.nextElement());
while (n.hasMoreElements()) {
sb.append(",");
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectKeyIdentifierExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectKeyIdentifierExt.java
index 73649dd61..32d254c40 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectKeyIdentifierExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectKeyIdentifierExt.java
@@ -80,9 +80,9 @@ public class SubjectKeyIdentifierExt extends APolicyRule
protected String mKeyIdType = DEF_KEYID_TYPE;;
protected String mReqAttrName = DEF_REQATTR_NAME;
- protected Vector mInstanceParams = new Vector();
+ protected Vector<String> mInstanceParams = new Vector<String>();
- protected static Vector mDefaultParams = new Vector();
+ protected static Vector<String> mDefaultParams = new Vector<String>();
static {
// form static default params.
mDefaultParams.addElement(PROP_CRITICAL + "=" + DEF_CRITICAL);
@@ -342,7 +342,7 @@ public class SubjectKeyIdentifierExt extends APolicyRule
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getInstanceParams() {
+ public Vector<String> getInstanceParams() {
return mInstanceParams;
}
@@ -351,7 +351,7 @@ public class SubjectKeyIdentifierExt extends APolicyRule
*
* @return nvPairs A Vector of name/value pairs.
*/
- public Vector getDefaultParams() {
+ public Vector<String> getDefaultParams() {
return mDefaultParams;
}