Class SubjectKeyIdentifierExt
- java.lang.Object
-
- org.dogtagpki.legacy.server.policy.APolicyRule
-
- org.dogtagpki.legacy.server.policy.extensions.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 Summary
Fields Modifier and Type Field Description protected static boolean
DEF_CRITICAL
protected static java.lang.String
DEF_KEYID_TYPE
protected static java.lang.String
DEF_REQATTR_NAME
protected static java.lang.String
KEYID_TYPE_REQATTR
protected static java.lang.String
KEYID_TYPE_SHA1
protected static java.lang.String
KEYID_TYPE_SPKISHA1
protected static java.lang.String
KEYID_TYPE_TYPEFIELD
static org.slf4j.Logger
logger
protected IConfigStore
mConfig
protected boolean
mCritical
protected static java.util.Vector<java.lang.String>
mDefaultParams
protected boolean
mEnabled
protected java.util.Vector<java.lang.String>
mInstanceParams
protected java.lang.String
mKeyIdType
protected java.lang.String
mReqAttrName
protected static java.lang.String
PROP_CRITICAL
protected static java.lang.String
PROP_KEYID_TYPE
protected static java.lang.String
PROP_REQATTR_NAME
-
Fields inherited from class org.dogtagpki.legacy.server.policy.APolicyRule
DESC, mFilterExp, mInstanceName, NAME
-
Fields inherited from interface com.netscape.certsrv.base.IExtendedPluginInfo
HELP_TEXT, HELP_TOKEN
-
-
Constructor Summary
Constructors Constructor Description SubjectKeyIdentifierExt()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.netscape.certsrv.request.PolicyResult
apply(com.netscape.certsrv.request.IRequest req)
Adds Subject Key identifier Extension to a certificate.com.netscape.certsrv.request.PolicyResult
applyCert(com.netscape.certsrv.request.IRequest req, org.mozilla.jss.netscape.security.x509.X509CertInfo certInfo)
protected org.mozilla.jss.netscape.security.x509.KeyIdentifier
formKeyIdentifier(org.mozilla.jss.netscape.security.x509.X509CertInfo certInfo, com.netscape.certsrv.request.IRequest req)
Form the Key Identifier in the Subject Key Identifier extension.protected org.mozilla.jss.netscape.security.x509.KeyIdentifier
formTypeFieldKeyId(org.mozilla.jss.netscape.security.x509.X509CertInfo certInfo)
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.java.util.Vector<java.lang.String>
getDefaultParams()
Return default parameters for a policy implementation.java.lang.String[]
getExtendedPluginInfo(java.util.Locale locale)
Gets extended plugin info for pretty Console displays.java.util.Vector<java.lang.String>
getInstanceParams()
Return configured parameters for a policy rule instance.void
init(org.dogtagpki.legacy.policy.IPolicyProcessor owner, IConfigStore config)
Initializes this policy rule.-
Methods inherited from class org.dogtagpki.legacy.server.policy.APolicyRule
agentApproved, createKeyIdentifier, deferred, formSHA1KeyId, formSpkiSHA1KeyId, getDescription, getInstanceName, getName, getPredicate, setError, setError, setError, setInstanceName, setPolicyException, setPolicyException, setPredicate
-
-
-
-
Field Detail
-
logger
public static org.slf4j.Logger logger
-
PROP_CRITICAL
protected static final java.lang.String PROP_CRITICAL
- See Also:
- Constant Field Values
-
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_CRITICAL
protected static final boolean DEF_CRITICAL
- See Also:
- Constant Field Values
-
DEF_KEYID_TYPE
protected static final java.lang.String DEF_KEYID_TYPE
- 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
-
mConfig
protected IConfigStore mConfig
-
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
-
-
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 interfaceorg.dogtagpki.legacy.policy.IPolicyRule
- Specified by:
init
in classAPolicyRule
- 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 interfacecom.netscape.certsrv.request.IPolicy
- Specified by:
apply
in interfaceorg.dogtagpki.legacy.policy.IPolicyRule
- Specified by:
apply
in classAPolicyRule
- 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 Inforeq
- 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 interfaceorg.dogtagpki.legacy.policy.IPolicyRule
- Specified by:
getInstanceParams
in classAPolicyRule
- 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 interfaceorg.dogtagpki.legacy.policy.IPolicyRule
- Specified by:
getDefaultParams
in classAPolicyRule
- 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 interfaceIExtendedPluginInfo
-
-