public class Platform extends Object
SSLSocketFactory的trustmanager的公共api
支持Android 6.0+ 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)
sslSocketFactory - 安全套接字工厂public void configureTlsExtensions(SSLSocket sslSocket, String hostname, List<Protocol> protocols)
sslSocket上为route配置TLS扩展sslSocket - 套接字信息hostname - 客户端握手不为空;服务器端握手为空.protocols - 服务协议public void afterHandshake(SSLSocket sslSocket)
configureTlsExtensions(javax.net.ssl.SSLSocket, java.lang.String, java.util.List<org.aoju.bus.http.Protocol>)分配的资源sslSocket - 安全套接字public String getSelectedProtocol(SSLSocket socket)
socket - 套接字public void connectSocket(Socket socket, InetSocketAddress address, int connectTimeout) throws IOException
IOExceptionpublic boolean isCleartextTrafficPermitted(String hostname)
public Object getStackTraceForCloseable(String closer)
Closeable与logCloseableLeak(String, Object)closer - 闭合器public CertificateChainCleaner buildCertificateChainCleaner(X509TrustManager trustManager)
public CertificateChainCleaner buildCertificateChainCleaner(SSLSocketFactory sslSocketFactory)
public SSLContext getSSLContext()
public TrustRootIndex buildTrustRootIndex(X509TrustManager trustManager)
public void configureSslSocketFactory(SSLSocketFactory socketFactory)
Copyright © 2020. All rights reserved.