public class Platform extends Object
Supported on Android 2.3+. Supported on OpenJDK 7+
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 OpenJDK 9 via SSLParameters and SSLSocket features.
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
.
Supported on Android 6.0+ via NetworkSecurityPolicy
.
Constructor and Description |
---|
Platform() |
public static final int INFO
public static final int WARN
public static Platform get()
public String getPrefix()
protected X509TrustManager trustManager(SSLSocketFactory sslSocketFactory)
public void configureTlsExtensions(SSLSocket sslSocket, String hostname, List<Protocol> protocols)
sslSocket
for route
.hostname
- non-null for client-side handshakes; null for server-side handshakes.public void afterHandshake(SSLSocket sslSocket)
configureTlsExtensions(javax.net.ssl.SSLSocket, java.lang.String, java.util.List<okhttp3.Protocol>)
.@Nullable public String getSelectedProtocol(SSLSocket socket)
public void connectSocket(Socket socket, InetSocketAddress address, int connectTimeout) throws IOException
IOException
public boolean isCleartextTrafficPermitted(String hostname)
public Object getStackTraceForCloseable(String closer)
Closeable
objects and in conjunction with
logCloseableLeak(String, Object)
.public CertificateChainCleaner buildCertificateChainCleaner(X509TrustManager trustManager)
public CertificateChainCleaner buildCertificateChainCleaner(SSLSocketFactory sslSocketFactory)
public static boolean isConscryptPreferred()
public SSLContext getSSLContext()
public TrustRootIndex buildTrustRootIndex(X509TrustManager trustManager)
Copyright © 2019. All rights reserved.