30 lines
714 B
Java
30 lines
714 B
Java
package top.octopusyan.http.ssl;
|
|
|
|
import javax.net.ssl.SSLSocketFactory;
|
|
import javax.net.ssl.X509TrustManager;
|
|
|
|
/**
|
|
* @author : octopus yan
|
|
* @email : octopus_yan@foxmail.com
|
|
* @description : Https 配置类
|
|
* @create : 2022-4-1 23:18
|
|
*/
|
|
public final class HttpSslConfig {
|
|
|
|
private final SSLSocketFactory mSSLSocketFactory;
|
|
private final X509TrustManager mTrustManager;
|
|
|
|
HttpSslConfig(SSLSocketFactory factory, X509TrustManager manager) {
|
|
mSSLSocketFactory = factory;
|
|
mTrustManager = manager;
|
|
}
|
|
|
|
public SSLSocketFactory getSslSocketFactory() {
|
|
return mSSLSocketFactory;
|
|
}
|
|
|
|
public X509TrustManager getTrustManager() {
|
|
return mTrustManager;
|
|
}
|
|
}
|