package okhttp3; import java.security.cert.Certificate; import java.security.cert.X509Certificate; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; import o.AbstractC14961gcz; import o.C14957gcv; import o.InterfaceC14890gbN; import okhttp3.internal.tls.CertificateChainCleaner; /* JADX INFO: Access modifiers changed from: package-private */ /* loaded from: classes.dex */ public final class CertificatePinner$check$1 extends AbstractC14961gcz implements InterfaceC14890gbN> { final String $hostname; final List $peerCertificates; final CertificatePinner this$0; @Override // o.InterfaceC14890gbN public final List invoke() { CertificateChainCleaner certificateChainCleaner$okhttp = this.this$0.getCertificateChainCleaner$okhttp(); List clean = certificateChainCleaner$okhttp == null ? null : certificateChainCleaner$okhttp.clean(this.$peerCertificates, this.$hostname); if (clean == null) { clean = this.$peerCertificates; } List list = clean; C14957gcv.e(list, ""); ArrayList arrayList = new ArrayList(list instanceof Collection ? list.size() : 10); Iterator it = list.iterator(); while (it.hasNext()) { arrayList.add((X509Certificate) ((Certificate) it.next())); } return arrayList; } /* JADX INFO: Access modifiers changed from: package-private */ /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ /* JADX WARN: Multi-variable type inference failed */ public CertificatePinner$check$1(CertificatePinner certificatePinner, List list, String str) { super(0); this.this$0 = certificatePinner; this.$peerCertificates = list; this.$hostname = str; } }