public class PKIXBuilderParameters extends PKIXParameters
CertPathBuilder
algorithm used to build
certificate chains validated with the PKIX certification path validation.
The parameters must be created with trusted certificate authorities and constraints for the target certificates.
CertPathBuilder,
CertPathParameters| Constructor and Description |
|---|
PKIXBuilderParameters(KeyStore keyStore,
CertSelector targetConstraints)
Creates a new
PKIXBuilderParameters instance with the trusted
X509Certificate entries from the specified KeyStore. |
PKIXBuilderParameters(Set<TrustAnchor> trustAnchors,
CertSelector targetConstraints)
Creates a new
PKIXBuilderParameters instance with the specified
set of TrustAnchor and certificate constraints. |
| Modifier and Type | Method and Description |
|---|---|
int |
getMaxPathLength()
Returns the maximum length of a certification path.
|
void |
setMaxPathLength(int maxPathLength)
Set the maximum length of a certification path.
|
String |
toString()
Returns a string representation of this
PKIXBuilderParameters
instance. |
addCertPathChecker, addCertStore, clone, getCertPathCheckers, getCertStores, getDate, getInitialPolicies, getPolicyQualifiersRejected, getSigProvider, getTargetCertConstraints, getTrustAnchors, isAnyPolicyInhibited, isExplicitPolicyRequired, isPolicyMappingInhibited, isRevocationEnabled, setAnyPolicyInhibited, setCertPathCheckers, setCertStores, setDate, setExplicitPolicyRequired, setInitialPolicies, setPolicyMappingInhibited, setPolicyQualifiersRejected, setRevocationEnabled, setSigProvider, setTargetCertConstraints, setTrustAnchorspublic PKIXBuilderParameters(Set<TrustAnchor> trustAnchors, CertSelector targetConstraints) throws InvalidAlgorithmParameterException
PKIXBuilderParameters instance with the specified
set of TrustAnchor and certificate constraints.trustAnchors - the set of TrustAnchors.targetConstraints - the certificate constraints.InvalidAlgorithmParameterException - if trustAnchors is empty.ClassCastException - if one of the items in trustAnchors is not an
instance of java.security.cert.TrustAnchor.public PKIXBuilderParameters(KeyStore keyStore, CertSelector targetConstraints) throws KeyStoreException, InvalidAlgorithmParameterException
PKIXBuilderParameters instance with the trusted
X509Certificate entries from the specified KeyStore.keyStore - the key store containing trusted certificates.targetConstraints - the certificate constraints.KeyStoreException - if the keyStore is not initialized.InvalidAlgorithmParameterException - if keyStore does not contained any trusted
certificate entry.public int getMaxPathLength()
This is the maximum number of non-self-signed certificates in a certification path.
-1 if it
is unlimited.public void setMaxPathLength(int maxPathLength)
This is the maximum number of non-self-signed certificates in a certification path.
maxPathLength - the maximum length of a certification path.InvalidParameterException - if maxPathLength is less than -1.public String toString()
PKIXBuilderParameters
instance.toString in class PKIXParametersPKIXBuilderParameters
instance.