discord-jadx/app/src/main/java/f0/h.java

45 lines
1.6 KiB
Java

package f0;
import d0.z.d.o;
import f0.f0.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 */
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;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public h(g gVar, List list, String str) {
super(0);
this.this$0 = gVar;
this.$peerCertificates = list;
this.$hostname = str;
}
/* Return type fixed from 'java.lang.Object' to match base method */
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public List<? extends X509Certificate> mo1invoke() {
List<Certificate> list;
c cVar = this.this$0.d;
if (cVar == null || (list = cVar.a(this.$peerCertificates, this.$hostname)) == null) {
list = this.$peerCertificates;
}
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");
}
}
return arrayList;
}
}