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.boolean
boolean
String[]
String[]
The names of the protocols' versions that may be used on this SSL connection.boolean
boolean
(package private) boolean
Checks whether the TLS Channel ID extension is enabled for this server socket.(package private) void
setChannelIdEnabled
(boolean enabled) Enables/disables the TLS Channel ID extension for this server socket.void
setEnabledCipherSuites
(String[] suites) This method enables the cipher suites listed by getSupportedCipherSuites().void
setEnabledProtocols
(String[] protocols) This method enables the protocols' versions listed by getSupportedProtocols().void
setEnableSessionCreation
(boolean flag) void
setNeedClientAuth
(boolean need) void
setUseClientMode
(boolean mode) (package private) ConscryptServerSocket
setUseEngineSocket
(boolean useEngineSocket) Configures the socket to be created for this instance.void
setWantClientAuth
(boolean want) Methods inherited from class javax.net.ssl.SSLServerSocket
getSSLParameters, setSSLParameters
Methods 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:
getEnableSessionCreation
in classSSLServerSocket
-
setEnableSessionCreation
public void setEnableSessionCreation(boolean flag) - Specified by:
setEnableSessionCreation
in classSSLServerSocket
-
getSupportedProtocols
The names of the protocols' versions that may be used on this SSL connection.- Specified by:
getSupportedProtocols
in classSSLServerSocket
- Returns:
- an array of protocols names
-
getEnabledProtocols
The names of the protocols' versions that in use on this SSL connection.- Specified by:
getEnabledProtocols
in classSSLServerSocket
- Returns:
- an array of protocols names
-
setEnabledProtocols
This method enables the protocols' versions listed by getSupportedProtocols().- Specified by:
setEnabledProtocols
in 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:
getSupportedCipherSuites
in classSSLServerSocket
-
getEnabledCipherSuites
- Specified by:
getEnabledCipherSuites
in 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:
setEnabledCipherSuites
in 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:
getWantClientAuth
in classSSLServerSocket
-
setWantClientAuth
public void setWantClientAuth(boolean want) - Specified by:
setWantClientAuth
in classSSLServerSocket
-
getNeedClientAuth
public boolean getNeedClientAuth()- Specified by:
getNeedClientAuth
in classSSLServerSocket
-
setNeedClientAuth
public void setNeedClientAuth(boolean need) - Specified by:
setNeedClientAuth
in classSSLServerSocket
-
setUseClientMode
public void setUseClientMode(boolean mode) - Specified by:
setUseClientMode
in classSSLServerSocket
-
getUseClientMode
public boolean getUseClientMode()- Specified by:
getUseClientMode
in classSSLServerSocket
-
accept
- Overrides:
accept
in classServerSocket
- Throws:
IOException
-