public class Platform extends Object
Supported on Android 2.3+.
Supported on Android 2.3+.
Supported on Android 4.0+.
Supported on Android 5.0+. The APIs were present in Android 4.4, but that implementation was unstable. Supported on OpenJDK 7 and 8 (via the JettyALPN-boot library).
Supported on Android 2.3+ and OpenJDK 7+. There are no public APIs to recover the trust manager that was used to create an SSLSocketFactory.
| Constructor and Description |
|---|
Platform()
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterHandshake(SSLSocket
Called after the TLS handshake to release resources allocated by
configureTlsExtensions(javax.net.ssl.SSLSocket, java.lang.String, java.util.List<okhttp3.Protocol>).
|
void |
configureTlsExtensions(SSLSocket
Configure TLS extensions on
sslSocket for
route.
|
void |
connectSocket(Socket
|
static Platform |
get()
|
String |
getPrefix()
Prefix used on custom headers.
|
String |
getSelectedProtocol(SSLSocket
Returns the negotiated protocol, or null if no protocol was negotiated.
|
void |
log(String
|
void |
logW(String
|
X509TrustManager |
trustManager(SSLSocketFactory
|
TrustRootIndex |
trustRootIndex(X509TrustManager
|
public static Platformget()
public StringgetPrefix()
public void logW(Stringwarning)
public X509TrustManagertrustManager(SSLSocketFactory sslSocketFactory)
public TrustRootIndextrustRootIndex(X509TrustManager trustManager)
public void configureTlsExtensions(SSLSocketsslSocket, String hostname, List <Protocol > protocols)
sslSocket for
route.
hostname - non-null for client-side handshakes; null for server-side handshakes.
public void afterHandshake(SSLSocketsslSocket)
configureTlsExtensions(javax.net.ssl.SSLSocket, java.lang.String, java.util.List<okhttp3.Protocol>).
public StringgetSelectedProtocol(SSLSocket socket)
public void connectSocket(Socketsocket, InetSocketAddress address, int connectTimeout) throws IOException
IOException
public void log(Stringmessage)