what-the-bank/sources/okhttp3/internal/tls/CertificateChainCleaner.java

39 lines
1.3 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package okhttp3.internal.tls;
import java.security.cert.Certificate;
import java.security.cert.X509Certificate;
import java.util.Arrays;
import java.util.List;
import javax.net.ssl.SSLPeerUnverifiedException;
import javax.net.ssl.X509TrustManager;
import o.C14953gcr;
import o.C14957gcv;
import okhttp3.internal.platform.Platform;
/* loaded from: classes.dex */
public abstract class CertificateChainCleaner {
public static final Companion Companion = new Companion(null);
public abstract List<Certificate> clean(List<? extends Certificate> list, String str) throws SSLPeerUnverifiedException;
/* loaded from: classes.dex */
public static final class Companion {
private Companion() {
}
public final CertificateChainCleaner get(X509TrustManager x509TrustManager) {
C14957gcv.e(x509TrustManager, "");
return Platform.Companion.get().buildCertificateChainCleaner(x509TrustManager);
}
public final CertificateChainCleaner get(X509Certificate... x509CertificateArr) {
C14957gcv.e(x509CertificateArr, "");
return new BasicCertificateChainCleaner(new BasicTrustRootIndex((X509Certificate[]) Arrays.copyOf(x509CertificateArr, x509CertificateArr.length)));
}
public /* synthetic */ Companion(C14953gcr c14953gcr) {
this();
}
}
}