diff options
Diffstat (limited to 'pki/base/ca/src/com/netscape/ca/CAPolicy.java')
-rw-r--r-- | pki/base/ca/src/com/netscape/ca/CAPolicy.java | 49 |
1 files changed, 23 insertions, 26 deletions
diff --git a/pki/base/ca/src/com/netscape/ca/CAPolicy.java b/pki/base/ca/src/com/netscape/ca/CAPolicy.java index 80c801a42..d18774d95 100644 --- a/pki/base/ca/src/com/netscape/ca/CAPolicy.java +++ b/pki/base/ca/src/com/netscape/ca/CAPolicy.java @@ -17,7 +17,6 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.ca; - import com.netscape.certsrv.apps.CMS; import com.netscape.certsrv.base.EBaseException; import com.netscape.certsrv.base.IConfigStore; @@ -32,13 +31,12 @@ import com.netscape.certsrv.request.PolicyResult; import com.netscape.cmscore.policy.GenericPolicyProcessor; import com.netscape.cmscore.util.Debug; - /** - * XXX Just inherit 'GenericPolicyProcessor' (from RA) for now. - * This really bad. need to make a special case just for connector. - * would like a much better way of doing this to handle both EE and + * XXX Just inherit 'GenericPolicyProcessor' (from RA) for now. + * This really bad. need to make a special case just for connector. + * would like a much better way of doing this to handle both EE and * connectors. - * XXX2 moved to just implement IPolicy since GenericPolicyProcessor is + * XXX2 moved to just implement IPolicy since GenericPolicyProcessor is * unuseable for CA. * * @version $Revision$, $Date$ @@ -47,8 +45,8 @@ public class CAPolicy implements IPolicy { IConfigStore mConfig = null; ICertificateAuthority mCA = null; - public static String PROP_PROCESSOR = - "processor"; + public static String PROP_PROCESSOR = + "processor"; // These are the different types of policy that are // allowed for the "processor" property public static String PR_TYPE_CLASSIC = "classic"; @@ -64,12 +62,12 @@ public class CAPolicy implements IPolicy { } public void init(ISubsystem owner, IConfigStore config) - throws EBaseException { + throws EBaseException { mCA = (ICertificateAuthority) owner; mConfig = config; - String processorType = // XXX - need to upgrade 4.2 - config.getString(PROP_PROCESSOR, PR_TYPE_CLASSIC); + String processorType = // XXX - need to upgrade 4.2 + config.getString(PROP_PROCESSOR, PR_TYPE_CLASSIC); Debug.trace("selected policy processor = " + processorType); if (processorType.equals(PR_TYPE_CLASSIC)) { @@ -100,32 +98,32 @@ public class CAPolicy implements IPolicy { } Debug.trace("in CAPolicy.apply(requestType=" + - r.getRequestType() + ",requestId=" + - r.getRequestId().toString() + ",requestStatus=" + - r.getRequestStatus().toString() + ")"); + r.getRequestType() + ",requestId=" + + r.getRequestId().toString() + ",requestStatus=" + + r.getRequestStatus().toString() + ")"); - if (isProfileRequest(r)) { - Debug.trace("CAPolicy: Profile-base Request " + - r.getRequestId().toString()); + if (isProfileRequest(r)) { + Debug.trace("CAPolicy: Profile-base Request " + + r.getRequestId().toString()); - CMS.debug("CAPolicy: requestId=" + - r.getRequestId().toString()); + CMS.debug("CAPolicy: requestId=" + + r.getRequestId().toString()); String profileId = r.getExtDataInString("profileId"); - if (profileId == null || profileId.equals("")) { + if (profileId == null || profileId.equals("")) { return PolicyResult.REJECTED; } - IProfileSubsystem ps = (IProfileSubsystem) - CMS.getSubsystem("profile"); + IProfileSubsystem ps = (IProfileSubsystem) + CMS.getSubsystem("profile"); try { - IProfile profile = ps.getProfile(profileId); + IProfile profile = ps.getProfile(profileId); r.setExtData("dbStatus", "NOT_UPDATED"); - profile.populate(r); - profile.validate(r); + profile.populate(r); + profile.validate(r); return PolicyResult.ACCEPTED; } catch (EBaseException e) { CMS.debug("CAPolicy: " + e.toString()); @@ -137,4 +135,3 @@ public class CAPolicy implements IPolicy { } } - |