Package net.snowflake.client.core.crl

## Class VerifiedCertPathBuilder

- java.lang.Object
- - net.snowflake.client.core.crl.VerifiedCertPathBuilder

    @SnowflakeJdbcInternalApi
    public class VerifiedCertPathBuilder
    extends Object

Builds and verifies certificate paths using a truststore and CertPathBuilder. This class takes a certificate chain presented by a server and returns verified paths that include trust anchors for CRL validation support.

### Constructor Summary

Constructors
`VerifiedCertPathBuilder​(X509TrustManager trustManager)` Constructor that initializes the VerifiedCertPathBuilder with the provided trust manager.

### Method Summary

All Methods Instance Methods Concrete Methods
`List<X509Certificate[]>` `buildAllVerifiedPaths​(X509Certificate[] certificateChain, String authType)` Builds and verifies all possible certificate paths from leaf certificates to trust anchors.

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

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

### Constructor Detail

#### VerifiedCertPathBuilder

    public VerifiedCertPathBuilder​(X509TrustManager trustManager)
                            throws CertificateException

Constructor that initializes the VerifiedCertPathBuilder with the provided trust manager.

Parameters:
  `trustManager` - the X509TrustManager to use for certificate validation
Throws:
  `IllegalArgumentException` - if trustManager is null
  `CertificateException`

### Method Detail

#### buildAllVerifiedPaths

    public List<X509Certificate[]> buildAllVerifiedPaths​(X509Certificate[] certificateChain,
                                                         String authType)
                                                  throws CertificateException,
                                                         CertPathBuilderException

Builds and verifies all possible certificate paths from leaf certificates to trust anchors. Unlike standard PKIX path building, this method includes trust anchor certificates at the end of each path for CRL validation support.

Parameters:
  `certificateChain` - the certificate chain presented by the server
  `authType` - the authentication type used for the connection
Returns:
  a list of all verified certificate paths with trust anchors included
Throws:
  `CertificateException` - if certificate validation fails
  `CertPathBuilderException` - if no valid certificate paths could be built