summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/cms/profile/def/UserExtensionDefault.java
diff options
context:
space:
mode:
Diffstat (limited to 'pki/base/common/src/com/netscape/cms/profile/def/UserExtensionDefault.java')
-rw-r--r--pki/base/common/src/com/netscape/cms/profile/def/UserExtensionDefault.java32
1 files changed, 15 insertions, 17 deletions
diff --git a/pki/base/common/src/com/netscape/cms/profile/def/UserExtensionDefault.java b/pki/base/common/src/com/netscape/cms/profile/def/UserExtensionDefault.java
index c834eee19..46a78c731 100644
--- a/pki/base/common/src/com/netscape/cms/profile/def/UserExtensionDefault.java
+++ b/pki/base/common/src/com/netscape/cms/profile/def/UserExtensionDefault.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.cms.profile.def;
-
import java.util.Locale;
import netscape.security.x509.CertificateExtensions;
@@ -34,12 +33,11 @@ import com.netscape.certsrv.property.EPropertyException;
import com.netscape.certsrv.property.IDescriptor;
import com.netscape.certsrv.request.IRequest;
-
/**
* This class implements an enrollment default policy
* that populates a user-supplied extension
* into the certificate template.
- *
+ *
* @version $Revision$, $Date$
*/
public class UserExtensionDefault extends EnrollExtDefault {
@@ -57,11 +55,11 @@ public class UserExtensionDefault extends EnrollExtDefault {
}
public void init(IProfile profile, IConfigStore config)
- throws EProfileException {
+ throws EProfileException {
super.init(profile, config);
}
- public IDescriptor getConfigDescriptor(Locale locale, String name) {
+ public IDescriptor getConfigDescriptor(Locale locale, String name) {
if (name.equals(CONFIG_OID)) {
return new Descriptor(IDescriptor.STRING, null,
"Comment Here...",
@@ -83,16 +81,16 @@ public class UserExtensionDefault extends EnrollExtDefault {
}
public void setValue(String name, Locale locale,
- X509CertInfo info, String value)
- throws EPropertyException {
+ X509CertInfo info, String value)
+ throws EPropertyException {
// Nothing to do for read-only values
}
public String getValue(String name, Locale locale,
- X509CertInfo info)
- throws EPropertyException {
- if (name == null) {
- throw new EPropertyException(CMS.getUserMessage(
+ X509CertInfo info)
+ throws EPropertyException {
+ if (name == null) {
+ throw new EPropertyException(CMS.getUserMessage(
locale, "CMS_INVALID_PROPERTY", name));
}
if (name.equals(VAL_OID)) {
@@ -104,7 +102,7 @@ public class UserExtensionDefault extends EnrollExtDefault {
}
return ext.getExtensionId().toString();
} else {
- throw new EPropertyException(CMS.getUserMessage(
+ throw new EPropertyException(CMS.getUserMessage(
locale, "CMS_INVALID_PROPERTY", name));
}
}
@@ -117,22 +115,22 @@ public class UserExtensionDefault extends EnrollExtDefault {
* Populates the request with this policy default.
*/
public void populate(IRequest request, X509CertInfo info)
- throws EProfileException {
+ throws EProfileException {
CertificateExtensions inExts = null;
String oid = getConfig(CONFIG_OID);
inExts = request.getExtDataInCertExts(IEnrollProfile.REQUEST_EXTENSIONS);
if (inExts == null)
- return;
+ return;
Extension ext = getExtension(getConfig(CONFIG_OID), inExts);
if (ext == null) {
- CMS.debug("UserExtensionDefault: no user ext supplied for "+ oid);
- return;
+ CMS.debug("UserExtensionDefault: no user ext supplied for " + oid);
+ return;
}
// user supplied the ext that's allowed, replace the def set by system
deleteExtension(oid, info);
- CMS.debug("UserExtensionDefault: using user supplied ext for "+ oid);
+ CMS.debug("UserExtensionDefault: using user supplied ext for " + oid);
addExtension(oid, ext, info);
}
}