com.netscape.cms.profile.constraint
Class ExtendedKeyUsageExtConstraint

java.lang.Object
  extended by com.netscape.cms.profile.constraint.EnrollConstraint
      extended by com.netscape.cms.profile.constraint.ExtendedKeyUsageExtConstraint
All Implemented Interfaces:
IPolicyConstraint, IConfigTemplate

public class ExtendedKeyUsageExtConstraint
extends EnrollConstraint

This class implements the extended key usage extension constraint. It checks if the extended key usage extension in the certificate template satisfies the criteria.

Version:
$Revision: 1211 $, $Date: 2010-08-18 10:15:37 -0700 (Wed, 18 Aug 2010) $

Field Summary
static java.lang.String CONFIG_CRITICAL
           
static java.lang.String CONFIG_OIDS
           
 
Fields inherited from class com.netscape.cms.profile.constraint.EnrollConstraint
CONFIG_NAME, mConfig, mConfigNames
 
Constructor Summary
ExtendedKeyUsageExtConstraint()
           
 
Method Summary
 IDescriptor getConfigDescriptor(java.util.Locale locale, java.lang.String name)
          Returns the descriptors of configuration parameter.
 java.lang.String getText(java.util.Locale locale)
          Returns localized description of this constraint.
 void init(IProfile profile, IConfigStore config)
          Initializes this constraint policy.
 boolean isApplicable(IPolicyDefault def)
          Checks if this constraint is applicable to the given default policy.
 void validate(IRequest request, netscape.security.x509.X509CertInfo info)
          Validates the request.
 
Methods inherited from class com.netscape.cms.profile.constraint.EnrollConstraint
addConfigName, getBoolean, getConfig, getConfigBoolean, getConfigInt, getConfigNames, getConfigStore, getExtension, getInt, getLocale, getName, getValueDescriptor, isOptional, setConfig, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIG_CRITICAL

public static final java.lang.String CONFIG_CRITICAL
See Also:
Constant Field Values

CONFIG_OIDS

public static final java.lang.String CONFIG_OIDS
See Also:
Constant Field Values
Constructor Detail

ExtendedKeyUsageExtConstraint

public ExtendedKeyUsageExtConstraint()
Method Detail

init

public void init(IProfile profile,
                 IConfigStore config)
          throws EProfileException
Description copied from interface: IPolicyConstraint
Initializes this constraint policy.

Specified by:
init in interface IPolicyConstraint
Overrides:
init in class EnrollConstraint
Parameters:
profile - owner of this policy
config - configuration store for this constraint
Throws:
EProfileException - failed to initialize

getConfigDescriptor

public IDescriptor getConfigDescriptor(java.util.Locale locale,
                                       java.lang.String name)
Description copied from interface: IConfigTemplate
Returns the descriptors of configuration parameter.

Specified by:
getConfigDescriptor in interface IConfigTemplate
Overrides:
getConfigDescriptor in class EnrollConstraint
Parameters:
locale - user locale
name - configuration parameter name
Returns:
descriptor

validate

public void validate(IRequest request,
                     netscape.security.x509.X509CertInfo info)
              throws ERejectException
Validates the request. The request is not modified during the validation.

Specified by:
validate in class EnrollConstraint
Parameters:
request - enrollment request
info - certificate template
Throws:
ERejectException - request is rejected due to violation of constraint

getText

public java.lang.String getText(java.util.Locale locale)
Description copied from interface: IPolicyConstraint
Returns localized description of this constraint.

Specified by:
getText in interface IPolicyConstraint
Overrides:
getText in class EnrollConstraint
Parameters:
locale - locale of the end-user
Returns:
localized description of this constraint

isApplicable

public boolean isApplicable(IPolicyDefault def)
Description copied from interface: IPolicyConstraint
Checks if this constraint is applicable to the given default policy.

Specified by:
isApplicable in interface IPolicyConstraint
Overrides:
isApplicable in class EnrollConstraint
Parameters:
def - default policy to be checked
Returns:
true if this constraint can be applied to the given default policy