# Class ClientX509Util

java.lang.Object
org.apache.zookeeper.common.X509Util
org.apache.zookeeper.common.ClientX509Util

All Implemented Interfaces:
  `Closeable, AutoCloseable`

public class ClientX509Util extends X509Util
X509 utilities specific for client-server communication framework.

## Nested Class Summary

### Nested classes/interfaces inherited from class X509Util

`X509Util.ClientAuth`

## Field Summary

### Fields inherited from class X509Util

`DEFAULT_HANDSHAKE_DETECTION_TIMEOUT_MILLIS, DEFAULT_PROTOCOL, FIPS_MODE_PROPERTY, TLS_1_1, TLS_1_2, TLS_1_3`

## Constructor Summary

Constructors
Constructor
Description
`ClientX509Util()`

## Method Summary

Modifier and Type
Method
Description
`io.netty.handler.ssl.SslContext`
`createNettySslContextForClient(ZKConfig config)`
`io.netty.handler.ssl.SslContext`
`createNettySslContextForServer(ZKConfig config)`
`io.netty.handler.ssl.SslContext`
`createNettySslContextForServer(ZKConfig config, KeyManager keyManager, TrustManager trustManager)`
`protected String`
`getConfigPrefix()`
`String`
`getSslAuthProviderProperty()`
`io.netty.handler.ssl.SslProvider`
`getSslProvider(ZKConfig config)`
`String`
`getSslProviderProperty()`
`protected boolean`
`shouldAllowReverseDnsLookup()`
`protected boolean`
`shouldVerifyClientHostname()`

### Methods inherited from class X509Util

`allowReverseDnsLookup, close, createKeyManager, createSSLContext, createSSLContextAndOptions, createSSLContextAndOptionsFromConfig, createSSLServerSocket, createSSLServerSocket, createSSLSocket, createSSLSocket, createTrustManager, enableCertFileReloading, getCipherSuitesProperty, getDefaultSSLContext, getDefaultSSLContextAndOptions, getFipsMode, getFipsModeProperty, getPasswordFromConfigPropertyOrFile, getSslAllowReverseDnsLookupProperty, getSslCipherSuitesProperty, getSslClientAuthProperty, getSslClientHostnameVerificationEnabledProperty, getSslContextSupplierClassProperty, getSslCrlEnabledProperty, getSslEnabledProtocolsProperty, getSslHandshakeDetectionTimeoutMillisProperty, getSslHandshakeTimeoutMillis, getSslHostnameVerificationEnabledProperty, getSslKeystoreLocationProperty, getSslKeystorePasswdPathProperty, getSslKeystorePasswdProperty, getSslKeystoreTypeProperty, getSslOcspEnabledProperty, getSslProtocolProperty, getSslTruststoreLocationProperty, getSslTruststorePasswdPathProperty, getSslTruststorePasswdProperty, getSslTruststoreTypeProperty, isClientHostnameVerificationEnabled, isServerHostnameVerificationEnabled, loadKeyStore, loadTrustStore`

### Methods inherited from class Object

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

## Constructor Details

### ClientX509Util

public ClientX509Util()

## Method Details

### getConfigPrefix

protected String getConfigPrefix()

Specified by:
  `getConfigPrefix` in class `X509Util`

### shouldVerifyClientHostname

protected boolean shouldVerifyClientHostname()

Specified by:
  `shouldVerifyClientHostname` in class `X509Util`

### shouldAllowReverseDnsLookup

protected boolean shouldAllowReverseDnsLookup()

Specified by:
  `shouldAllowReverseDnsLookup` in class `X509Util`

### getSslAuthProviderProperty

public String getSslAuthProviderProperty()

### getSslProviderProperty

public String getSslProviderProperty()

### createNettySslContextForClient

public io.netty.handler.ssl.SslContext createNettySslContextForClient(ZKConfig config) throws X509Exception.KeyManagerException, X509Exception.TrustManagerException, SSLException

Throws:
  `X509Exception.KeyManagerException`
  `X509Exception.TrustManagerException`
  `SSLException`

### createNettySslContextForServer

public io.netty.handler.ssl.SslContext createNettySslContextForServer(ZKConfig config) throws X509Exception.SSLContextException, X509Exception.KeyManagerException, X509Exception.TrustManagerException, SSLException

Throws:
  `X509Exception.SSLContextException`
  `X509Exception.KeyManagerException`
  `X509Exception.TrustManagerException`
  `SSLException`

### createNettySslContextForServer

public io.netty.handler.ssl.SslContext createNettySslContextForServer(ZKConfig config, KeyManager keyManager, TrustManager trustManager) throws SSLException

Throws:
  `SSLException`

### getSslProvider

public io.netty.handler.ssl.SslProvider getSslProvider(ZKConfig config)