package k7;

import a0.C0391e;
import java.security.cert.Certificate;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.List;

/* JADX INFO: loaded from: classes.dex */
public final class n {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final G f14107a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final h f14108b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final List f14109c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final A6.k f14110d;

    public n(G g8, h hVar, List list, O6.a aVar) {
        this.f14107a = g8;
        this.f14108b = hVar;
        this.f14109c = list;
        this.f14110d = new A6.k(new C0391e(1, aVar));
    }

    public final List a() {
        return (List) this.f14110d.getValue();
    }

    public final boolean equals(Object obj) {
        if (!(obj instanceof n)) {
            return false;
        }
        n nVar = (n) obj;
        return nVar.f14107a == this.f14107a && P6.g.a(nVar.f14108b, this.f14108b) && P6.g.a(nVar.a(), a()) && P6.g.a(nVar.f14109c, this.f14109c);
    }

    public final int hashCode() {
        return this.f14109c.hashCode() + ((a().hashCode() + ((this.f14108b.hashCode() + ((this.f14107a.hashCode() + 527) * 31)) * 31)) * 31);
    }

    public final String toString() {
        String type;
        String type2;
        List<Certificate> listA = a();
        ArrayList arrayList = new ArrayList(B6.m.a0(listA));
        for (Certificate certificate : listA) {
            if (certificate instanceof X509Certificate) {
                type2 = ((X509Certificate) certificate).getSubjectDN().toString();
            } else {
                type2 = certificate.getType();
                P6.g.d(type2, "type");
            }
            arrayList.add(type2);
        }
        String string = arrayList.toString();
        StringBuilder sb = new StringBuilder("Handshake{tlsVersion=");
        sb.append(this.f14107a);
        sb.append(" cipherSuite=");
        sb.append(this.f14108b);
        sb.append(" peerCertificates=");
        sb.append(string);
        sb.append(" localCertificates=");
        List<Certificate> list = this.f14109c;
        ArrayList arrayList2 = new ArrayList(B6.m.a0(list));
        for (Certificate certificate2 : list) {
            if (certificate2 instanceof X509Certificate) {
                type = ((X509Certificate) certificate2).getSubjectDN().toString();
            } else {
                type = certificate2.getType();
                P6.g.d(type, "type");
            }
            arrayList2.add(type);
        }
        sb.append(arrayList2);
        sb.append('}');
        return sb.toString();
    }
}
