Created
December 3, 2018 18:35
-
-
Save Gratsh/68ee369f9d0dfa56d196d1ab2fe36dc0 to your computer and use it in GitHub Desktop.
1234
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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