PKIXExtendedBuilderParameters.Builder (Bouncy Castle Library 1.54 API Specification)
Date: 2015-12-29

org.bouncycastle.jcajce

## Class PKIXExtendedBuilderParameters.Builder

- java.lang.Object
- - org.bouncycastle.jcajce.PKIXExtendedBuilderParameters.Builder

- Enclosing class:
    PKIXExtendedBuilderParameters

      public static class PKIXExtendedBuilderParameters.Builder
      extends java.lang.Object

  Builder for a PKIXExtendedBuilderParameters object.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PKIXExtendedBuilderParameters.Builder(java.security.cert.PKIXBuilderParameters baseParameters)`
    `PKIXExtendedBuilderParameters.Builder(PKIXExtendedParameters baseParameters)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `PKIXExtendedBuilderParameters.Builder` | `addExcludedCerts(java.util.Set<java.security.cert.X509Certificate> excludedCerts)` Adds excluded certificates which are not used for building a certification path.
    `PKIXExtendedBuilderParameters` | `build()`
    `PKIXExtendedBuilderParameters.Builder` | `setMaxPathLength(int maxPathLength)` Sets the maximum number of intermediate non-self-issued certificates in a certification path.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PKIXExtendedBuilderParameters.Builder

          public PKIXExtendedBuilderParameters.Builder(java.security.cert.PKIXBuilderParameters baseParameters)

    - #### PKIXExtendedBuilderParameters.Builder

          public PKIXExtendedBuilderParameters.Builder(PKIXExtendedParameters baseParameters)

  - ### Method Detail

    - #### addExcludedCerts

          public PKIXExtendedBuilderParameters.Builder addExcludedCerts(java.util.Set<java.security.cert.X509Certificate> excludedCerts)

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

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

      Parameters:
        `excludedCerts` - The excluded certificates to set.

    - #### setMaxPathLength

          public PKIXExtendedBuilderParameters.Builder 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` - the maximum number of non-self-issued intermediate certificates in the certification path
      Throws:
        `java.security.InvalidParameterException` - if `maxPathLength` is set to a value less than -1
      See Also:
        `PKIXExtendedBuilderParameters.getMaxPathLength()`

    - #### build

          public PKIXExtendedBuilderParameters build()