Class KeyUsageExtConstraint
- java.lang.Object
-
- com.netscape.cms.profile.constraint.EnrollConstraint
-
- com.netscape.cms.profile.constraint.KeyUsageExtConstraint
-
- All Implemented Interfaces:
IPolicyConstraint
,IConfigTemplate
public class KeyUsageExtConstraint extends EnrollConstraint
This class implements the key usage extension constraint. It checks if the key usage constraint in the certificate template satisfies the criteria.- Version:
- $Revision$, $Date$
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CONFIG_CRITICAL
static java.lang.String
CONFIG_CRL_SIGN
static java.lang.String
CONFIG_DATA_ENCIPHERMENT
static java.lang.String
CONFIG_DECIPHER_ONLY
static java.lang.String
CONFIG_DIGITAL_SIGNATURE
static java.lang.String
CONFIG_ENCIPHER_ONLY
static java.lang.String
CONFIG_KEY_AGREEMENT
static java.lang.String
CONFIG_KEY_CERTSIGN
static java.lang.String
CONFIG_KEY_ENCIPHERMENT
static java.lang.String
CONFIG_NON_REPUDIATION
-
Fields inherited from class com.netscape.cms.profile.constraint.EnrollConstraint
CONFIG_NAME, CONFIG_PARAMS, mConfig, mConfigNames
-
-
Constructor Summary
Constructors Constructor Description KeyUsageExtConstraint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.boolean
isSet(boolean[] bits, int position)
void
validate(IRequest request, X509CertInfo info)
Validates the request.-
Methods inherited from class com.netscape.cms.profile.constraint.EnrollConstraint
addConfigName, getBoolean, getConfig, getConfig, getConfigBoolean, getConfigInt, getConfigNames, getConfigStore, getExtension, getInt, getLocale, getName, getValueDescriptor, isOptional, setConfig, validate
-
-
-
-
Field Detail
-
CONFIG_CRITICAL
public static final java.lang.String CONFIG_CRITICAL
- See Also:
- Constant Field Values
-
CONFIG_DIGITAL_SIGNATURE
public static final java.lang.String CONFIG_DIGITAL_SIGNATURE
- See Also:
- Constant Field Values
-
CONFIG_NON_REPUDIATION
public static final java.lang.String CONFIG_NON_REPUDIATION
- See Also:
- Constant Field Values
-
CONFIG_KEY_ENCIPHERMENT
public static final java.lang.String CONFIG_KEY_ENCIPHERMENT
- See Also:
- Constant Field Values
-
CONFIG_DATA_ENCIPHERMENT
public static final java.lang.String CONFIG_DATA_ENCIPHERMENT
- See Also:
- Constant Field Values
-
CONFIG_KEY_AGREEMENT
public static final java.lang.String CONFIG_KEY_AGREEMENT
- See Also:
- Constant Field Values
-
CONFIG_KEY_CERTSIGN
public static final java.lang.String CONFIG_KEY_CERTSIGN
- See Also:
- Constant Field Values
-
CONFIG_CRL_SIGN
public static final java.lang.String CONFIG_CRL_SIGN
- See Also:
- Constant Field Values
-
CONFIG_ENCIPHER_ONLY
public static final java.lang.String CONFIG_ENCIPHER_ONLY
- See Also:
- Constant Field Values
-
CONFIG_DECIPHER_ONLY
public static final java.lang.String CONFIG_DECIPHER_ONLY
- See Also:
- Constant Field Values
-
-
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 interfaceIPolicyConstraint
- Overrides:
init
in classEnrollConstraint
- Parameters:
profile
- owner of this policyconfig
- 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 interfaceIConfigTemplate
- Overrides:
getConfigDescriptor
in classEnrollConstraint
- Parameters:
locale
- user localename
- configuration parameter name- Returns:
- descriptor
-
isSet
public boolean isSet(boolean[] bits, int position)
-
validate
public void validate(IRequest request, X509CertInfo info) throws ERejectException
Validates the request. The request is not modified during the validation.- Specified by:
validate
in classEnrollConstraint
- Parameters:
request
- enrollment requestinfo
- 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 interfaceIPolicyConstraint
- Overrides:
getText
in classEnrollConstraint
- 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 interfaceIPolicyConstraint
- Overrides:
isApplicable
in classEnrollConstraint
- Parameters:
def
- default policy to be checked- Returns:
- true if this constraint can be applied to the given default policy
-
-