Package org.conscrypt
Class OpenSSLSocketImpl
- java.lang.Object
-
- java.net.Socket
-
- javax.net.ssl.SSLSocket
-
- org.conscrypt.OpenSSLSocketImpl
-
- All Implemented Interfaces:
Closeable,AutoCloseable
@Internal public abstract class OpenSSLSocketImpl extends SSLSocket
Public shim allowing us to stay backward-compatible with legacy applications which were using Conscrypt's extended socket API before the introduction of theConscryptclass.
-
-
Method Summary
-
Methods inherited from class javax.net.ssl.SSLSocket
getEnabledCipherSuites, getEnabledProtocols, getEnableSessionCreation, getHandshakeApplicationProtocolSelector, getNeedClientAuth, getSession, getSSLParameters, getSupportedCipherSuites, getSupportedProtocols, getUseClientMode, getWantClientAuth, setEnabledCipherSuites, setEnabledProtocols, setEnableSessionCreation, setHandshakeApplicationProtocolSelector, setNeedClientAuth, setSSLParameters, setUseClientMode, setWantClientAuth, startHandshake
-
Methods inherited from class java.net.Socket
getOption, setOption, setSocketImplFactory, supportedOptions
-
-
-
-
Method Detail
-
getHostname
public String getHostname()
-
setHostname
public void setHostname(String hostname)
-
getHostnameOrIP
public String getHostnameOrIP()
-
getFileDescriptor$
public FileDescriptor getFileDescriptor$()
-
setSoWriteTimeout
public void setSoWriteTimeout(int writeTimeoutMilliseconds) throws SocketException- Throws:
SocketException
-
getSoWriteTimeout
public int getSoWriteTimeout() throws SocketException- Throws:
SocketException
-
setHandshakeTimeout
public void setHandshakeTimeout(int handshakeTimeoutMilliseconds) throws SocketException- Throws:
SocketException
-
getHandshakeSession
public abstract SSLSession getHandshakeSession()
-
setUseSessionTickets
public abstract void setUseSessionTickets(boolean useSessionTickets)
-
setChannelIdEnabled
public abstract void setChannelIdEnabled(boolean enabled)
-
getChannelId
public abstract byte[] getChannelId() throws SSLException- Throws:
SSLException
-
setChannelIdPrivateKey
public abstract void setChannelIdPrivateKey(PrivateKey privateKey)
-
getNpnSelectedProtocol
@Deprecated public final byte[] getNpnSelectedProtocol()
Deprecated.NPN is not supported
-
setNpnProtocols
@Deprecated public final void setNpnProtocols(byte[] npnProtocols)
Deprecated.NPN is not supported
-
setAlpnProtocols
@Deprecated public final void setAlpnProtocols(String[] alpnProtocols)
Deprecated.usesetApplicationProtocols(String[])instead.
-
getAlpnSelectedProtocol
@Deprecated public final byte[] getAlpnSelectedProtocol()
Deprecated.useSSLSocket.getApplicationProtocol()instead.
-
setAlpnProtocols
@Deprecated public final void setAlpnProtocols(byte[] protocols)
Deprecated.UsesetAlpnProtocols(String[])instead.
-
connect
public final void connect(SocketAddress endpoint) throws IOException
- Overrides:
connectin classSocket- Throws:
IOException
-
connect
public final void connect(SocketAddress endpoint, int timeout) throws IOException
Try to extract the peer's hostname if it's available from the endpoint address.- Overrides:
connectin classSocket- Throws:
IOException
-
bind
public void bind(SocketAddress bindpoint) throws IOException
- Overrides:
bindin classSocket- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classSocket- Throws:
IOException
-
getInetAddress
public InetAddress getInetAddress()
- Overrides:
getInetAddressin classSocket
-
getLocalAddress
public InetAddress getLocalAddress()
- Overrides:
getLocalAddressin classSocket
-
getLocalPort
public int getLocalPort()
- Overrides:
getLocalPortin classSocket
-
getRemoteSocketAddress
public SocketAddress getRemoteSocketAddress()
- Overrides:
getRemoteSocketAddressin classSocket
-
getLocalSocketAddress
public SocketAddress getLocalSocketAddress()
- Overrides:
getLocalSocketAddressin classSocket
-
addHandshakeCompletedListener
public void addHandshakeCompletedListener(HandshakeCompletedListener listener)
- Specified by:
addHandshakeCompletedListenerin classSSLSocket
-
removeHandshakeCompletedListener
public void removeHandshakeCompletedListener(HandshakeCompletedListener listener)
- Specified by:
removeHandshakeCompletedListenerin classSSLSocket
-
setSoTimeout
public final void setSoTimeout(int readTimeoutMilliseconds) throws SocketException- Overrides:
setSoTimeoutin classSocket- Throws:
SocketException
-
getSoTimeout
public final int getSoTimeout() throws SocketException- Overrides:
getSoTimeoutin classSocket- Throws:
SocketException
-
sendUrgentData
public final void sendUrgentData(int data) throws IOException- Overrides:
sendUrgentDatain classSocket- Throws:
IOException
-
setOOBInline
public final void setOOBInline(boolean on) throws SocketException- Overrides:
setOOBInlinein classSocket- Throws:
SocketException
-
getOOBInline
public boolean getOOBInline() throws SocketException- Overrides:
getOOBInlinein classSocket- Throws:
SocketException
-
getChannel
public SocketChannel getChannel()
- Overrides:
getChannelin classSocket
-
getInputStream
public InputStream getInputStream() throws IOException
- Overrides:
getInputStreamin classSocket- Throws:
IOException
-
getOutputStream
public OutputStream getOutputStream() throws IOException
- Overrides:
getOutputStreamin classSocket- Throws:
IOException
-
setTcpNoDelay
public void setTcpNoDelay(boolean on) throws SocketException- Overrides:
setTcpNoDelayin classSocket- Throws:
SocketException
-
getTcpNoDelay
public boolean getTcpNoDelay() throws SocketException- Overrides:
getTcpNoDelayin classSocket- Throws:
SocketException
-
setSoLinger
public void setSoLinger(boolean on, int linger) throws SocketException- Overrides:
setSoLingerin classSocket- Throws:
SocketException
-
getSoLinger
public int getSoLinger() throws SocketException- Overrides:
getSoLingerin classSocket- Throws:
SocketException
-
setSendBufferSize
public void setSendBufferSize(int size) throws SocketException- Overrides:
setSendBufferSizein classSocket- Throws:
SocketException
-
getSendBufferSize
public int getSendBufferSize() throws SocketException- Overrides:
getSendBufferSizein classSocket- Throws:
SocketException
-
setReceiveBufferSize
public void setReceiveBufferSize(int size) throws SocketException- Overrides:
setReceiveBufferSizein classSocket- Throws:
SocketException
-
getReceiveBufferSize
public int getReceiveBufferSize() throws SocketException- Overrides:
getReceiveBufferSizein classSocket- Throws:
SocketException
-
setKeepAlive
public void setKeepAlive(boolean on) throws SocketException- Overrides:
setKeepAlivein classSocket- Throws:
SocketException
-
getKeepAlive
public boolean getKeepAlive() throws SocketException- Overrides:
getKeepAlivein classSocket- Throws:
SocketException
-
setTrafficClass
public void setTrafficClass(int tc) throws SocketException- Overrides:
setTrafficClassin classSocket- Throws:
SocketException
-
getTrafficClass
public int getTrafficClass() throws SocketException- Overrides:
getTrafficClassin classSocket- Throws:
SocketException
-
setReuseAddress
public void setReuseAddress(boolean on) throws SocketException- Overrides:
setReuseAddressin classSocket- Throws:
SocketException
-
getReuseAddress
public boolean getReuseAddress() throws SocketException- Overrides:
getReuseAddressin classSocket- Throws:
SocketException
-
shutdownInput
public void shutdownInput() throws IOException- Overrides:
shutdownInputin classSocket- Throws:
IOException
-
shutdownOutput
public void shutdownOutput() throws IOException- Overrides:
shutdownOutputin classSocket- Throws:
IOException
-
isConnected
public boolean isConnected()
- Overrides:
isConnectedin classSocket
-
isInputShutdown
public boolean isInputShutdown()
- Overrides:
isInputShutdownin classSocket
-
isOutputShutdown
public boolean isOutputShutdown()
- Overrides:
isOutputShutdownin classSocket
-
setPerformancePreferences
public void setPerformancePreferences(int connectionTime, int latency, int bandwidth)- Overrides:
setPerformancePreferencesin classSocket
-
getApplicationProtocol
public abstract String getApplicationProtocol()
- Overrides:
getApplicationProtocolin classSSLSocket
-
getHandshakeApplicationProtocol
public abstract String getHandshakeApplicationProtocol()
- Overrides:
getHandshakeApplicationProtocolin classSSLSocket
-
-