Package net.snowflake.client.core.crl

## Class CRLValidator

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

    @SnowflakeJdbcInternalApi
    public class CRLValidator
    extends Object

### Constructor Summary

Constructors
`CRLValidator​(CertRevocationCheckMode revocationCheckMode, boolean allowCertificatesWithoutCrlUrl, org.apache.http.impl.client.CloseableHttpClient httpClient, CRLCacheManager cacheManager, Telemetry telemetryClient)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static void` `registerValidator​(HttpClientSettingsKey key, CRLValidator validator)`
`static void` `setTelemetryClientForKey​(HttpClientSettingsKey key, Telemetry telemetryClient)` Multiple sessions may share the same HttpClientSettingsKey thus CRL telemetry might be sent for wrong session.
`boolean` `validateCertificateChains​(List<X509Certificate[]> certificateChains)` Validates certificate chains against CRLs.

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

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

### Constructor Detail

#### CRLValidator

    public CRLValidator​(CertRevocationCheckMode revocationCheckMode,
                        boolean allowCertificatesWithoutCrlUrl,
                        org.apache.http.impl.client.CloseableHttpClient httpClient,
                        CRLCacheManager cacheManager,
                        Telemetry telemetryClient)

### Method Detail

#### validateCertificateChains

    public boolean validateCertificateChains​(List<X509Certificate[]> certificateChains)

Validates certificate chains against CRLs.

Parameters:
  `certificateChains` - the verified certificate chains to validate
Returns:
  true if validation passes, false otherwise

#### setTelemetryClientForKey

    public static void setTelemetryClientForKey​(HttpClientSettingsKey key,
                                                Telemetry telemetryClient)

Multiple sessions may share the same HttpClientSettingsKey thus CRL telemetry might be sent for wrong session. We accept this limitation.

#### registerValidator

    public static void registerValidator​(HttpClientSettingsKey key,
                                         CRLValidator validator)