Class UniqueSubjectNameConstraint

  • All Implemented Interfaces:
    IConfigTemplate

    public class UniqueSubjectNameConstraint
    extends EnrollConstraint
    This class implements the unique subject name constraint. It checks if the subject name in the certificate is unique in the internal database, ie, no two certificates have the same subject name.
    Version:
    $Revision$, $Date$
    • Field Detail

      • logger

        public static org.slf4j.Logger logger
      • CONFIG_KEY_USAGE_EXTENSION_CHECKING

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

      • UniqueSubjectNameConstraint

        public UniqueSubjectNameConstraint()
    • Method Detail

      • getDefaultConfig

        public java.lang.String getDefaultConfig​(java.lang.String name)
      • 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. Rules are as follows: If the subject name is not unique, then the request will be rejected unless: 1. the certificate is expired or expired_revoked 2. the certificate is revoked and the revocation reason is not "on hold" 3. the keyUsageExtension bits are different and enableKeyUsageExtensionChecking=true (default)
        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