Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
1234
public void m22766a(String str, List<Certificate> list) {
List a = m22764a(str);
if (!a.isEmpty()) {
int i;
if (this.f20058c != null) {
list = this.f20058c.mo7147a(list, str);
}
int size = list.size();
for (int i2 = 0; i2 < size; i2++) {
X509Certificate x509Certificate = (X509Certificate) list.get(i2);
int size2 = a.size();
int i3 = 0;
Object obj = null;
Object obj2 = null;
while (i3 < size2) {
C6564b c6564b = (C6564b) a.get(i3);
if (c6564b.f20054c.equals("sha256/")) {
if (obj == null) {
obj = C6565k.m22763b(x509Certificate);
}
if (c6564b.f20055d.equals(obj)) {
return;
}
} else if (c6564b.f20054c.equals("sha1/")) {
if (obj2 == null) {
obj2 = C6565k.m22762a(x509Certificate);
}
if (c6564b.f20055d.equals(obj2)) {
return;
}
} else {
throw new AssertionError();
}
Object obj3 = obj;
i3++;
obj2 = obj2;
obj = obj3;
}
}
StringBuilder append = new StringBuilder().append("Certificate pinning failure!").append("\n Peer certificate chain:");
int size3 = list.size();
for (i = 0; i < size3; i++) {
Certificate certificate = (X509Certificate) list.get(i);
append.append("\n ").append(C6565k.m22761a(certificate)).append(": ").append(certificate.getSubjectDN().getName());
}
append.append("\n Pinned certificates for ").append(str).append(":");
size3 = a.size();
for (i = 0; i < size3; i++) {
append.append("\n ").append((C6564b) a.get(i));
}
throw new SSLPeerUnverifiedException(append.toString());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.