public class CertificatePoliciesCertTestlet extends java.lang.Object implements CertTestlet
There should be no need for toolkit users to use this class directly.
| Constructor and Description |
|---|
CertificatePoliciesCertTestlet(ClientSettings clientSettings)
Creates a
CertificatePoliciesCertTestlet object that
contains a reference to the client settings object from which policy
governing the processing/validation of CertificatePolicies
extensions is extracted. |
CertificatePoliciesCertTestlet(ObjectID[] acceptablePolicyOids,
BIT_STRING businessControlFlags)
Create a
CertificatePoliciesCertTestlet object. |
CertificatePoliciesCertTestlet(ObjectID[] validPolicyOids,
boolean alwaysInhibitPolicyMapping)
Deprecated.
As of 6.1 SP2. Use the constructor
CertificatePoliciesCertTestlet(ObjectID[], BIT_STRING)
|
| Modifier and Type | Method and Description |
|---|---|
void |
init(X509Certificate[] certChain,
TestletDataSet dataSet)
Initialize the testlet with the given chain.
|
void |
notify(V3Extension extension,
TestletDataSet dataSet)
Notify the testlet of the extension that is about to be validated.
|
void |
reset(TestletDataSet dataSet)
Part of the
ExtensionTestlet interface, has no effect. |
void |
validate(X509Certificate cert,
TestletDataSet dataSet)
Validate that the given certificate does not invalidate the certificate
chain.
|
public CertificatePoliciesCertTestlet(ObjectID[] validPolicyOids, boolean alwaysInhibitPolicyMapping)
public CertificatePoliciesCertTestlet(ObjectID[] acceptablePolicyOids, BIT_STRING businessControlFlags)
CertificatePoliciesCertTestlet object.acceptablePolicyOids - an array of acceptable policy OIDs. If acceptable policies are not
important, pass the array ObjectID[] {ObjectID.anyPolicy}.businessControlFlags - flags that control the initial inhibit any policy, inhibit policy
mapping, and require explicit policy values. This value should be obtained
from a ClientSettings object.ClientSettingspublic CertificatePoliciesCertTestlet(ClientSettings clientSettings)
CertificatePoliciesCertTestlet object that
contains a reference to the client settings object from which policy
governing the processing/validation of CertificatePolicies
extensions is extracted.
When this constructor is used, policy governing the processing/validation
of CertificatePolicies extensions (acceptable policy OIDs,
inhibit any policy flag, inhibit policy mapping flag, require explicit
policy flag) is extracted from the client settings every time the testlet
is initialized. This allows the testlet to pickup changes to the client
settings policy that effect the operation of this testlet.
clientSettings - the client settingspublic void init(X509Certificate[] certChain, TestletDataSet dataSet)
init in interface CertTestletcertChain - the certificate chain to be validated.dataSet - the TestletDataSet to use for the chain validation.public void notify(V3Extension extension, TestletDataSet dataSet)
notify in interface ExtensionTestletextension - The extension to be validated. This will be an instance of
CertificatePolicies.dataSet - the TestletDataSet to use for the chain validation.CertificatePoliciespublic void validate(X509Certificate cert, TestletDataSet dataSet) throws ExtensionException
Note: this method must be called for every certificate in the chain being validated, regardless of whether or not it contains the CertificatePolicies extension.
validate in interface CertTestletcert - The current certificate being processed.dataSet - the TestletDataSet to use for the chain validation.ExtensionException - if there is a problem processing the certificate, or if the
given certificate causes the path to be invalid.public void reset(TestletDataSet dataSet)
ExtensionTestlet interface, has no effect.reset in interface ExtensionTestletdataSet - the TestletDataSet to use for the chain validation.