summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/cms/profile/output/nsNKeyOutput.java
diff options
context:
space:
mode:
Diffstat (limited to 'pki/base/common/src/com/netscape/cms/profile/output/nsNKeyOutput.java')
-rw-r--r--pki/base/common/src/com/netscape/cms/profile/output/nsNKeyOutput.java43
1 files changed, 20 insertions, 23 deletions
diff --git a/pki/base/common/src/com/netscape/cms/profile/output/nsNKeyOutput.java b/pki/base/common/src/com/netscape/cms/profile/output/nsNKeyOutput.java
index 90aa40a14..31a1ddbae 100644
--- a/pki/base/common/src/com/netscape/cms/profile/output/nsNKeyOutput.java
+++ b/pki/base/common/src/com/netscape/cms/profile/output/nsNKeyOutput.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.cms.profile.output;
-
import java.util.Locale;
import netscape.security.x509.X509CertImpl;
@@ -33,14 +32,13 @@ import com.netscape.certsrv.property.IDescriptor;
import com.netscape.certsrv.request.IRequest;
import com.netscape.cms.profile.common.EnrollProfile;
-
/**
- * This class implements the output plugin that outputs
- * DER for the issued certificate for token keys
- *
+ * This class implements the output plugin that outputs DER for the issued
+ * certificate for token keys
+ *
* @version $Revision$, $Date$
*/
-public class nsNKeyOutput extends EnrollOutput implements IProfileOutput {
+public class nsNKeyOutput extends EnrollOutput implements IProfileOutput {
public static final String VAL_DER = "der";
@@ -52,7 +50,7 @@ public class nsNKeyOutput extends EnrollOutput implements IProfileOutput {
* Initializes this default policy.
*/
public void init(IProfile profile, IConfigStore config)
- throws EProfileException {
+ throws EProfileException {
super.init(profile, config);
}
@@ -60,49 +58,48 @@ public class nsNKeyOutput extends EnrollOutput implements IProfileOutput {
* Retrieves the localizable name of this policy.
*/
public String getName(Locale locale) {
- return CMS.getUserMessage(locale, "CMS_PROFILE_OUTPUT_CERT_TOKENKEY_NAME");
+ return CMS.getUserMessage(locale,
+ "CMS_PROFILE_OUTPUT_CERT_TOKENKEY_NAME");
}
/**
* Retrieves the localizable description of this policy.
*/
public String getText(Locale locale) {
- return CMS.getUserMessage(locale, "CMS_PROFILE_OUTPUT_CERT_TOKENKEY_TEXT");
+ return CMS.getUserMessage(locale,
+ "CMS_PROFILE_OUTPUT_CERT_TOKENKEY_TEXT");
}
/**
* Populates the request with this policy default.
*/
public void populate(IProfileContext ctx, IRequest request)
- throws EProfileException {
+ throws EProfileException {
}
/**
- * Retrieves the descriptor of the given value
- * parameter by name.
+ * Retrieves the descriptor of the given value parameter by name.
*/
public IDescriptor getValueDescriptor(Locale locale, String name) {
if (name.equals(VAL_DER)) {
- return new Descriptor("der_b64", null,
- null,
- CMS.getUserMessage(locale,
- "CMS_PROFILE_OUTPUT_DER_B64"));
+ return new Descriptor("der_b64", null, null, CMS.getUserMessage(
+ locale, "CMS_PROFILE_OUTPUT_DER_B64"));
}
return null;
}
public String getValue(String name, Locale locale, IRequest request)
- throws EProfileException {
+ throws EProfileException {
if (name.equals(VAL_DER)) {
try {
- X509CertImpl cert = request.getExtDataInCert(
- EnrollProfile.REQUEST_ISSUED_CERT);
- if (cert == null)
- return null;
- return CMS.BtoA(cert.getEncoded());
+ X509CertImpl cert = request
+ .getExtDataInCert(EnrollProfile.REQUEST_ISSUED_CERT);
+ if (cert == null)
+ return null;
+ return CMS.BtoA(cert.getEncoded());
} catch (Exception e) {
- return "";
+ return "";
}
} else {
return null;