Class SubjectKeyIdentifierExt

  • All Implemented Interfaces:
    IExtendedPluginInfo, com.netscape.certsrv.request.IPolicy, org.dogtagpki.legacy.policy.IEnrollmentPolicy, org.dogtagpki.legacy.policy.IPolicyRule

    public class SubjectKeyIdentifierExt
    extends APolicyRule
    implements org.dogtagpki.legacy.policy.IEnrollmentPolicy, IExtendedPluginInfo
    Subject Public Key Extension Policy Adds the subject public key id extension to certificates.

     NOTE:  The Policy Framework has been replaced by the Profile Framework.
     

    Version:
    $Revision$, $Date$
    • Field Detail

      • logger

        public static org.slf4j.Logger logger
      • PROP_KEYID_TYPE

        protected static final java.lang.String PROP_KEYID_TYPE
        See Also:
        Constant Field Values
      • PROP_REQATTR_NAME

        protected static final java.lang.String PROP_REQATTR_NAME
        See Also:
        Constant Field Values
      • KEYID_TYPE_SHA1

        protected static final java.lang.String KEYID_TYPE_SHA1
        See Also:
        Constant Field Values
      • KEYID_TYPE_TYPEFIELD

        protected static final java.lang.String KEYID_TYPE_TYPEFIELD
        See Also:
        Constant Field Values
      • KEYID_TYPE_SPKISHA1

        protected static final java.lang.String KEYID_TYPE_SPKISHA1
        See Also:
        Constant Field Values
      • KEYID_TYPE_REQATTR

        protected static final java.lang.String KEYID_TYPE_REQATTR
        See Also:
        Constant Field Values
      • DEF_REQATTR_NAME

        protected static final java.lang.String DEF_REQATTR_NAME
        See Also:
        Constant Field Values
      • mEnabled

        protected boolean mEnabled
      • mCritical

        protected boolean mCritical
      • mKeyIdType

        protected java.lang.String mKeyIdType
      • mReqAttrName

        protected java.lang.String mReqAttrName
      • mInstanceParams

        protected java.util.Vector<java.lang.String> mInstanceParams
      • mDefaultParams

        protected static java.util.Vector<java.lang.String> mDefaultParams
    • Constructor Detail

      • SubjectKeyIdentifierExt

        public SubjectKeyIdentifierExt()
    • Method Detail

      • init

        public void init​(org.dogtagpki.legacy.policy.IPolicyProcessor owner,
                         IConfigStore config)
                  throws EBaseException
        Initializes this policy rule.

        The entries may be of the form: ca.Policy.rule..predicate= ca.Policy.rule..implName= ca.Policy.rule..enable=true

        Specified by:
        init in interface org.dogtagpki.legacy.policy.IPolicyRule
        Specified by:
        init in class APolicyRule
        Parameters:
        config - The config store reference
        Throws:
        EBaseException
      • apply

        public com.netscape.certsrv.request.PolicyResult apply​(com.netscape.certsrv.request.IRequest req)
        Adds Subject Key identifier Extension to a certificate. If the extension is already there, accept it.
        Specified by:
        apply in interface com.netscape.certsrv.request.IPolicy
        Specified by:
        apply in interface org.dogtagpki.legacy.policy.IPolicyRule
        Specified by:
        apply in class APolicyRule
        Parameters:
        req - The request on which to apply policy.
        Returns:
        The policy result object.
      • applyCert

        public com.netscape.certsrv.request.PolicyResult applyCert​(com.netscape.certsrv.request.IRequest req,
                                                                   org.mozilla.jss.netscape.security.x509.X509CertInfo certInfo)
      • formKeyIdentifier

        protected org.mozilla.jss.netscape.security.x509.KeyIdentifier formKeyIdentifier​(org.mozilla.jss.netscape.security.x509.X509CertInfo certInfo,
                                                                                         com.netscape.certsrv.request.IRequest req)
                                                                                  throws EBaseException
        Form the Key Identifier in the Subject Key Identifier extension.

        Parameters:
        certInfo - Certificate Info
        req - request
        Returns:
        A Key Identifier.
        Throws:
        EBaseException
      • formTypeFieldKeyId

        protected org.mozilla.jss.netscape.security.x509.KeyIdentifier formTypeFieldKeyId​(org.mozilla.jss.netscape.security.x509.X509CertInfo certInfo)
                                                                                   throws EBaseException
        Form key identifier from a type field value of 0100 followed by the least significate 60 bits of the sha-1 hash of the subject public key BIT STRING in accordance with RFC 2459.

        Parameters:
        certInfo - - certificate info
        Returns:
        A Key Identifier with value formulatd as described.
        Throws:
        EBaseException
      • getInstanceParams

        public java.util.Vector<java.lang.String> getInstanceParams()
        Return configured parameters for a policy rule instance.
        Specified by:
        getInstanceParams in interface org.dogtagpki.legacy.policy.IPolicyRule
        Specified by:
        getInstanceParams in class APolicyRule
        Returns:
        nvPairs A Vector of name/value pairs.
      • getDefaultParams

        public java.util.Vector<java.lang.String> getDefaultParams()
        Return default parameters for a policy implementation.
        Specified by:
        getDefaultParams in interface org.dogtagpki.legacy.policy.IPolicyRule
        Specified by:
        getDefaultParams in class APolicyRule
        Returns:
        nvPairs A Vector of name/value pairs.
      • getExtendedPluginInfo

        public java.lang.String[] getExtendedPluginInfo​(java.util.Locale locale)
        Gets extended plugin info for pretty Console displays.
        Specified by:
        getExtendedPluginInfo in interface IExtendedPluginInfo