package t7;

import android.net.http.X509TrustManagerExtensions;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.List;
import javax.net.ssl.SSLPeerUnverifiedException;
import javax.net.ssl.X509TrustManager;

/* JADX INFO: loaded from: classes.dex */
public final class b extends W3.b {

    /* JADX INFO: renamed from: w, reason: collision with root package name */
    public final X509TrustManager f17027w;

    /* JADX INFO: renamed from: x, reason: collision with root package name */
    public final X509TrustManagerExtensions f17028x;

    public b(X509TrustManager x509TrustManager, X509TrustManagerExtensions x509TrustManagerExtensions) {
        this.f17027w = x509TrustManager;
        this.f17028x = x509TrustManagerExtensions;
    }

    public final boolean equals(Object obj) {
        return (obj instanceof b) && ((b) obj).f17027w == this.f17027w;
    }

    public final int hashCode() {
        return System.identityHashCode(this.f17027w);
    }

    @Override // W3.b
    public final List i(String str, List list) throws SSLPeerUnverifiedException {
        P6.g.e(list, "chain");
        P6.g.e(str, "hostname");
        try {
            List<X509Certificate> listCheckServerTrusted = this.f17028x.checkServerTrusted((X509Certificate[]) list.toArray(new X509Certificate[0]), "RSA", str);
            P6.g.d(listCheckServerTrusted, "x509TrustManagerExtensio…ficates, \"RSA\", hostname)");
            return listCheckServerTrusted;
        } catch (CertificateException e8) {
            SSLPeerUnverifiedException sSLPeerUnverifiedException = new SSLPeerUnverifiedException(e8.getMessage());
            sSLPeerUnverifiedException.initCause(e8);
            throw sSLPeerUnverifiedException;
        }
    }
}
