Package org.apache.zookeeper.common
Class SSLContextAndOptions
- java.lang.Object
-
- org.apache.zookeeper.common.SSLContextAndOptions
-
public class SSLContextAndOptions extends java.lang.ObjectWrapper 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.netty.handler.ssl.SslContextcreateNettyJdkSslContext(javax.net.ssl.SSLContext sslContext, boolean isClientSocket)javax.net.ssl.SSLServerSocketcreateSSLServerSocket()javax.net.ssl.SSLServerSocketcreateSSLServerSocket(int port)javax.net.ssl.SSLSocketcreateSSLSocket()javax.net.ssl.SSLSocketcreateSSLSocket(java.net.Socket socket, byte[] pushbackBytes)intgetHandshakeDetectionTimeoutMillis()javax.net.ssl.SSLContextgetSSLContext()
-
-
-
Method Detail
-
getSSLContext
public javax.net.ssl.SSLContext getSSLContext()
-
createSSLSocket
public javax.net.ssl.SSLSocket createSSLSocket() throws java.io.IOException- Throws:
java.io.IOException
-
createSSLSocket
public javax.net.ssl.SSLSocket createSSLSocket(java.net.Socket socket, byte[] pushbackBytes) throws java.io.IOException- Throws:
java.io.IOException
-
createSSLServerSocket
public javax.net.ssl.SSLServerSocket createSSLServerSocket() throws java.io.IOException- Throws:
java.io.IOException
-
createSSLServerSocket
public javax.net.ssl.SSLServerSocket createSSLServerSocket(int port) throws java.io.IOException- Throws:
java.io.IOException
-
createNettyJdkSslContext
public io.netty.handler.ssl.SslContext createNettyJdkSslContext(javax.net.ssl.SSLContext sslContext, boolean isClientSocket)
-
getHandshakeDetectionTimeoutMillis
public int getHandshakeDetectionTimeoutMillis()
-
-