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