Top Description Inners Fields Constructors Methods
org.bouncycastle.jcajce

public Class PKIXExtendedParameters

extends Object
implements CertPathParameters
Class Inheritance
All Implemented Interfaces
java.security.cert.CertPathParameters, java.lang.Cloneable
Imports
java.security.cert.CertPathParameters, .CertSelector, .CertStore, .PKIXParameters, .TrustAnchor, java.util.ArrayList, .Collections, .Date, .HashMap, .List, .Map, .Set, org.bouncycastle.asn1.x509.GeneralName

This class extends the PKIXParameters with a validity model parameter.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
PKIXExtendedParameters.Builder

Builder for a PKIXExtendedParameters object.

Field Summary

Modifier and TypeField and Description
private final PKIXParameters
public static final int
CHAIN_VALIDITY_MODEL

This model uses the following validity model.

private final Date
private final List<PKIXCertStore<T extends Certificate>>
private final List<PKIXCRLStore<T extends CRL>>
private final Map<GeneralName, PKIXCertStore<T extends Certificate>>
private final Map<GeneralName, PKIXCRLStore<T extends CRL>>
public static final int
PKIX_VALIDITY_MODEL

This is the default PKIX validity model.

private final boolean
private final PKIXCertStoreSelector<T extends Certificate>
private final Set<TrustAnchor>
private final boolean
private final Date
private final int

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public Object
clone()

Overrides java.lang.Object.clone.

Implements java.security.cert.CertPathParameters.clone.

Makes a copy of this CertPathParameters.

public List<PKIXCertStore<T extends Certificate>>
public List<E>
public List<CertStore>
public List<PKIXCRLStore<T extends CRL>>
public Date
getDate()
Deprecated Use 'getValidityDate' instead (which can return null).

public Set<E>
public Map<GeneralName, PKIXCertStore<T extends Certificate>>
public Map<GeneralName, PKIXCRLStore<T extends CRL>>
public boolean
public String
public PKIXCertStoreSelector<T extends Certificate>

Returns:

a Selector specifying the constraints on the target certificate or attribute certificate (or null)
getTargetConstraints
()

Returns the required constraints on the target certificate.

public Set<E>
public Date

Returns:

the Date, or null if not set
getValidityDate
()

Returns the time at which to check the validity of the certification path.

public int

Returns:

Returns the validity model.
getValidityModel
()

public boolean
public boolean
public boolean
public boolean
public boolean

Returns:

Returns if delta CRLs should be used.
isUseDeltasEnabled
()

Defaults to false.

Inherited from java.lang.Object:
equalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

baseParametersback to summary
private final PKIXParameters baseParameters
CHAIN_VALIDITY_MODELback to summary
public static final int CHAIN_VALIDITY_MODEL

This model uses the following validity model. Each certificate must have been valid at the moment when it was used. That means the end certificate must have been valid at the time the signature was done. The CA certificate which signed the end certificate must have been valid, when the end certificate was signed. The CA (or Root CA) certificate must have been valid when the CA certificate was signed, and so on. So the PKIXParameters#setDate(Date) method sets the time, when the end certificate must have been valid. It is used e.g. in the German signature law.

dateback to summary
private final Date date
extraCertStoresback to summary
private final List<PKIXCertStore<T extends Certificate>> extraCertStores
extraCRLStoresback to summary
private final List<PKIXCRLStore<T extends CRL>> extraCRLStores
namedCertificateStoreMapback to summary
private final Map<GeneralName, PKIXCertStore<T extends Certificate>> namedCertificateStoreMap
namedCRLStoreMapback to summary
private final Map<GeneralName, PKIXCRLStore<T extends CRL>> namedCRLStoreMap
PKIX_VALIDITY_MODELback to summary
public static final int PKIX_VALIDITY_MODEL

This is the default PKIX validity model. Actually there are two variants of this: The PKIX model and the modified PKIX model. The PKIX model verifies that all involved certificates must have been valid at the current time. The modified PKIX model verifies that all involved certificates were valid at the signing time. Both are indirectly chosen with the PKIXParameters#setDate(Date) method, so this methods sets the Date when all certificates must have been valid.

revocationEnabledback to summary
private final boolean revocationEnabled
targetConstraintsback to summary
private final PKIXCertStoreSelector<T extends Certificate> targetConstraints
trustAnchorsback to summary
private final Set<TrustAnchor> trustAnchors
useDeltasback to summary
private final boolean useDeltas
validityDateback to summary
private final Date validityDate
validityModelback to summary
private final int validityModel

Constructor Detail

PKIXExtendedParametersback to summary
private PKIXExtendedParameters(PKIXExtendedParameters.Builder builder)

Method Detail

cloneback to summary
public Object clone()

Overrides java.lang.Object.clone.

Implements java.security.cert.CertPathParameters.clone.

Doc from java.security.cert.CertPathParameters.clone.

Makes a copy of this CertPathParameters. Changes to the copy will not affect the original and vice versa.

Returns:Object

a copy of this CertPathParameters

getCertificateStoresback to summary
public List<PKIXCertStore<T extends Certificate>> getCertificateStores()
getCertPathCheckersback to summary
public List<E> getCertPathCheckers()
getCertStoresback to summary
public List<CertStore> getCertStores()
getCRLStoresback to summary
public List<PKIXCRLStore<T extends CRL>> getCRLStores()
getDateback to summary
public Date getDate()

Deprecated

Use 'getValidityDate' instead (which can return null).

getInitialPoliciesback to summary
public Set<E> getInitialPolicies()
getNamedCertificateStoreMapback to summary
public Map<GeneralName, PKIXCertStore<T extends Certificate>> getNamedCertificateStoreMap()
getNamedCRLStoreMapback to summary
public Map<GeneralName, PKIXCRLStore<T extends CRL>> getNamedCRLStoreMap()
getPolicyQualifiersRejectedback to summary
public boolean getPolicyQualifiersRejected()
getSigProviderback to summary
public String getSigProvider()
getTargetConstraintsback to summary
public PKIXCertStoreSelector<T extends Certificate> getTargetConstraints()

Returns the required constraints on the target certificate. The constraints are returned as an instance of Selector. If null, no constraints are defined.

Returns:PKIXCertStoreSelector<T extends Certificate>

a Selector specifying the constraints on the target certificate or attribute certificate (or null)

See Also
PKIXCertStoreSelector
getTrustAnchorsback to summary
public Set<E> getTrustAnchors()
getValidityDateback to summary
public Date getValidityDate()

Returns the time at which to check the validity of the certification path. If null, the current time is used.

Returns:Date

the Date, or null if not set

getValidityModelback to summary
public int getValidityModel()
Returns:int

Returns the validity model.

See Also
CHAIN_VALIDITY_MODEL, PKIX_VALIDITY_MODEL
isAnyPolicyInhibitedback to summary
public boolean isAnyPolicyInhibited()
isExplicitPolicyRequiredback to summary
public boolean isExplicitPolicyRequired()
isPolicyMappingInhibitedback to summary
public boolean isPolicyMappingInhibited()
isRevocationEnabledback to summary
public boolean isRevocationEnabled()
isUseDeltasEnabledback to summary
public boolean isUseDeltasEnabled()

Defaults to false.

Returns:boolean

Returns if delta CRLs should be used.

org.bouncycastle.jcajce back to summary

public Class PKIXExtendedParameters.Builder

extends Object
Class Inheritance

Builder for a PKIXExtendedParameters object.

Field Summary

Modifier and TypeField and Description
private final PKIXParameters
private final Date
private List<PKIXCertStore<T extends Certificate>>
private List<PKIXCRLStore<T extends CRL>>
private Map<GeneralName, PKIXCertStore<T extends Certificate>>
private Map<GeneralName, PKIXCRLStore<T extends CRL>>
private boolean
private PKIXCertStoreSelector<T extends Certificate>
private Set<TrustAnchor>
private boolean
private final Date
private int

Constructor Summary

AccessConstructor and Description
public
Builder(PKIXParameters baseParameters)

public

Method Summary

Modifier and TypeMethod and Description
public PKIXExtendedParameters.Builder
public PKIXExtendedParameters.Builder
addCRLStore(PKIXCRLStore<T extends CRL> store)

public PKIXExtendedParameters.Builder
public PKIXExtendedParameters.Builder
addNamedCRLStore(GeneralName issuerAltName, PKIXCRLStore<T extends CRL> store)

public PKIXExtendedParameters
public void
setRevocationEnabled(boolean
true if revocation checking to be enabled, false otherwise.
revocationEnabled
)

Flag whether or not revocation checking is to be enabled.

public PKIXExtendedParameters.Builder
public PKIXExtendedParameters.Builder

Returns:

the current builder.
setTrustAnchor
(TrustAnchor
the trust anchor end-entity and CRLs must be based on.
trustAnchor
)

Set the trustAnchor to be used with these parameters.

public PKIXExtendedParameters.Builder

Returns:

the current builder.
setTrustAnchors
(Set<TrustAnchor>
a set of trustAnchors, one of which a particular end-entity and it's associated CRLs must be based on.
trustAnchors
)

Set the set of trustAnchors to be used with these parameters.

public PKIXExtendedParameters.Builder
setUseDeltasEnabled(boolean
true if delta CRLs should be used.
useDeltas
)

Sets if delta CRLs should be used for checking the revocation status.

public PKIXExtendedParameters.Builder
setValidityModel(int
The validity model to set.
validityModel
)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

baseParametersback to summary
private final PKIXParameters baseParameters
dateback to summary
private final Date date
extraCertStoresback to summary
private List<PKIXCertStore<T extends Certificate>> extraCertStores
extraCRLStoresback to summary
private List<PKIXCRLStore<T extends CRL>> extraCRLStores
namedCertificateStoreMapback to summary
private Map<GeneralName, PKIXCertStore<T extends Certificate>> namedCertificateStoreMap
namedCRLStoreMapback to summary
private Map<GeneralName, PKIXCRLStore<T extends CRL>> namedCRLStoreMap
revocationEnabledback to summary
private boolean revocationEnabled
targetConstraintsback to summary
private PKIXCertStoreSelector<T extends Certificate> targetConstraints
trustAnchorsback to summary
private Set<TrustAnchor> trustAnchors
useDeltasback to summary
private boolean useDeltas
validityDateback to summary
private final Date validityDate
validityModelback to summary
private int validityModel

Constructor Detail

Builderback to summary
public Builder(PKIXParameters baseParameters)
Builderback to summary
public Builder(PKIXExtendedParameters baseParameters)

Method Detail

addCertificateStoreback to summary
public PKIXExtendedParameters.Builder addCertificateStore(PKIXCertStore<T extends Certificate> store)
addCRLStoreback to summary
public PKIXExtendedParameters.Builder addCRLStore(PKIXCRLStore<T extends CRL> store)
addNamedCertificateStoreback to summary
public PKIXExtendedParameters.Builder addNamedCertificateStore(GeneralName issuerAltName, PKIXCertStore<T extends Certificate> store)
addNamedCRLStoreback to summary
public PKIXExtendedParameters.Builder addNamedCRLStore(GeneralName issuerAltName, PKIXCRLStore<T extends CRL> store)
buildback to summary
public PKIXExtendedParameters build()
setRevocationEnabledback to summary
public void setRevocationEnabled(boolean revocationEnabled)

Flag whether or not revocation checking is to be enabled.

Parameters
revocationEnabled:boolean

true if revocation checking to be enabled, false otherwise.

setTargetConstraintsback to summary
public PKIXExtendedParameters.Builder setTargetConstraints(PKIXCertStoreSelector<T extends Certificate> selector)
setTrustAnchorback to summary
public PKIXExtendedParameters.Builder setTrustAnchor(TrustAnchor trustAnchor)

Set the trustAnchor to be used with these parameters.

Parameters
trustAnchor:TrustAnchor

the trust anchor end-entity and CRLs must be based on.

Returns:PKIXExtendedParameters.Builder

the current builder.

setTrustAnchorsback to summary
public PKIXExtendedParameters.Builder setTrustAnchors(Set<TrustAnchor> trustAnchors)

Set the set of trustAnchors to be used with these parameters.

Parameters
trustAnchors:Set<TrustAnchor>

a set of trustAnchors, one of which a particular end-entity and it's associated CRLs must be based on.

Returns:PKIXExtendedParameters.Builder

the current builder.

setUseDeltasEnabledback to summary
public PKIXExtendedParameters.Builder setUseDeltasEnabled(boolean useDeltas)

Sets if delta CRLs should be used for checking the revocation status.

Parameters
useDeltas:boolean

true if delta CRLs should be used.

setValidityModelback to summary
public PKIXExtendedParameters.Builder setValidityModel(int validityModel)
Parameters
validityModel:int

The validity model to set.

See Also
CHAIN_VALIDITY_MODEL, PKIX_VALIDITY_MODEL