public class KitKatPlatformOpenSSLSocketImplAdapter
extends com.android.org.conscrypt.OpenSSLSocketImpl
org.conscrypt.OpenSSLSocketImpl.
This is to work around code that checks that the socket is an
org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl before
calling methods, such as setting SNI. This is only for KitKat.
It delegates all public methods in Socket, SSLSocket, and OpenSSLSocket from
KK.| Constructor and Description |
|---|
KitKatPlatformOpenSSLSocketImplAdapter(org.conscrypt.AbstractConscryptSocket delegate) |
getHandshakeSessionsetSocketImplFactorypublic KitKatPlatformOpenSSLSocketImplAdapter(org.conscrypt.AbstractConscryptSocket delegate)
throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class com.android.org.conscrypt.OpenSSLSocketImplIOExceptionpublic InputStream getInputStream() throws IOException
getInputStream in class com.android.org.conscrypt.OpenSSLSocketImplIOExceptionpublic int getLocalPort()
getLocalPort in class Socketpublic OutputStream getOutputStream() throws IOException
getOutputStream in class com.android.org.conscrypt.OpenSSLSocketImplIOExceptionpublic void connect(SocketAddress sockaddr, int timeout) throws IOException
connect in class SocketIOExceptionpublic void connect(SocketAddress sockaddr) throws IOException
connect in class SocketIOExceptionpublic void bind(SocketAddress sockaddr) throws IOException
bind in class SocketIOExceptionpublic SocketAddress getRemoteSocketAddress()
getRemoteSocketAddress in class Socketpublic SocketAddress getLocalSocketAddress()
getLocalSocketAddress in class Socketpublic InetAddress getLocalAddress()
getLocalAddress in class Socketpublic InetAddress getInetAddress()
getInetAddress in class Socketpublic void setSoLinger(boolean on,
int linger)
throws SocketException
setSoLinger in class SocketSocketExceptionpublic void setTcpNoDelay(boolean on)
throws SocketException
setTcpNoDelay in class SocketSocketExceptionpublic void setReuseAddress(boolean on)
throws SocketException
setReuseAddress in class SocketSocketExceptionpublic void setKeepAlive(boolean on)
throws SocketException
setKeepAlive in class SocketSocketExceptionpublic void setTrafficClass(int tos)
throws SocketException
setTrafficClass in class SocketSocketExceptionpublic void setSoTimeout(int to)
throws SocketException
setSoTimeout in class com.android.org.conscrypt.OpenSSLSocketImplSocketExceptionpublic void setSendBufferSize(int size)
throws SocketException
setSendBufferSize in class SocketSocketExceptionpublic void setReceiveBufferSize(int size)
throws SocketException
setReceiveBufferSize in class SocketSocketExceptionpublic boolean getTcpNoDelay()
throws SocketException
getTcpNoDelay in class SocketSocketExceptionpublic boolean getReuseAddress()
throws SocketException
getReuseAddress in class SocketSocketExceptionpublic boolean getKeepAlive()
throws SocketException
getKeepAlive in class SocketSocketExceptionpublic int getSoTimeout()
throws SocketException
getSoTimeout in class com.android.org.conscrypt.OpenSSLSocketImplSocketExceptionpublic int getSoLinger()
throws SocketException
getSoLinger in class SocketSocketExceptionpublic int getSendBufferSize()
throws SocketException
getSendBufferSize in class SocketSocketExceptionpublic int getReceiveBufferSize()
throws SocketException
getReceiveBufferSize in class SocketSocketExceptionpublic boolean isConnected()
isConnected in class Socketpublic boolean isOutputShutdown()
isOutputShutdown in class Socketpublic boolean isInputShutdown()
isInputShutdown in class Socketpublic void shutdownInput()
throws IOException
shutdownInput in class SocketIOExceptionpublic void shutdownOutput()
throws IOException
shutdownOutput in class SocketIOExceptionpublic void setOOBInline(boolean oobinline)
throws SocketException
setOOBInline in class com.android.org.conscrypt.OpenSSLSocketImplSocketExceptionpublic boolean getOOBInline()
throws SocketException
getOOBInline in class SocketSocketExceptionpublic int getTrafficClass()
throws SocketException
getTrafficClass in class SocketSocketExceptionpublic void sendUrgentData(int value)
throws IOException
sendUrgentData in class com.android.org.conscrypt.OpenSSLSocketImplIOExceptionpublic SocketChannel getChannel()
getChannel in class Socketpublic FileDescriptor getFileDescriptor$()
getFileDescriptor$ in class com.android.org.conscrypt.OpenSSLSocketImplpublic void setPerformancePreferences(int connectionTime,
int latency,
int bandwidth)
setPerformancePreferences in class Socketpublic String[] getSupportedCipherSuites()
getSupportedCipherSuites in class com.android.org.conscrypt.OpenSSLSocketImplpublic String[] getEnabledCipherSuites()
getEnabledCipherSuites in class com.android.org.conscrypt.OpenSSLSocketImplpublic void setEnabledCipherSuites(String[] suites)
setEnabledCipherSuites in class com.android.org.conscrypt.OpenSSLSocketImplpublic String[] getSupportedProtocols()
getSupportedProtocols in class com.android.org.conscrypt.OpenSSLSocketImplpublic String[] getEnabledProtocols()
getEnabledProtocols in class com.android.org.conscrypt.OpenSSLSocketImplpublic void setEnabledProtocols(String[] protocols)
setEnabledProtocols in class com.android.org.conscrypt.OpenSSLSocketImplpublic SSLSession getSession()
getSession in class com.android.org.conscrypt.OpenSSLSocketImplpublic void addHandshakeCompletedListener(HandshakeCompletedListener listener)
addHandshakeCompletedListener in class com.android.org.conscrypt.OpenSSLSocketImplpublic void removeHandshakeCompletedListener(HandshakeCompletedListener listener)
removeHandshakeCompletedListener in class com.android.org.conscrypt.OpenSSLSocketImplpublic void startHandshake()
throws IOException
startHandshake in class com.android.org.conscrypt.OpenSSLSocketImplIOExceptionpublic void setUseClientMode(boolean mode)
setUseClientMode in class com.android.org.conscrypt.OpenSSLSocketImplpublic boolean getUseClientMode()
getUseClientMode in class com.android.org.conscrypt.OpenSSLSocketImplpublic void setNeedClientAuth(boolean need)
setNeedClientAuth in class com.android.org.conscrypt.OpenSSLSocketImplpublic void setWantClientAuth(boolean want)
setWantClientAuth in class com.android.org.conscrypt.OpenSSLSocketImplpublic boolean getNeedClientAuth()
getNeedClientAuth in class com.android.org.conscrypt.OpenSSLSocketImplpublic boolean getWantClientAuth()
getWantClientAuth in class com.android.org.conscrypt.OpenSSLSocketImplpublic void setEnableSessionCreation(boolean flag)
setEnableSessionCreation in class com.android.org.conscrypt.OpenSSLSocketImplpublic boolean getEnableSessionCreation()
getEnableSessionCreation in class com.android.org.conscrypt.OpenSSLSocketImplpublic SSLParameters getSSLParameters()
getSSLParameters in class SSLSocketpublic void setSSLParameters(SSLParameters p)
setSSLParameters in class SSLSocketpublic void clientCertificateRequested(byte[] keyTypeBytes,
byte[][] asn1DerEncodedPrincipals)
throws CertificateEncodingException,
SSLException
clientCertificateRequested in interface com.android.org.conscrypt.NativeCrypto.SSLHandshakeCallbacksclientCertificateRequested in class com.android.org.conscrypt.OpenSSLSocketImplCertificateEncodingExceptionSSLExceptionpublic void handshakeCompleted()
handshakeCompleted in interface com.android.org.conscrypt.NativeCrypto.SSLHandshakeCallbackshandshakeCompleted in class com.android.org.conscrypt.OpenSSLSocketImplpublic void verifyCertificateChain(byte[][] bytes,
String authMethod)
throws CertificateException
verifyCertificateChain in interface com.android.org.conscrypt.NativeCrypto.SSLHandshakeCallbacksverifyCertificateChain in class com.android.org.conscrypt.OpenSSLSocketImplCertificateExceptionpublic void setUseSessionTickets(boolean useSessionTickets)
setUseSessionTickets in class com.android.org.conscrypt.OpenSSLSocketImplpublic void setHostname(String hostname)
setHostname in class com.android.org.conscrypt.OpenSSLSocketImplpublic void setChannelIdEnabled(boolean enabled)
setChannelIdEnabled in class com.android.org.conscrypt.OpenSSLSocketImplpublic byte[] getChannelId()
throws SSLException
getChannelId in class com.android.org.conscrypt.OpenSSLSocketImplSSLExceptionpublic void setChannelIdPrivateKey(PrivateKey privateKey)
setChannelIdPrivateKey in class com.android.org.conscrypt.OpenSSLSocketImplpublic void setSoWriteTimeout(int writeTimeoutMilliseconds)
throws SocketException
setSoWriteTimeout in class com.android.org.conscrypt.OpenSSLSocketImplSocketExceptionpublic int getSoWriteTimeout()
throws SocketException
getSoWriteTimeout in class com.android.org.conscrypt.OpenSSLSocketImplSocketExceptionpublic void setHandshakeTimeout(int handshakeTimeoutMilliseconds)
throws SocketException
setHandshakeTimeout in class com.android.org.conscrypt.OpenSSLSocketImplSocketExceptionpublic byte[] getNpnSelectedProtocol()
getNpnSelectedProtocol in class com.android.org.conscrypt.OpenSSLSocketImplpublic void setNpnProtocols(byte[] npnProtocols)
setNpnProtocols in class com.android.org.conscrypt.OpenSSLSocketImplpublic byte[] getAlpnSelectedProtocol()
public void setAlpnProtocols(byte[] alpnProtocols)