2021-06-27 20:44:35 +00:00
|
|
|
package f0;
|
|
|
|
|
2021-11-08 18:25:28 +00:00
|
|
|
import d0.z.d.o;
|
|
|
|
import f0.e0.m.c;
|
|
|
|
import java.security.cert.Certificate;
|
|
|
|
import java.security.cert.X509Certificate;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
|
|
|
import kotlin.TypeCastException;
|
|
|
|
import kotlin.jvm.functions.Function0;
|
|
|
|
/* compiled from: CertificatePinner.kt */
|
2022-03-02 20:59:20 +00:00
|
|
|
/* loaded from: classes3.dex */
|
2021-11-08 18:25:28 +00:00
|
|
|
public final class h extends o implements Function0<List<? extends X509Certificate>> {
|
|
|
|
public final /* synthetic */ String $hostname;
|
|
|
|
public final /* synthetic */ List $peerCertificates;
|
|
|
|
public final /* synthetic */ g this$0;
|
|
|
|
|
2022-03-02 20:59:20 +00:00
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
2021-11-08 18:25:28 +00:00
|
|
|
public h(g gVar, List list, String str) {
|
|
|
|
super(0);
|
|
|
|
this.this$0 = gVar;
|
|
|
|
this.$peerCertificates = list;
|
|
|
|
this.$hostname = str;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-11-08 18:25:28 +00:00
|
|
|
@Override // kotlin.jvm.functions.Function0
|
2022-03-02 20:59:20 +00:00
|
|
|
public List<? extends X509Certificate> invoke() {
|
2021-11-08 18:25:28 +00:00
|
|
|
List<Certificate> list;
|
|
|
|
c cVar = this.this$0.d;
|
|
|
|
if (cVar == null || (list = cVar.a(this.$peerCertificates, this.$hostname)) == null) {
|
|
|
|
list = this.$peerCertificates;
|
2021-10-19 23:48:27 +00:00
|
|
|
}
|
2021-11-08 18:25:28 +00:00
|
|
|
ArrayList arrayList = new ArrayList(d0.t.o.collectionSizeOrDefault(list, 10));
|
|
|
|
for (Certificate certificate : list) {
|
|
|
|
if (certificate != null) {
|
|
|
|
arrayList.add((X509Certificate) certificate);
|
|
|
|
} else {
|
|
|
|
throw new TypeCastException("null cannot be cast to non-null type java.security.cert.X509Certificate");
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
}
|
2021-11-08 18:25:28 +00:00
|
|
|
return arrayList;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
}
|