summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/cms/profile/input/SubjectDNInput.java
diff options
context:
space:
mode:
Diffstat (limited to 'pki/base/common/src/com/netscape/cms/profile/input/SubjectDNInput.java')
-rw-r--r--pki/base/common/src/com/netscape/cms/profile/input/SubjectDNInput.java41
1 files changed, 19 insertions, 22 deletions
diff --git a/pki/base/common/src/com/netscape/cms/profile/input/SubjectDNInput.java b/pki/base/common/src/com/netscape/cms/profile/input/SubjectDNInput.java
index 4a8f60505..a12351f8a 100644
--- a/pki/base/common/src/com/netscape/cms/profile/input/SubjectDNInput.java
+++ b/pki/base/common/src/com/netscape/cms/profile/input/SubjectDNInput.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.cms.profile.input;
-
import java.util.Enumeration;
import java.util.Locale;
import java.util.Vector;
@@ -37,11 +36,10 @@ import com.netscape.certsrv.property.IDescriptor;
import com.netscape.certsrv.request.IRequest;
import com.netscape.cms.profile.common.EnrollProfile;
-
/**
* This plugin accepts subject DN from end user.
*/
-public class SubjectDNInput extends EnrollInput implements IProfileInput {
+public class SubjectDNInput extends EnrollInput implements IProfileInput {
public static final String VAL_SUBJECT = "subject";
@@ -52,7 +50,7 @@ public class SubjectDNInput extends EnrollInput implements IProfileInput {
* Initializes this default policy.
*/
public void init(IProfile profile, IConfigStore config)
- throws EProfileException {
+ throws EProfileException {
super.init(profile, config);
}
@@ -70,37 +68,36 @@ public class SubjectDNInput extends EnrollInput implements IProfileInput {
return CMS.getUserMessage(locale, "CMS_PROFILE_INPUT_SUBJECT_NAME_TEXT");
}
-
public String getConfig(String name) {
- String config = super.getConfig(name);
- if (config == null || config.equals(""))
- return "true";
- return config;
+ String config = super.getConfig(name);
+ if (config == null || config.equals(""))
+ return "true";
+ return config;
}
/**
* Returns selected value names based on the configuration.
*/
public Enumeration<String> getValueNames() {
- Vector<String> v = new Vector<String>();
- v.addElement(VAL_SUBJECT);
- return v.elements();
+ Vector<String> v = new Vector<String>();
+ v.addElement(VAL_SUBJECT);
+ return v.elements();
}
/**
* Populates the request with this policy default.
*/
public void populate(IProfileContext ctx, IRequest request)
- throws EProfileException {
+ throws EProfileException {
X509CertInfo info =
- request.getExtDataInCertInfo(EnrollProfile.REQUEST_CERTINFO);
+ request.getExtDataInCertInfo(EnrollProfile.REQUEST_CERTINFO);
String subjectName = "";
subjectName = ctx.get(VAL_SUBJECT);
if (subjectName.equals("")) {
throw new EProfileException(
- CMS.getUserMessage(getLocale(request),
- "CMS_PROFILE_SUBJECT_NAME_NOT_FOUND"));
+ CMS.getUserMessage(getLocale(request),
+ "CMS_PROFILE_SUBJECT_NAME_NOT_FOUND"));
}
X500Name name = null;
@@ -108,10 +105,10 @@ public class SubjectDNInput extends EnrollInput implements IProfileInput {
name = new X500Name(subjectName);
} catch (Exception e) {
throw new EProfileException(
- CMS.getUserMessage(getLocale(request),
- "CMS_PROFILE_INVALID_SUBJECT_NAME", subjectName));
+ CMS.getUserMessage(getLocale(request),
+ "CMS_PROFILE_INVALID_SUBJECT_NAME", subjectName));
}
- parseSubjectName(name, info, request);
+ parseSubjectName(name, info, request);
request.setExtData(EnrollProfile.REQUEST_CERTINFO, info);
}
@@ -133,13 +130,13 @@ public class SubjectDNInput extends EnrollInput implements IProfileInput {
}
protected void parseSubjectName(X500Name subj, X509CertInfo info, IRequest req)
- throws EProfileException {
+ throws EProfileException {
try {
req.setExtData(EnrollProfile.REQUEST_SUBJECT_NAME,
new CertificateSubjectName(subj));
} catch (Exception e) {
- CMS.debug("SubjectNameInput: parseSubject Name " +
- e.toString());
+ CMS.debug("SubjectNameInput: parseSubject Name " +
+ e.toString());
}
}
}