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 Constructor Description VerifiedCertPathBuilder(X509TrustManager trustManager)Constructor that initializes the VerifiedCertPathBuilder with the provided trust manager.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<X509Certificate[]>buildAllVerifiedPaths(X509Certificate[] certificateChain, String authType)Builds and verifies all possible certificate paths from leaf certificates to trust anchors.
-
-
-
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 nullCertificateException
-
-
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 serverauthType- the authentication type used for the connection- Returns:
- a list of all verified certificate paths with trust anchors included
- Throws:
CertificateException- if certificate validation failsCertPathBuilderException- if no valid certificate paths could be built
-
-