Package com.zendesk.connect
Class Tls1Dot2SocketFactory
- java.lang.Object
-
- javax.net.SocketFactory
-
- javax.net.ssl.SSLSocketFactory
-
- com.zendesk.connect.Tls1Dot2SocketFactory
-
public class Tls1Dot2SocketFactory extends javax.net.ssl.SSLSocketFactory
SSLSocketFactory
patch for force TLS 1.2 on Android pre-Lollipop. This is reused code from the other SDKs but uses a non deprecated version ofOkHttpClient.Builder#sslSocketFactory
-
-
Constructor Summary
Constructors Constructor and Description Tls1Dot2SocketFactory(javax.net.ssl.SSLSocketFactory base)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.net.Socket
createSocket(java.net.InetAddress host, int port)
java.net.Socket
createSocket(java.net.InetAddress address, int port, java.net.InetAddress localAddress, int localPort)
java.net.Socket
createSocket(java.net.Socket socket, java.lang.String host, int port, boolean autoClose)
java.net.Socket
createSocket(java.lang.String host, int port)
java.net.Socket
createSocket(java.lang.String host, int port, java.net.InetAddress localHost, int localPort)
static OkHttpClient.Builder
enableTls1Dot2OnPreLollipop(OkHttpClient.Builder client)
java.lang.String[]
getDefaultCipherSuites()
java.lang.String[]
getSupportedCipherSuites()
-
-
-
Method Detail
-
enableTls1Dot2OnPreLollipop
public static OkHttpClient.Builder enableTls1Dot2OnPreLollipop(OkHttpClient.Builder client)
-
getDefaultCipherSuites
public java.lang.String[] getDefaultCipherSuites()
- Specified by:
getDefaultCipherSuites
in classjavax.net.ssl.SSLSocketFactory
-
getSupportedCipherSuites
public java.lang.String[] getSupportedCipherSuites()
- Specified by:
getSupportedCipherSuites
in classjavax.net.ssl.SSLSocketFactory
-
createSocket
public java.net.Socket createSocket(java.net.Socket socket, java.lang.String host, int port, boolean autoClose) throws java.io.IOException
- Specified by:
createSocket
in classjavax.net.ssl.SSLSocketFactory
- Throws:
java.io.IOException
-
createSocket
public java.net.Socket createSocket(java.lang.String host, int port) throws java.io.IOException, java.net.UnknownHostException
- Specified by:
createSocket
in classjavax.net.SocketFactory
- Throws:
java.io.IOException
java.net.UnknownHostException
-
createSocket
public java.net.Socket createSocket(java.lang.String host, int port, java.net.InetAddress localHost, int localPort) throws java.io.IOException, java.net.UnknownHostException
- Specified by:
createSocket
in classjavax.net.SocketFactory
- Throws:
java.io.IOException
java.net.UnknownHostException
-
createSocket
public java.net.Socket createSocket(java.net.InetAddress host, int port) throws java.io.IOException
- Specified by:
createSocket
in classjavax.net.SocketFactory
- Throws:
java.io.IOException
-
createSocket
public java.net.Socket createSocket(java.net.InetAddress address, int port, java.net.InetAddress localAddress, int localPort) throws java.io.IOException
- Specified by:
createSocket
in classjavax.net.SocketFactory
- Throws:
java.io.IOException
-
-