PKIXBuilderParameters
    open class PKIXBuilderParameters : PKIXParameters
    
    Parameters used as input for the PKIX CertPathBuilder algorithm. 
     A PKIX CertPathBuilder uses these parameters to build a CertPath which has been validated according to the PKIX certification path validation algorithm. 
    To instantiate a PKIXBuilderParameters object, an application must specify one or more most-trusted CAs as defined by the PKIX certification path validation algorithm. The most-trusted CA can be specified using one of two constructors. An application can call  PKIXBuilderParameters(Set, CertSelector), specifying a Set of TrustAnchor objects, each of which identifies a most-trusted CA. Alternatively, an application can call  PKIXBuilderParameters(KeyStore, CertSelector), specifying a KeyStore instance containing trusted certificate entries, each of which will be considered as a most-trusted CA. 
    In addition, an application must specify constraints on the target certificate that the CertPathBuilder will attempt to build a path to. The constraints are specified as a CertSelector object. These constraints should provide the CertPathBuilder with enough search criteria to find the target certificate. Minimal criteria for an X509Certificate usually include the subject name and/or one or more subject alternative names. If enough criteria is not specified, the CertPathBuilder may throw a CertPathBuilderException. 
     Concurrent Access 
     Unless otherwise specified, the methods defined in this class are not thread-safe. Multiple threads that need to access a single object concurrently should synchronize amongst themselves and provide the necessary locking. Multiple threads each manipulating separate objects need not synchronize.
    Summary
    
      
        
          | Public constructors | 
        
          | Creates an instance of PKIXBuilderParametersthat populates the set of most-trusted CAs from the trusted certificate entries contained in the specifiedKeyStore. | 
        
          | Creates an instance of PKIXBuilderParameterswith the specifiedSetof most-trusted CAs. | 
      
    
    
      
        
          | Public methods | 
        
          | open Int | Returns the value of the maximum number of intermediate non-self-issued certificates that may exist in a certification path. | 
        
          | open Unit | Sets the value of the maximum number of non-self-issued intermediate certificates that may exist in a certification path. | 
        
          | open String | Returns a formatted string describing the parameters. | 
      
    
    
      
        
          | Inherited functions | 
        
          | From class PKIXParameters
                
                  
                    | Unit | addCertPathChecker(checker: PKIXCertPathChecker!)
                         Adds a PKIXCertPathCheckerto the list of certification path checkers. See thesetCertPathCheckersmethod for more details.  Note that the PKIXCertPathCheckeris cloned to protect against subsequent modifications. |  
                    | Unit | addCertStore(store: CertStore!)
                         Adds a CertStoreto the end of the list ofCertStores used in finding certificates and CRLs. |  
                    | Any | clone()
                         Makes a copy of this PKIXParametersobject. Changes to the copy will not affect the original and vice versa. |  
                    | MutableList<PKIXCertPathChecker!>! | getCertPathCheckers()
                         Returns the Listof certification path checkers. The returnedListis immutable, and eachPKIXCertPathCheckerin theListis cloned to protect against subsequent modifications. |  
                    | MutableList<CertStore!>! | getCertStores()
                         Returns an immutable ListofCertStores that are used to find certificates and CRLs. |  
                    | Date! | getDate()
                         Returns the time for which the validity of the certification path should be determined. If null, the current time is used.  Note that the Datereturned is copied to protect against subsequent modifications. |  
                    | MutableSet<String!>! | getInitialPolicies()
                         Returns an immutable Setof initial policy identifiers (OID strings), indicating that any one of these policies would be acceptable to the certificate user for the purposes of certification path processing. The default return value is an emptySet, which is interpreted as meaning that any policy would be acceptable. |  
                    | Boolean | getPolicyQualifiersRejected()
                         Gets the PolicyQualifiersRejected flag. If this flag is true, certificates that include policy qualifiers in a certificate policies extension that is marked critical are rejected. If the flag is false, certificates are not rejected on this basis.   When a PKIXParametersobject is created, this flag is set to true. This setting reflects the most common (and simplest) strategy for processing policy qualifiers. Applications that want to use a more sophisticated policy must set this flag to false. |  
                    | String! | getSigProvider()
                         Returns the signature provider's name, or nullif not set. |  
                    | CertSelector! | getTargetCertConstraints()
                         Returns the required constraints on the target certificate. The constraints are returned as an instance of CertSelector. Ifnull, no constraints are defined. Note that the CertSelectorreturned is cloned to protect against subsequent modifications. |  
                    | MutableSet<TrustAnchor!>! | getTrustAnchors()
                         Returns an immutable Setof the most-trusted CAs. |  
                    | Boolean | isAnyPolicyInhibited()
                         Checks whether the any policy OID should be processed if it is included in a certificate. |  
                    | Boolean | isExplicitPolicyRequired()
                         Checks if explicit policy is required. If this flag is true, an acceptable policy needs to be explicitly identified in every certificate. By default, the ExplicitPolicyRequired flag is false. |  
                    | Boolean | isPolicyMappingInhibited()
                         Checks if policy mapping is inhibited. If this flag is true, policy mapping is inhibited. By default, policy mapping is not inhibited (the flag is false). |  
                    | Boolean | isRevocationEnabled()
                         Checks the RevocationEnabled flag. If this flag is true, the default revocation checking mechanism of the underlying PKIX service provider will be used. If this flag is false, the default revocation checking mechanism will be disabled (not used). See the setRevocationEnabledmethod for more details on setting the value of this flag. |  
                    | Unit | setAnyPolicyInhibited(val: Boolean)
                         Sets state to determine if the any policy OID should be processed if it is included in a certificate. By default, the any policy OID is not inhibited (isAnyPolicyInhibited()returnsfalse). |  
                    | Unit | setCertPathCheckers(checkers: MutableList<PKIXCertPathChecker!>!)
                         Sets a Listof additional certification path checkers. If the specifiedListcontains an object that is not aPKIXCertPathChecker, it is ignored.  Each PKIXCertPathCheckerspecified implements additional checks on a certificate. Typically, these are checks to process and verify private extensions contained in certificates. EachPKIXCertPathCheckershould be instantiated with any initialization parameters needed to execute the check.  This method allows sophisticated applications to extend a PKIX CertPathValidatororCertPathBuilder. Each of the specifiedPKIXCertPathCheckers will be called, in turn, by a PKIXCertPathValidatororCertPathBuilderfor each certificate processed or validated.  Regardless of whether these additional PKIXCertPathCheckers are set, a PKIXCertPathValidatororCertPathBuildermust perform all of the required PKIX checks on each certificate. The one exception to this rule is if the RevocationEnabled flag is set to false (see thesetRevocationEnabledmethod).  Note that the Listsupplied here is copied and eachPKIXCertPathCheckerin the list is cloned to protect against subsequent modifications. |  
                    | Unit | setCertStores(stores: MutableList<CertStore!>!)
                         Sets the list of CertStores to be used in finding certificates and CRLs. May benull, in which case noCertStores will be used. The firstCertStores in the list may be preferred to those that appear later.  Note that the Listis copied to protect against subsequent modifications. |  
                    | Unit | setDate(date: Date!)
                         Sets the time for which the validity of the certification path should be determined. If null, the current time is used.  Note that the Datesupplied here is copied to protect against subsequent modifications. |  
                    | Unit | setExplicitPolicyRequired(val: Boolean)
                         Sets the ExplicitPolicyRequired flag. If this flag is true, an acceptable policy needs to be explicitly identified in every certificate. By default, the ExplicitPolicyRequired flag is false. |  
                    | Unit | setInitialPolicies(initialPolicies: MutableSet<String!>!)
                         Sets the Setof initial policy identifiers (OID strings), indicating that any one of these policies would be acceptable to the certificate user for the purposes of certification path processing. By default, any policy is acceptable (i.e. all policies), so a user that wants to allow any policy as acceptable does not need to call this method, or can call it with an emptySet(ornull).  Note that the Setis copied to protect against subsequent modifications. |  
                    | Unit | setPolicyMappingInhibited(val: Boolean)
                         Sets the PolicyMappingInhibited flag. If this flag is true, policy mapping is inhibited. By default, policy mapping is not inhibited (the flag is false). |  
                    | Unit | setPolicyQualifiersRejected(qualifiersRejected: Boolean)
                         Sets the PolicyQualifiersRejected flag. If this flag is true, certificates that include policy qualifiers in a certificate policies extension that is marked critical are rejected. If the flag is false, certificates are not rejected on this basis.   When a PKIXParametersobject is created, this flag is set to true. This setting reflects the most common (and simplest) strategy for processing policy qualifiers. Applications that want to use a more sophisticated policy must set this flag to false.  Note that the PKIX certification path validation algorithm specifies that any policy qualifier in a certificate policies extension that is marked critical must be processed and validated. Otherwise the certification path must be rejected. If the policyQualifiersRejected flag is set to false, it is up to the application to validate all policy qualifiers in this manner in order to be PKIX compliant. |  
                    | Unit | setRevocationEnabled(val: Boolean)
                         Sets the RevocationEnabled flag. If this flag is true, the default revocation checking mechanism of the underlying PKIX service provider will be used. If this flag is false, the default revocation checking mechanism will be disabled (not used).   When a PKIXParametersobject is created, this flag is set to true. This setting reflects the most common strategy for checking revocation, since each service provider must support revocation checking to be PKIX compliant. Sophisticated applications should set this flag to false when it is not practical to use a PKIX service provider's default revocation checking mechanism or when an alternative revocation checking mechanism is to be substituted (by also calling theaddCertPathCheckerorsetCertPathCheckersmethods). |  
                    | Unit | setSigProvider(sigProvider: String!)
                         Sets the signature provider's name. The specified provider will be preferred when creating Signatureobjects. Ifnullor not set, the first provider found supporting the algorithm will be used. |  
                    | Unit | setTargetCertConstraints(selector: CertSelector!)
                         Sets the required constraints on the target certificate. The constraints are specified as an instance of CertSelector. Ifnull, no constraints are defined. Note that the CertSelectorspecified is cloned to protect against subsequent modifications. |  
                    | Unit | setTrustAnchors(trustAnchors: MutableSet<TrustAnchor!>!)
                         Sets the Setof most-trusted CAs.  Note that the Setis copied to protect against subsequent modifications. |  | 
      
    
    Public constructors
    
      PKIXBuilderParameters
      
      PKIXBuilderParameters(
    keystore: KeyStore!, 
    targetConstraints: CertSelector!)
      Creates an instance of PKIXBuilderParameters that populates the set of most-trusted CAs from the trusted certificate entries contained in the specified KeyStore. Only keystore entries that contain trusted X509Certificates are considered; all other certificate types are ignored.
      
        
          
            | Parameters | 
          
            | keystore | KeyStore!: a KeyStorefrom which the set of most-trusted CAs will be populated | 
          
            | targetConstraints | CertSelector!: a CertSelectorspecifying the constraints on the target certificate | 
        
      
      
        
          
            | Exceptions | 
          
            | java.security.KeyStoreException | if keystorehas not been initialized | 
          
            | java.security.InvalidAlgorithmParameterException | if keystoredoes not contain at least one trusted certificate entry | 
          
            | java.lang.NullPointerException | if keystoreisnull | 
        
      
     
    
      PKIXBuilderParameters
      
      PKIXBuilderParameters(
    trustAnchors: MutableSet<TrustAnchor!>!, 
    targetConstraints: CertSelector!)
      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 | MutableSet<TrustAnchor!>!: a SetofTrustAnchors | 
          
            | targetConstraints | CertSelector!: a CertSelectorspecifying the constraints on the target certificate | 
        
      
      
        
          
            | Exceptions | 
          
            | java.security.InvalidAlgorithmParameterException | if trustAnchorsis empty(trustAnchors.isEmpty() == true) | 
          
            | java.lang.NullPointerException | if trustAnchorsisnull | 
          
            | java.lang.ClassCastException | if any of the elements of trustAnchorsare not of typejava.security.cert.TrustAnchor | 
        
      
     
    Public methods
    
      getMaxPathLength
      
      open fun getMaxPathLength(): Int
      Returns the value of the maximum number of intermediate non-self-issued certificates that may exist in a certification path. See the setMaxPathLength method for more details.
      
        
          
            | Return | 
          
            | Int | the maximum number of non-self-issued intermediate certificates that may exist in a certification path, or -1 if there is no limit | 
        
      
      
     
    
      setMaxPathLength
      
      open fun setMaxPathLength(maxPathLength: Int): Unit
      Sets the value of the maximum number of non-self-issued intermediate certificates that may exist in a certification path. A certificate is self-issued if the DNs that appear in the subject and issuer fields are identical and are not empty. Note that the last certificate in a certification path is not an intermediate certificate, and is not included in this limit. Usually the last certificate is an end entity certificate, but it can be a CA certificate. A PKIX CertPathBuilder instance must not build paths longer than the length specified. 
       A value of 0 implies that the path can only contain a single certificate. A value of -1 implies that the path length is unconstrained (i.e. there is no maximum). The default maximum path length, if not specified, is 5. Setting a value less than -1 will cause an exception to be thrown. 
       If any of the CA certificates contain the BasicConstraintsExtension, the value of the pathLenConstraint field of the extension overrides the maximum path length parameter whenever the result is a certification path of smaller length.
      
        
          
            | Parameters | 
          
            | maxPathLength | Int: the maximum number of non-self-issued intermediate certificates that may exist in a certification path | 
        
      
      
        
          
            | Exceptions | 
          
            | java.security.InvalidParameterException | if maxPathLengthis set to a value less than -1 | 
        
      
      
     
    
      toString
      
      open fun toString(): String
      Returns a formatted string describing the parameters.
      
        
          
            | Return | 
          
            | String | a formatted string describing the parameters |