Package org.conscrypt
Class ConscryptServerSocket
java.lang.Object
java.net.ServerSocket
javax.net.ssl.SSLServerSocket
org.conscrypt.ConscryptServerSocket
- All Implemented Interfaces:
Closeable,AutoCloseable
BoringSSL-based implementation of server sockets.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConscryptServerSocket(int port, int backlog, InetAddress iAddress, SSLParametersImpl sslParameters) ConscryptServerSocket(int port, int backlog, SSLParametersImpl sslParameters) ConscryptServerSocket(int port, SSLParametersImpl sslParameters) ConscryptServerSocket(SSLParametersImpl sslParameters) -
Method Summary
Modifier and TypeMethodDescriptionaccept()String[]String[]The names of the protocols' versions that in use on this SSL connection.booleanbooleanString[]String[]The names of the protocols' versions that may be used on this SSL connection.booleanboolean(package private) booleanChecks whether the TLS Channel ID extension is enabled for this server socket.(package private) voidsetChannelIdEnabled(boolean enabled) Enables/disables the TLS Channel ID extension for this server socket.voidsetEnabledCipherSuites(String[] suites) This method enables the cipher suites listed by getSupportedCipherSuites().voidsetEnabledProtocols(String[] protocols) This method enables the protocols' versions listed by getSupportedProtocols().voidsetEnableSessionCreation(boolean flag) voidsetNeedClientAuth(boolean need) voidsetUseClientMode(boolean mode) (package private) ConscryptServerSocketsetUseEngineSocket(boolean useEngineSocket) Configures the socket to be created for this instance.voidsetWantClientAuth(boolean want) Methods inherited from class javax.net.ssl.SSLServerSocket
getSSLParameters, setSSLParametersMethods inherited from class java.net.ServerSocket
bind, bind, close, getChannel, getInetAddress, getLocalPort, getLocalSocketAddress, getOption, getReceiveBufferSize, getReuseAddress, getSoTimeout, implAccept, isBound, isClosed, setOption, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSocketFactory, setSoTimeout, supportedOptions, toString
-
Field Details
-
sslParameters
-
channelIdEnabled
private boolean channelIdEnabled -
useEngineSocket
private boolean useEngineSocket
-
-
Constructor Details
-
ConscryptServerSocket
ConscryptServerSocket(SSLParametersImpl sslParameters) throws IOException - Throws:
IOException
-
ConscryptServerSocket
ConscryptServerSocket(int port, SSLParametersImpl sslParameters) throws IOException - Throws:
IOException
-
ConscryptServerSocket
ConscryptServerSocket(int port, int backlog, SSLParametersImpl sslParameters) throws IOException - Throws:
IOException
-
ConscryptServerSocket
ConscryptServerSocket(int port, int backlog, InetAddress iAddress, SSLParametersImpl sslParameters) throws IOException - Throws:
IOException
-
-
Method Details
-
setUseEngineSocket
Configures the socket to be created for this instance. -
getEnableSessionCreation
public boolean getEnableSessionCreation()- Specified by:
getEnableSessionCreationin classSSLServerSocket
-
setEnableSessionCreation
public void setEnableSessionCreation(boolean flag) - Specified by:
setEnableSessionCreationin classSSLServerSocket
-
getSupportedProtocols
The names of the protocols' versions that may be used on this SSL connection.- Specified by:
getSupportedProtocolsin classSSLServerSocket- Returns:
- an array of protocols names
-
getEnabledProtocols
The names of the protocols' versions that in use on this SSL connection.- Specified by:
getEnabledProtocolsin classSSLServerSocket- Returns:
- an array of protocols names
-
setEnabledProtocols
This method enables the protocols' versions listed by getSupportedProtocols().- Specified by:
setEnabledProtocolsin classSSLServerSocket- Parameters:
protocols- names of all the protocols to enable.- Throws:
IllegalArgumentException- when one or more of the names in the array are not supported, or when the array is null.
-
getSupportedCipherSuites
- Specified by:
getSupportedCipherSuitesin classSSLServerSocket
-
getEnabledCipherSuites
- Specified by:
getEnabledCipherSuitesin classSSLServerSocket
-
setChannelIdEnabled
void setChannelIdEnabled(boolean enabled) Enables/disables the TLS Channel ID extension for this server socket. -
isChannelIdEnabled
boolean isChannelIdEnabled()Checks whether the TLS Channel ID extension is enabled for this server socket. -
setEnabledCipherSuites
This method enables the cipher suites listed by getSupportedCipherSuites().- Specified by:
setEnabledCipherSuitesin classSSLServerSocket- Parameters:
suites- the names of all the cipher suites to enable- Throws:
IllegalArgumentException- when one or more of the ciphers in array suites are not supported, or when the array is null.
-
getWantClientAuth
public boolean getWantClientAuth()- Specified by:
getWantClientAuthin classSSLServerSocket
-
setWantClientAuth
public void setWantClientAuth(boolean want) - Specified by:
setWantClientAuthin classSSLServerSocket
-
getNeedClientAuth
public boolean getNeedClientAuth()- Specified by:
getNeedClientAuthin classSSLServerSocket
-
setNeedClientAuth
public void setNeedClientAuth(boolean need) - Specified by:
setNeedClientAuthin classSSLServerSocket
-
setUseClientMode
public void setUseClientMode(boolean mode) - Specified by:
setUseClientModein classSSLServerSocket
-
getUseClientMode
public boolean getUseClientMode()- Specified by:
getUseClientModein classSSLServerSocket
-
accept
- Overrides:
acceptin classServerSocket- Throws:
IOException
-