Class CMCSharedTokenSubjectNameConstraint

  • All Implemented Interfaces:
    IConfigTemplate

    public class CMCSharedTokenSubjectNameConstraint
    extends EnrollConstraint
    This class implements the user subject name constraint for cmc requests authenticated by the SharedSecret The resulting cert should match that of the authenticating DN
    Version:
    $Revision$, $Date$
    Author:
    cfu
    • Field Detail

      • logger

        public static org.slf4j.Logger logger
    • Constructor Detail

      • CMCSharedTokenSubjectNameConstraint

        public CMCSharedTokenSubjectNameConstraint()
    • 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. User encoded subject name is copied into the certificate template.
        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