Package org.apache.zookeeper.common
Class SSLContextAndOptions
java.lang.Object
org.apache.zookeeper.common.SSLContextAndOptions
Wrapper class for an SSLContext + some config options that can't be set on the context when it is created but
must be set on a secure socket created by the context after the socket creation. By wrapping the options in this
class we avoid reading from global system properties during socket configuration. This makes testing easier
since we can create different X509Util instances with different configurations in a single test process, and
unit test interactions between them.
-
Method Summary
Modifier and TypeMethodDescriptionio.netty.handler.ssl.SslContext
createNettyJdkSslContext
(SSLContext sslContext, boolean isClientSocket) createSSLServerSocket
(int port) createSSLSocket
(Socket socket, byte[] pushbackBytes) int
-
Method Details
-
getSSLContext
-
createSSLSocket
- Throws:
IOException
-
createSSLSocket
- Throws:
IOException
-
createSSLServerSocket
- Throws:
IOException
-
createSSLServerSocket
- Throws:
IOException
-
createNettyJdkSslContext
public io.netty.handler.ssl.SslContext createNettyJdkSslContext(SSLContext sslContext, boolean isClientSocket) -
getHandshakeDetectionTimeoutMillis
public int getHandshakeDetectionTimeoutMillis()
-