Top Description Fields Constructors Methods
org.bouncycastle.x509

public Class ExtendedPKIXBuilderParameters

extends ExtendedPKIXParameters
Class Inheritance
Imports
org.bouncycastle.util.Selector, java.security.InvalidAlgorithmParameterException, .InvalidParameterException, java.security.cert.PKIXBuilderParameters, .PKIXParameters, .TrustAnchor, .X509CertSelector, java.util.Collections, .HashSet, .Set

Deprecated

use PKIXExtendedBuilderParameters

This class contains extended parameters for PKIX certification path builders.
See Also
java.security.cert.PKIXBuilderParameters, org.bouncycastle.jce.provider.PKIXCertPathBuilderSpi

Field Summary

Modifier and TypeField and Description
private Set<E>
private int
Inherited from org.bouncycastle.x509.ExtendedPKIXParameters:
CHAIN_VALIDITY_MODELPKIX_VALIDITY_MODEL

Constructor Summary

AccessConstructor and Description
public
ExtendedPKIXBuilderParameters(Set<E>
a Set of TrustAnchors
trustAnchors
,
Selector<T>
a Selector specifying the constraints on the target certificate or attribute certificate.
targetConstraints
)

Creates an instance of PKIXBuilderParameters with the specified Set of most-trusted CAs.

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

a copy of this PKIXParameters object
clone
()

Overrides org.bouncycastle.x509.ExtendedPKIXParameters.clone.

Implements java.security.cert.CertPathParameters.clone.

Makes a copy of this PKIXParameters object.

public Set<E>

Returns:

Returns the excluded certificates.
getExcludedCerts
()

Excluded certificates are not used for building a certification path.

public static ExtendedPKIXParameters

Returns:

An ExtendedPKIXBuilderParameters instance.
getInstance
(PKIXParameters
The PKIX parameters to create a copy of.
pkixParams
)

Hides org.bouncycastle.x509.ExtendedPKIXParameters.getInstance.

References Deprecated ExtendedPKIXParameters is deprecated or references (maybe indirectly) at least one deprecated element.

Returns an instance of ExtendedPKIXParameters which can be safely casted to ExtendedPKIXBuilderParameters.

public int

Returns:

the maximum number of non-self-issued intermediate certificates in the certification path, or -1 if no limit exists.
getMaxPathLength
()

Returns the value of the maximum number of intermediate non-self-issued certificates in the certification path.

public void
setExcludedCerts(Set<E>
The excluded certificates to set.
excludedCerts
)

Sets the excluded certificates which are not used for building a certification path.

public void
setMaxPathLength(int
the maximum number of non-self-issued intermediate certificates in the certification path
maxPathLength
)

Sets the maximum number of intermediate non-self-issued certificates in a certification path.

protected void
setParams(PKIXParameters
Parameters to set.
params
)

Overrides org.bouncycastle.x509.ExtendedPKIXParameters.setParams.

Can alse handle ExtendedPKIXBuilderParameters and PKIXBuilderParameters.

Inherited from org.bouncycastle.x509.ExtendedPKIXParameters:
addAddionalStoreaddAdditionalStoreaddStoregetAdditionalStoresgetAttrCertCheckersgetNecessaryACAttributesgetProhibitedACAttributesgetStoresgetTargetConstraintsgetTrustedACIssuersgetValidityModelisAdditionalLocationsEnabledisUseDeltasEnabledsetAdditionalLocationsEnabledsetAttrCertCheckerssetCertStoressetNecessaryACAttributessetProhibitedACAttributessetStoressetTargetCertConstraintssetTargetConstraintssetTrustedACIssuerssetUseDeltasEnabledsetValidityModel

Field Detail

excludedCertsback to summary
private Set<E> excludedCerts
maxPathLengthback to summary
private int maxPathLength

Constructor Detail

ExtendedPKIXBuilderParametersback to summary
public ExtendedPKIXBuilderParameters(Set<E> trustAnchors, Selector<T> targetConstraints) throws InvalidAlgorithmParameterException

Creates an instance of PKIXBuilderParameters with the specified Set of most-trusted CAs. Each element of the set is a TrustAnchor.

Note that the Set is copied to protect against subsequent modifications.

Parameters
trustAnchors:Set<E>

a Set of TrustAnchors

targetConstraints:Selector<T>

a Selector specifying the constraints on the target certificate or attribute certificate.

Exceptions
InvalidAlgorithmParameterException:
if trustAnchors is empty.
NullPointerException:
if trustAnchors is null
ClassCastException:
if any of the elements of trustAnchors is not of type java.security.cert.TrustAnchor

Method Detail

cloneback to summary
public Object clone()

Overrides org.bouncycastle.x509.ExtendedPKIXParameters.clone.

Implements java.security.cert.CertPathParameters.clone.

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

Returns:Object

a copy of this PKIXParameters object

getExcludedCertsback to summary
public Set<E> getExcludedCerts()

Excluded certificates are not used for building a certification path.

The returned set is immutable.

Returns:Set<E>

Returns the excluded certificates.

getInstanceback to summary
public static ExtendedPKIXParameters getInstance(PKIXParameters pkixParams)

Hides org.bouncycastle.x509.ExtendedPKIXParameters.getInstance.

References Deprecated

ExtendedPKIXParameters is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Returns an instance of ExtendedPKIXParameters which can be safely casted to ExtendedPKIXBuilderParameters.

This method can be used to get a copy from other PKIXBuilderParameters, PKIXParameters, and ExtendedPKIXParameters instances.

Parameters
pkixParams:PKIXParameters

The PKIX parameters to create a copy of.

Returns:ExtendedPKIXParameters

An ExtendedPKIXBuilderParameters instance.

getMaxPathLengthback to summary
public int getMaxPathLength()

Returns the value of the maximum number of intermediate non-self-issued certificates in the certification path.

Returns:int

the maximum number of non-self-issued intermediate certificates in the certification path, or -1 if no limit exists.

See Also
setMaxPathLength(int)
setExcludedCertsback to summary
public void setExcludedCerts(Set<E> excludedCerts)

Sets the excluded certificates which are not used for building a certification path. If the Set is null an empty set is assumed.

The given set is cloned to protect it against subsequent modifications.

Parameters
excludedCerts:Set<E>

The excluded certificates to set.

setMaxPathLengthback to summary
public void setMaxPathLength(int maxPathLength)

Sets the maximum number of intermediate non-self-issued certificates in a certification path. The PKIX CertPathBuilder must not build paths longer then this length.

A value of 0 implies that the path can only contain a single certificate. A value of -1 does not limit the length. The default length is 5.

The basic constraints extension of a CA certificate overrides this value if smaller.

Parameters
maxPathLength:int

the maximum number of non-self-issued intermediate certificates in the certification path

Exceptions
InvalidParameterException:
if maxPathLength is set to a value less than -1
See Also
org.bouncycastle.jce.provider.PKIXCertPathBuilderSpi, getMaxPathLength
setParamsback to summary
protected void setParams(PKIXParameters params)

Overrides org.bouncycastle.x509.ExtendedPKIXParameters.setParams.

Can alse handle ExtendedPKIXBuilderParameters and PKIXBuilderParameters.

Parameters
params:PKIXParameters

Parameters to set.

See Also
org.bouncycastle.x509.ExtendedPKIXParameters#setParams(java.security.cert.PKIXParameters)