public class PreKitKatPlatformOpenSSLSocketImplAdapter
extends org.apache.harmony.xnet.provider.jsse.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 Pre-Kitkat devices.
It delegates all public methods in Socket, SSLSocket, and OpenSSLSocket from
JB.| Constructor and Description |
|---|
PreKitKatPlatformOpenSSLSocketImplAdapter(org.conscrypt.AbstractConscryptSocket delegate) |
getHandshakeSessionsetSocketImplFactorypublic PreKitKatPlatformOpenSSLSocketImplAdapter(org.conscrypt.AbstractConscryptSocket delegate)
throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplIOExceptionpublic InputStream getInputStream() throws IOException
getInputStream in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplIOExceptionpublic int getLocalPort()
getLocalPort in class Socketpublic OutputStream getOutputStream() throws IOException
getOutputStream in class org.apache.harmony.xnet.provider.jsse.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 org.apache.harmony.xnet.provider.jsse.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 org.apache.harmony.xnet.provider.jsse.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 org.apache.harmony.xnet.provider.jsse.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 org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplIOExceptionpublic SocketChannel getChannel()
getChannel in class Socketpublic FileDescriptor getFileDescriptor$()
getFileDescriptor$ in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplpublic void setPerformancePreferences(int connectionTime,
int latency,
int bandwidth)
setPerformancePreferences in class Socketpublic String[] getSupportedCipherSuites()
getSupportedCipherSuites in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplpublic String[] getEnabledCipherSuites()
getEnabledCipherSuites in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplpublic void setEnabledCipherSuites(String[] suites)
setEnabledCipherSuites in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplpublic String[] getSupportedProtocols()
getSupportedProtocols in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplpublic String[] getEnabledProtocols()
getEnabledProtocols in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplpublic void setEnabledProtocols(String[] protocols)
setEnabledProtocols in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplpublic SSLSession getSession()
getSession in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplpublic void addHandshakeCompletedListener(HandshakeCompletedListener listener)
addHandshakeCompletedListener in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplpublic void removeHandshakeCompletedListener(HandshakeCompletedListener listener)
removeHandshakeCompletedListener in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplpublic void startHandshake()
throws IOException
startHandshake in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplIOExceptionpublic void setUseClientMode(boolean mode)
setUseClientMode in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplpublic boolean getUseClientMode()
getUseClientMode in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplpublic void setNeedClientAuth(boolean need)
setNeedClientAuth in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplpublic void setWantClientAuth(boolean want)
setWantClientAuth in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplpublic boolean getNeedClientAuth()
getNeedClientAuth in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplpublic boolean getWantClientAuth()
getWantClientAuth in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplpublic void setEnableSessionCreation(boolean flag)
setEnableSessionCreation in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplpublic boolean getEnableSessionCreation()
getEnableSessionCreation in class org.apache.harmony.xnet.provider.jsse.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 org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSLHandshakeCallbacksclientCertificateRequested in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplCertificateEncodingExceptionSSLExceptionpublic void handshakeCompleted()
handshakeCompleted in interface org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSLHandshakeCallbackshandshakeCompleted in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplpublic void verifyCertificateChain(byte[][] bytes,
String authMethod)
throws CertificateException
verifyCertificateChain in interface org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSLHandshakeCallbacksverifyCertificateChain in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplCertificateExceptionpublic void setUseSessionTickets(boolean useSessionTickets)
setUseSessionTickets in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplpublic void setHostname(String hostname)
setHostname in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplpublic void setChannelIdEnabled(boolean enabled)
setChannelIdEnabled in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplpublic byte[] getChannelId()
throws SSLException
getChannelId in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplSSLExceptionpublic void setChannelIdPrivateKey(PrivateKey privateKey)
setChannelIdPrivateKey in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplpublic void setSoWriteTimeout(int writeTimeoutMilliseconds)
throws SocketException
setSoWriteTimeout in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplSocketExceptionpublic int getSoWriteTimeout()
throws SocketException
getSoWriteTimeout in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplSocketExceptionpublic void setHandshakeTimeout(int handshakeTimeoutMilliseconds)
throws SocketException
setHandshakeTimeout in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplSocketExceptionpublic byte[] getNpnSelectedProtocol()
getNpnSelectedProtocol in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplpublic void setNpnProtocols(byte[] npnProtocols)
setNpnProtocols in class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplpublic byte[] getAlpnSelectedProtocol()
public void setAlpnProtocols(byte[] alpnProtocols)