public class AndroidPlatform extends Platform
| Modifier and Type | Method and Description |
|---|---|
CertificateChainCleaner |
buildCertificateChainCleaner(X509TrustManager trustManager) |
static Platform |
buildIfSupported() |
TrustRootIndex |
buildTrustRootIndex(X509TrustManager trustManager) |
void |
configureTlsExtensions(SSLSocket sslSocket,
String hostname,
List<Protocol> protocols)
在
sslSocket上为route配置TLS扩展 |
void |
connectSocket(Socket socket,
InetSocketAddress address,
int connectTimeout) |
String |
getSelectedProtocol(SSLSocket socket)
返回协商的协议,如果没有协商协议,则返回null
|
SSLContext |
getSSLContext() |
Object |
getStackTraceForCloseable(String closer)
返回一个对象,该对象持有在执行此方法时创建的堆栈跟踪。
用于
Closeable与Platform.logCloseableLeak(String, Object) |
boolean |
isCleartextTrafficPermitted(String hostname) |
void |
logCloseableLeak(String message,
Object stackTrace) |
protected X509TrustManager |
trustManager(SSLSocketFactory sslSocketFactory)
管理哪些X509证书可用于对安全套接字的远程端进行身份验证。
决策可能基于可信的证书颁发机构、证书撤销列表、在线状态检查或其他方法
|
afterHandshake, alpnProtocolNames, buildCertificateChainCleaner, configureSslSocketFactory, get, getPrefix, toStringpublic static Platform buildIfSupported()
public void connectSocket(Socket socket, InetSocketAddress address, int connectTimeout) throws IOException
connectSocket in class PlatformIOExceptionprotected X509TrustManager trustManager(SSLSocketFactory sslSocketFactory)
PlatformtrustManager in class PlatformsslSocketFactory - 安全套接字工厂public void configureTlsExtensions(SSLSocket sslSocket, String hostname, List<Protocol> protocols)
PlatformsslSocket上为route配置TLS扩展configureTlsExtensions in class PlatformsslSocket - 套接字信息hostname - 客户端握手不为空;服务器端握手为空.protocols - 服务协议public String getSelectedProtocol(SSLSocket socket)
PlatformgetSelectedProtocol in class Platformsocket - 套接字public Object getStackTraceForCloseable(String closer)
PlatformCloseable与Platform.logCloseableLeak(String, Object)getStackTraceForCloseable in class Platformcloser - 闭合器public void logCloseableLeak(String message, Object stackTrace)
logCloseableLeak in class Platformpublic boolean isCleartextTrafficPermitted(String hostname)
isCleartextTrafficPermitted in class Platformpublic CertificateChainCleaner buildCertificateChainCleaner(X509TrustManager trustManager)
buildCertificateChainCleaner in class Platformpublic TrustRootIndex buildTrustRootIndex(X509TrustManager trustManager)
buildTrustRootIndex in class Platformpublic SSLContext getSSLContext()
getSSLContext in class PlatformCopyright © 2020. All rights reserved.