Class KeyUsageExtConstraint

  • All Implemented Interfaces:
    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 Detail

      • 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_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
    • Constructor Detail

      • KeyUsageExtConstraint

        public KeyUsageExtConstraint()
    • Method Detail

      • isSet

        public boolean isSet​(boolean[] bits,
                             int position)
      • validate

        public void validate​(IRequest request,
                             org.mozilla.jss.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 class: PolicyConstraint
        Returns localized description of this constraint.
        Overrides:
        getText in class EnrollConstraint
        Parameters:
        locale - locale of the end-user
        Returns:
        localized description of this constraint
      • isApplicable

        public boolean isApplicable​(PolicyDefault def)
        Description copied from class: PolicyConstraint
        Checks if this constraint is applicable to the given default policy.
        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