Class SslContextProvider
java.lang.Object
com.clickhouse.client.api.internal.SslContextProvider
Builds
SSLContext instances for the client-v2 HTTP transport.
This is the client-v2 owned counterpart of the deprecated v1
ClickHouseDefaultSslContextProvider. It is kept separate so the v1 provider can evolve
(or stay frozen) independently of client-v2.
Contexts are assembled through builder(), which sets key material (client
certificate/key for mTLS) and trust material (trust store, CA certificate, or "trust all")
independently, mirroring the structure of the v1 getSslContextImpl.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassAssembles anSSLContextfrom independently configured key and trust material. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a newSslContextProvider.Builderfor assembling anSSLContext.getKeyStore(String cert, String key) static PrivateKeygetPrivateKey(String keyFile)
-
Constructor Details
-
SslContextProvider
public SslContextProvider()
-
-
Method Details
-
getPrivateKey
public static PrivateKey getPrivateKey(String keyFile) throws NoSuchAlgorithmException, InvalidKeySpecException, IOException -
getKeyStore
public KeyStore getKeyStore(String cert, String key) throws NoSuchAlgorithmException, InvalidKeySpecException, IOException, CertificateException, KeyStoreException -
builder
Creates a newSslContextProvider.Builderfor assembling anSSLContext. Key material (client certificate/key for mTLS) and trust material (trust store, CA certificate, or "trust all") are configured independently, mirroring the structure of the v1getSslContextImpl.- Returns:
- new builder
-