1008 lines
51 KiB
Java
1008 lines
51 KiB
Java
|
package o;
|
||
|
|
||
|
import com.huawei.hms.android.SystemUtils;
|
||
|
import java.io.IOException;
|
||
|
import java.math.BigInteger;
|
||
|
import java.security.PublicKey;
|
||
|
import java.security.cert.CertPath;
|
||
|
import java.security.cert.CertPathBuilderException;
|
||
|
import java.security.cert.CertPathValidatorException;
|
||
|
import java.security.cert.Certificate;
|
||
|
import java.security.cert.PKIXCertPathChecker;
|
||
|
import java.security.cert.X509CRL;
|
||
|
import java.security.cert.X509CertSelector;
|
||
|
import java.security.cert.X509Certificate;
|
||
|
import java.util.ArrayList;
|
||
|
import java.util.Collection;
|
||
|
import java.util.Enumeration;
|
||
|
import java.util.HashSet;
|
||
|
import java.util.Iterator;
|
||
|
import java.util.List;
|
||
|
import java.util.Set;
|
||
|
import o.C15425gqD;
|
||
|
import o.C15457gqz;
|
||
|
import o.gqA;
|
||
|
import org.bouncycastle.jce.provider.RFC3280CertPathUtilities;
|
||
|
import org.spongycastle.asn1.ASN1Integer;
|
||
|
import org.spongycastle.jce.exception.ExtCertPathValidatorException;
|
||
|
import org.spongycastle.jce.provider.AnnotatedException;
|
||
|
import org.spongycastle.jce.provider.PKIXNameConstraintValidatorException;
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* renamed from: o.grt, reason: case insensitive filesystem */
|
||
|
/* loaded from: classes6.dex */
|
||
|
public final class C15492grt {
|
||
|
public static final String a;
|
||
|
public static final String b;
|
||
|
public static final String c;
|
||
|
public static final String d;
|
||
|
public static final String e;
|
||
|
public static final String f;
|
||
|
public static final String g;
|
||
|
public static final String h;
|
||
|
public static final String i;
|
||
|
public static final String j;
|
||
|
private static String k;
|
||
|
public static final String l;
|
||
|
|
||
|
/* renamed from: o, reason: collision with root package name */
|
||
|
private static String[] f9151o;
|
||
|
|
||
|
C15492grt() {
|
||
|
}
|
||
|
|
||
|
static {
|
||
|
new C15478grf();
|
||
|
d = C15394gpK.i.d;
|
||
|
i = C15394gpK.q.d;
|
||
|
a = C15394gpK.f.d;
|
||
|
j = C15394gpK.f9146o.d;
|
||
|
String str = C15394gpK.j.d;
|
||
|
e = C15394gpK.h.d;
|
||
|
g = C15394gpK.m.d;
|
||
|
c = C15394gpK.b.d;
|
||
|
b = C15394gpK.c.d;
|
||
|
l = C15394gpK.s.d;
|
||
|
f = C15394gpK.l.d;
|
||
|
k = C15394gpK.d.d;
|
||
|
h = C15394gpK.n.d;
|
||
|
String str2 = C15394gpK.e.d;
|
||
|
f9151o = new String[]{"unspecified", "keyCompromise", "cACompromise", "affiliationChanged", "superseded", "cessationOfOperation", "certificateHold", SystemUtils.UNKNOWN, "removeFromCRL", "privilegeWithdrawn", "aACompromise"};
|
||
|
}
|
||
|
|
||
|
private static C15490grr d(X509CRL x509crl, C15392gpI c15392gpI) throws AnnotatedException {
|
||
|
C15490grr c15490grr;
|
||
|
try {
|
||
|
AbstractC15315gnE a2 = C15473gra.a(x509crl, j);
|
||
|
gpV gpv = a2 != null ? new gpV(AbstractC15317gnH.a(a2)) : null;
|
||
|
if (gpv != null && gpv.i != null && c15392gpI.e != null) {
|
||
|
C15490grr c15490grr2 = new C15490grr(c15392gpI.e);
|
||
|
C15490grr c15490grr3 = new C15490grr(gpv.i);
|
||
|
C15490grr c15490grr4 = new C15490grr();
|
||
|
c15490grr4.d |= new C15490grr(c15490grr2.d & c15490grr3.d).d;
|
||
|
return c15490grr4;
|
||
|
}
|
||
|
if ((gpv == null || gpv.i == null) && c15392gpI.e == null) {
|
||
|
return C15490grr.c;
|
||
|
}
|
||
|
if (c15392gpI.e == null) {
|
||
|
c15490grr = C15490grr.c;
|
||
|
} else {
|
||
|
c15490grr = new C15490grr(c15392gpI.e);
|
||
|
}
|
||
|
C15490grr c15490grr5 = gpv == null ? C15490grr.c : new C15490grr(gpv.i);
|
||
|
C15490grr c15490grr6 = new C15490grr();
|
||
|
c15490grr6.d |= new C15490grr(c15490grr.d & c15490grr5.d).d;
|
||
|
return c15490grr6;
|
||
|
} catch (Exception e2) {
|
||
|
throw new AnnotatedException("Issuing distribution point extension could not be decoded.", e2);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
private static Set d(X509CRL x509crl, X509Certificate x509Certificate, PublicKey publicKey, C15457gqz c15457gqz, List list, gqQ gqq) throws AnnotatedException {
|
||
|
X509CertSelector x509CertSelector = new X509CertSelector();
|
||
|
try {
|
||
|
x509CertSelector.setSubject(C15417gpt.c(x509crl.getIssuerX500Principal().getEncoded()).l());
|
||
|
C15425gqD c15425gqD = new C15425gqD(new C15425gqD.RVV(x509CertSelector).a, (byte) 0);
|
||
|
try {
|
||
|
Collection<X509Certificate> b2 = C15473gra.b(c15425gqD, c15457gqz.e);
|
||
|
b2.addAll(C15473gra.b(c15425gqD, c15457gqz.b.getCertStores()));
|
||
|
b2.add(x509Certificate);
|
||
|
ArrayList arrayList = new ArrayList();
|
||
|
ArrayList arrayList2 = new ArrayList();
|
||
|
for (X509Certificate x509Certificate2 : b2) {
|
||
|
if (x509Certificate2.equals(x509Certificate)) {
|
||
|
arrayList.add(x509Certificate2);
|
||
|
arrayList2.add(publicKey);
|
||
|
} else {
|
||
|
try {
|
||
|
C15487gro c15487gro = new C15487gro();
|
||
|
X509CertSelector x509CertSelector2 = new X509CertSelector();
|
||
|
x509CertSelector2.setCertificate(x509Certificate2);
|
||
|
C15457gqz.LWm lWm = new C15457gqz.LWm(c15457gqz);
|
||
|
lWm.f = new C15425gqD(new C15425gqD.RVV(x509CertSelector2).a, (byte) 0);
|
||
|
if (list.contains(x509Certificate2)) {
|
||
|
lWm.h = false;
|
||
|
} else {
|
||
|
lWm.h = true;
|
||
|
}
|
||
|
List<? extends Certificate> certificates = c15487gro.engineBuild(new gqA(new gqA.LWm(new C15457gqz(lWm, (byte) 0)), (byte) 0)).getCertPath().getCertificates();
|
||
|
arrayList.add(x509Certificate2);
|
||
|
arrayList2.add(C15473gra.c(certificates, 0, gqq));
|
||
|
} catch (CertPathBuilderException e2) {
|
||
|
throw new AnnotatedException("CertPath for CRL signer failed to validate.", e2);
|
||
|
} catch (CertPathValidatorException e3) {
|
||
|
throw new AnnotatedException("Public key of issuer certificate of CRL could not be retrieved.", e3);
|
||
|
} catch (Exception e4) {
|
||
|
throw new AnnotatedException(e4.getMessage());
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
HashSet hashSet = new HashSet();
|
||
|
AnnotatedException annotatedException = null;
|
||
|
for (int i2 = 0; i2 < arrayList.size(); i2++) {
|
||
|
boolean[] keyUsage = ((X509Certificate) arrayList.get(i2)).getKeyUsage();
|
||
|
if (keyUsage != null && (keyUsage.length < 7 || !keyUsage[6])) {
|
||
|
annotatedException = new AnnotatedException("Issuer certificate key usage extension does not permit CRL signing.");
|
||
|
} else {
|
||
|
hashSet.add(arrayList2.get(i2));
|
||
|
}
|
||
|
}
|
||
|
if (hashSet.isEmpty() && annotatedException == null) {
|
||
|
throw new AnnotatedException("Cannot find a valid issuer certificate.");
|
||
|
}
|
||
|
if (!hashSet.isEmpty() || annotatedException == null) {
|
||
|
return hashSet;
|
||
|
}
|
||
|
throw annotatedException;
|
||
|
} catch (AnnotatedException e5) {
|
||
|
throw new AnnotatedException("Issuer certificate for CRL cannot be searched.", e5);
|
||
|
}
|
||
|
} catch (IOException e6) {
|
||
|
throw new AnnotatedException("Subject criteria for certificate selector to find issuer certificate for CRL could not be set.", e6);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
private static PublicKey e(X509CRL x509crl, Set set) throws AnnotatedException {
|
||
|
Iterator it = set.iterator();
|
||
|
Exception e2 = null;
|
||
|
while (it.hasNext()) {
|
||
|
PublicKey publicKey = (PublicKey) it.next();
|
||
|
try {
|
||
|
x509crl.verify(publicKey);
|
||
|
return publicKey;
|
||
|
} catch (Exception e3) {
|
||
|
e2 = e3;
|
||
|
}
|
||
|
}
|
||
|
throw new AnnotatedException("Cannot verify CRL.", e2);
|
||
|
}
|
||
|
|
||
|
private static X509CRL a(Set set, PublicKey publicKey) throws AnnotatedException {
|
||
|
Iterator it = set.iterator();
|
||
|
Exception e2 = null;
|
||
|
while (it.hasNext()) {
|
||
|
X509CRL x509crl = (X509CRL) it.next();
|
||
|
try {
|
||
|
x509crl.verify(publicKey);
|
||
|
return x509crl;
|
||
|
} catch (Exception e3) {
|
||
|
e2 = e3;
|
||
|
}
|
||
|
}
|
||
|
if (e2 == null) {
|
||
|
return null;
|
||
|
}
|
||
|
throw new AnnotatedException("Cannot verify delta CRL.", e2);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:32:0x00a6, code lost:
|
||
|
|
||
|
r5 = r21[r3].iterator();
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:34:0x00b0, code lost:
|
||
|
|
||
|
if (r5.hasNext() == false) goto L97;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:35:0x00b2, code lost:
|
||
|
|
||
|
r6 = (o.C15485grm) r5.next();
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:36:0x00c2, code lost:
|
||
|
|
||
|
if (org.bouncycastle.jce.provider.RFC3280CertPathUtilities.ANY_POLICY.equals(r6.getValidPolicy()) == false) goto L105;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:39:0x00cc, code lost:
|
||
|
|
||
|
r5 = ((o.AbstractC15317gnH) o.C15473gra.a(r4, o.C15492grt.d)).b();
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:41:0x00d4, code lost:
|
||
|
|
||
|
if (r5.hasMoreElements() == false) goto L106;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:43:0x00d6, code lost:
|
||
|
|
||
|
r7 = r5.nextElement();
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:44:0x00da, code lost:
|
||
|
|
||
|
if (r7 == null) goto L38;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:46:0x00de, code lost:
|
||
|
|
||
|
if ((r7 instanceof o.gpU) != false) goto L38;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:47:0x00e0, code lost:
|
||
|
|
||
|
r9 = new o.gpU(o.AbstractC15317gnH.a(r7));
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:49:0x00f5, code lost:
|
||
|
|
||
|
if (org.bouncycastle.jce.provider.RFC3280CertPathUtilities.ANY_POLICY.equals(r9.e.d) == false) goto L107;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:51:0x00f7, code lost:
|
||
|
|
||
|
r5 = o.C15473gra.b(r9.c);
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:52:0x0111, code lost:
|
||
|
|
||
|
r10 = r5;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:53:0x0116, code lost:
|
||
|
|
||
|
if (r4.getCriticalExtensionOIDs() == null) goto L53;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:54:0x0118, code lost:
|
||
|
|
||
|
r12 = r4.getCriticalExtensionOIDs().contains(o.C15492grt.d);
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:55:0x0125, code lost:
|
||
|
|
||
|
r9 = (o.C15485grm) r6.getParent();
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:56:0x0134, code lost:
|
||
|
|
||
|
if (org.bouncycastle.jce.provider.RFC3280CertPathUtilities.ANY_POLICY.equals(r9.getValidPolicy()) == false) goto L98;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:57:0x0136, code lost:
|
||
|
|
||
|
r8 = new o.C15485grm(new java.util.ArrayList(), r3, (java.util.Set) r13.get(r11), r9, r10, r11, r12);
|
||
|
r9.d.add(r8);
|
||
|
r8.b = r9;
|
||
|
r21[r3].add(r8);
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:60:0x0124, code lost:
|
||
|
|
||
|
r12 = r14;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:62:0x00fe, code lost:
|
||
|
|
||
|
r0 = move-exception;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:64:0x0106, code lost:
|
||
|
|
||
|
throw new org.spongycastle.jce.exception.ExtCertPathValidatorException("Policy qualifier info set could not be decoded.", r0, r19, r20);
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:67:0x00ea, code lost:
|
||
|
|
||
|
r9 = (o.gpU) r7;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:69:0x0107, code lost:
|
||
|
|
||
|
r0 = move-exception;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:71:0x010f, code lost:
|
||
|
|
||
|
throw new java.security.cert.CertPathValidatorException("Policy information could not be decoded.", r0, r19, r20);
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:73:0x0110, code lost:
|
||
|
|
||
|
r5 = null;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:75:0x015e, code lost:
|
||
|
|
||
|
r0 = move-exception;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:77:0x0166, code lost:
|
||
|
|
||
|
throw new org.spongycastle.jce.exception.ExtCertPathValidatorException("Certificate policies extension could not be decoded.", r0, r19, r20);
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:79:0x01c0, code lost:
|
||
|
|
||
|
continue;
|
||
|
*/
|
||
|
/*
|
||
|
Code decompiled incorrectly, please refer to instructions dump.
|
||
|
To view partially-correct add '--show-bad-code' argument
|
||
|
*/
|
||
|
public static o.C15485grm b(java.security.cert.CertPath r19, int r20, java.util.List[] r21, o.C15485grm r22, int r23) throws java.security.cert.CertPathValidatorException {
|
||
|
/*
|
||
|
Method dump skipped, instructions count: 463
|
||
|
To view this dump add '--comments-level debug' option
|
||
|
*/
|
||
|
throw new UnsupportedOperationException("Method not decompiled: o.C15492grt.b(java.security.cert.CertPath, int, java.util.List[], o.grm, int):o.grm");
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public static void e(CertPath certPath, int i2) throws CertPathValidatorException {
|
||
|
try {
|
||
|
AbstractC15317gnH a2 = C15385goy.a(C15473gra.a((X509Certificate) certPath.getCertificates().get(i2), i));
|
||
|
if (a2 != null) {
|
||
|
for (int i3 = 0; i3 < a2.e(); i3++) {
|
||
|
try {
|
||
|
AbstractC15317gnH a3 = C15385goy.a(a2.d(i3));
|
||
|
C15314gnC d2 = C15314gnC.d(a3.d(0));
|
||
|
C15314gnC d3 = C15314gnC.d(a3.d(1));
|
||
|
if (RFC3280CertPathUtilities.ANY_POLICY.equals(d2.d)) {
|
||
|
throw new CertPathValidatorException("IssuerDomainPolicy is anyPolicy", null, certPath, i2);
|
||
|
}
|
||
|
if (RFC3280CertPathUtilities.ANY_POLICY.equals(d3.d)) {
|
||
|
throw new CertPathValidatorException("SubjectDomainPolicy is anyPolicy,", null, certPath, i2);
|
||
|
}
|
||
|
} catch (Exception e2) {
|
||
|
throw new ExtCertPathValidatorException("Policy mappings extension contents could not be decoded.", e2, certPath, i2);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
} catch (AnnotatedException e3) {
|
||
|
throw new ExtCertPathValidatorException("Policy mappings extension could not be decoded.", e3, certPath, i2);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public static void a(CertPath certPath, int i2, C15485grm c15485grm, int i3) throws CertPathValidatorException {
|
||
|
if (i3 <= 0 && c15485grm == null) {
|
||
|
throw new ExtCertPathValidatorException("No valid policy tree found when one expected.", null, certPath, i2);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public static C15485grm e(CertPath certPath, int i2, C15485grm c15485grm) throws CertPathValidatorException {
|
||
|
try {
|
||
|
if (C15385goy.a(C15473gra.a((X509Certificate) certPath.getCertificates().get(i2), d)) == null) {
|
||
|
return null;
|
||
|
}
|
||
|
return c15485grm;
|
||
|
} catch (AnnotatedException e2) {
|
||
|
throw new ExtCertPathValidatorException("Could not read certificate policies extension from certificate.", e2, certPath, i2);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public static void a(CertPath certPath, int i2, C15486grn c15486grn) throws CertPathValidatorException {
|
||
|
int i3;
|
||
|
List<? extends Certificate> certificates = certPath.getCertificates();
|
||
|
X509Certificate x509Certificate = (X509Certificate) certificates.get(i2);
|
||
|
int size = certificates.size();
|
||
|
if (!C15473gra.c(x509Certificate) || size - i2 >= size) {
|
||
|
try {
|
||
|
AbstractC15317gnH a2 = C15385goy.a(C15417gpt.c(x509Certificate.getSubjectX500Principal().getEncoded()).l());
|
||
|
try {
|
||
|
C15486grn.b(c15486grn.g, a2);
|
||
|
C15486grn.c(c15486grn.a, a2);
|
||
|
try {
|
||
|
AbstractC15315gnE a3 = C15473gra.a(x509Certificate, l);
|
||
|
gpP gpp = a3 != null ? new gpP(AbstractC15317gnH.a(a3)) : null;
|
||
|
C15417gpt c2 = C15417gpt.c(a2);
|
||
|
C15314gnC c15314gnC = C15416gps.e;
|
||
|
C15411gpn[] c15411gpnArr = new C15411gpn[c2.b.length];
|
||
|
int i4 = 0;
|
||
|
int i5 = 0;
|
||
|
while (true) {
|
||
|
C15411gpn[] c15411gpnArr2 = c2.b;
|
||
|
if (i4 == c15411gpnArr2.length) {
|
||
|
break;
|
||
|
}
|
||
|
C15411gpn c15411gpn = c15411gpnArr2[i4];
|
||
|
if (c15411gpn.d.d.size() > 1) {
|
||
|
C15410gpm[] b2 = c15411gpn.b();
|
||
|
for (int i6 = 0; i6 != b2.length; i6++) {
|
||
|
if (b2[i6].d.equals(c15314gnC)) {
|
||
|
i3 = i5 + 1;
|
||
|
c15411gpnArr[i5] = c15411gpn;
|
||
|
i5 = i3;
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
i4++;
|
||
|
} else if (c15411gpn.a().d.equals(c15314gnC)) {
|
||
|
i3 = i5 + 1;
|
||
|
c15411gpnArr[i5] = c15411gpn;
|
||
|
i5 = i3;
|
||
|
break;
|
||
|
i4++;
|
||
|
} else {
|
||
|
i4++;
|
||
|
}
|
||
|
}
|
||
|
C15411gpn[] c15411gpnArr3 = new C15411gpn[i5];
|
||
|
System.arraycopy(c15411gpnArr, 0, c15411gpnArr3, 0, i5);
|
||
|
for (int i7 = 0; i7 != i5; i7++) {
|
||
|
gpO gpo = new gpO(((InterfaceC15322gnQ) c15411gpnArr3[i7].a().c).j());
|
||
|
try {
|
||
|
c15486grn.e(gpo);
|
||
|
c15486grn.c(gpo);
|
||
|
} catch (PKIXNameConstraintValidatorException e2) {
|
||
|
throw new CertPathValidatorException("Subtree check for certificate subject alternative email failed.", e2, certPath, i2);
|
||
|
}
|
||
|
}
|
||
|
if (gpp != null) {
|
||
|
try {
|
||
|
gpO[] gpoArr = gpp.b;
|
||
|
int length = gpoArr.length;
|
||
|
gpO[] gpoArr2 = new gpO[length];
|
||
|
System.arraycopy(gpoArr, 0, gpoArr2, 0, gpoArr.length);
|
||
|
for (int i8 = 0; i8 < length; i8++) {
|
||
|
try {
|
||
|
c15486grn.e(gpoArr2[i8]);
|
||
|
c15486grn.c(gpoArr2[i8]);
|
||
|
} catch (PKIXNameConstraintValidatorException e3) {
|
||
|
throw new CertPathValidatorException("Subtree check for certificate subject alternative name failed.", e3, certPath, i2);
|
||
|
}
|
||
|
}
|
||
|
} catch (Exception e4) {
|
||
|
throw new CertPathValidatorException("Subject alternative name contents could not be decoded.", e4, certPath, i2);
|
||
|
}
|
||
|
}
|
||
|
} catch (Exception e5) {
|
||
|
throw new CertPathValidatorException("Subject alternative name extension could not be decoded.", e5, certPath, i2);
|
||
|
}
|
||
|
} catch (PKIXNameConstraintValidatorException e6) {
|
||
|
throw new CertPathValidatorException("Subtree check for certificate subject failed.", e6, certPath, i2);
|
||
|
}
|
||
|
} catch (Exception e7) {
|
||
|
throw new CertPathValidatorException("Exception extracting subject name when checking subtrees.", e7, certPath, i2);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public static C15485grm d(CertPath certPath, int i2, Set set, C15485grm c15485grm, List[] listArr, int i3) throws CertPathValidatorException {
|
||
|
gpU gpu;
|
||
|
String str;
|
||
|
int i4;
|
||
|
gpU gpu2;
|
||
|
List<? extends Certificate> certificates = certPath.getCertificates();
|
||
|
X509Certificate x509Certificate = (X509Certificate) certificates.get(i2);
|
||
|
int size = certificates.size();
|
||
|
int i5 = size - i2;
|
||
|
try {
|
||
|
AbstractC15317gnH a2 = C15385goy.a(C15473gra.a(x509Certificate, d));
|
||
|
if (a2 == null || c15485grm == null) {
|
||
|
return null;
|
||
|
}
|
||
|
Enumeration b2 = a2.b();
|
||
|
HashSet hashSet = new HashSet();
|
||
|
while (b2.hasMoreElements()) {
|
||
|
Object nextElement = b2.nextElement();
|
||
|
if (nextElement == null || (nextElement instanceof gpU)) {
|
||
|
gpu2 = (gpU) nextElement;
|
||
|
} else {
|
||
|
gpu2 = new gpU(AbstractC15317gnH.a(nextElement));
|
||
|
}
|
||
|
C15314gnC c15314gnC = gpu2.e;
|
||
|
hashSet.add(c15314gnC.d);
|
||
|
if (!RFC3280CertPathUtilities.ANY_POLICY.equals(c15314gnC.d)) {
|
||
|
try {
|
||
|
Set b3 = C15473gra.b(gpu2.c);
|
||
|
if (!C15473gra.a(i5, listArr, c15314gnC, b3)) {
|
||
|
C15473gra.d(i5, listArr, c15314gnC, b3);
|
||
|
}
|
||
|
} catch (CertPathValidatorException e2) {
|
||
|
throw new ExtCertPathValidatorException("Policy qualifier info set could not be build.", e2, certPath, i2);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if (set.isEmpty() || set.contains(RFC3280CertPathUtilities.ANY_POLICY)) {
|
||
|
set.clear();
|
||
|
set.addAll(hashSet);
|
||
|
} else {
|
||
|
HashSet hashSet2 = new HashSet();
|
||
|
for (Object obj : set) {
|
||
|
if (hashSet.contains(obj)) {
|
||
|
hashSet2.add(obj);
|
||
|
}
|
||
|
}
|
||
|
set.clear();
|
||
|
set.addAll(hashSet2);
|
||
|
}
|
||
|
if (i3 > 0 || (i5 < size && C15473gra.c(x509Certificate))) {
|
||
|
Enumeration b4 = a2.b();
|
||
|
while (true) {
|
||
|
if (!b4.hasMoreElements()) {
|
||
|
break;
|
||
|
}
|
||
|
Object nextElement2 = b4.nextElement();
|
||
|
if (nextElement2 == null || (nextElement2 instanceof gpU)) {
|
||
|
gpu = (gpU) nextElement2;
|
||
|
} else {
|
||
|
gpu = new gpU(AbstractC15317gnH.a(nextElement2));
|
||
|
}
|
||
|
if (RFC3280CertPathUtilities.ANY_POLICY.equals(gpu.e.d)) {
|
||
|
Set b5 = C15473gra.b(gpu.c);
|
||
|
List list = listArr[i5 - 1];
|
||
|
for (int i6 = 0; i6 < list.size(); i6++) {
|
||
|
C15485grm c15485grm2 = (C15485grm) list.get(i6);
|
||
|
for (Object obj2 : c15485grm2.getExpectedPolicies()) {
|
||
|
if (obj2 instanceof String) {
|
||
|
str = (String) obj2;
|
||
|
} else if (obj2 instanceof C15314gnC) {
|
||
|
str = ((C15314gnC) obj2).d;
|
||
|
}
|
||
|
String str2 = str;
|
||
|
Iterator children = c15485grm2.getChildren();
|
||
|
boolean z = false;
|
||
|
while (children.hasNext()) {
|
||
|
if (str2.equals(((C15485grm) children.next()).getValidPolicy())) {
|
||
|
z = true;
|
||
|
}
|
||
|
}
|
||
|
if (!z) {
|
||
|
HashSet hashSet3 = new HashSet();
|
||
|
hashSet3.add(str2);
|
||
|
C15485grm c15485grm3 = c15485grm2;
|
||
|
C15485grm c15485grm4 = new C15485grm(new ArrayList(), i5, hashSet3, c15485grm2, b5, str2, false);
|
||
|
c15485grm3.d.add(c15485grm4);
|
||
|
c15485grm4.b = c15485grm3;
|
||
|
listArr[i5].add(c15485grm4);
|
||
|
c15485grm2 = c15485grm3;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
C15485grm c15485grm5 = c15485grm;
|
||
|
for (int i7 = i5 - 1; i7 >= 0; i7--) {
|
||
|
List list2 = listArr[i7];
|
||
|
while (i4 < list2.size()) {
|
||
|
C15485grm c15485grm6 = (C15485grm) list2.get(i4);
|
||
|
i4 = ((c15485grm6.d.isEmpty() ^ true) || (c15485grm5 = C15473gra.a(c15485grm5, listArr, c15485grm6)) != null) ? i4 + 1 : 0;
|
||
|
}
|
||
|
}
|
||
|
Set<String> criticalExtensionOIDs = x509Certificate.getCriticalExtensionOIDs();
|
||
|
if (criticalExtensionOIDs != null) {
|
||
|
boolean contains = criticalExtensionOIDs.contains(d);
|
||
|
List list3 = listArr[i5];
|
||
|
for (int i8 = 0; i8 < list3.size(); i8++) {
|
||
|
((C15485grm) list3.get(i8)).a = contains;
|
||
|
}
|
||
|
}
|
||
|
return c15485grm5;
|
||
|
} catch (AnnotatedException e3) {
|
||
|
throw new ExtCertPathValidatorException("Could not read certificate policies extension from certificate.", e3, certPath, i2);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
/* JADX WARN: Multi-variable type inference failed */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:40:0x017d A[Catch: AnnotatedException -> 0x0207, TRY_ENTER, TryCatch #7 {AnnotatedException -> 0x0207, blocks: (B:16:0x0039, B:18:0x003d, B:20:0x0045, B:21:0x0050, B:28:0x0071, B:74:0x0087, B:76:0x008e, B:78:0x0091, B:80:0x0095, B:32:0x0114, B:34:0x0118, B:40:0x017d, B:42:0x0181, B:43:0x0182, B:44:0x0189, B:45:0x018a, B:47:0x0190, B:50:0x01a3, B:53:0x01a9, B:54:0x01b0, B:55:0x019b, B:57:0x01a1, B:58:0x01b1, B:59:0x01f4, B:106:0x0101, B:107:0x0108, B:110:0x01f6, B:111:0x01fd, B:115:0x01ff, B:116:0x0206, B:23:0x0055, B:24:0x005f, B:26:0x0065), top: B:15:0x0039, inners: #9, #10, #12 }] */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:45:0x018a A[Catch: AnnotatedException -> 0x0207, TryCatch #7 {AnnotatedException -> 0x0207, blocks: (B:16:0x0039, B:18:0x003d, B:20:0x0045, B:21:0x0050, B:28:0x0071, B:74:0x0087, B:76:0x008e, B:78:0x0091, B:80:0x0095, B:32:0x0114, B:34:0x0118, B:40:0x017d, B:42:0x0181, B:43:0x0182, B:44:0x0189, B:45:0x018a, B:47:0x0190, B:50:0x01a3, B:53:0x01a9, B:54:0x01b0, B:55:0x019b, B:57:0x01a1, B:58:0x01b1, B:59:0x01f4, B:106:0x0101, B:107:0x0108, B:110:0x01f6, B:111:0x01fd, B:115:0x01ff, B:116:0x0206, B:23:0x0055, B:24:0x005f, B:26:0x0065), top: B:15:0x0039, inners: #9, #10, #12 }] */
|
||
|
/* JADX WARN: Type inference failed for: r11v0, types: [o.grr] */
|
||
|
/* JADX WARN: Type inference failed for: r11v1, types: [o.grr] */
|
||
|
/* JADX WARN: Type inference failed for: r11v2 */
|
||
|
/* JADX WARN: Type inference failed for: r14v5, types: [o.grr] */
|
||
|
/* JADX WARN: Type inference failed for: r2v13, types: [o.grr] */
|
||
|
/* JADX WARN: Type inference failed for: r2v31 */
|
||
|
/* JADX WARN: Type inference failed for: r2v35 */
|
||
|
/* JADX WARN: Type inference failed for: r5v3 */
|
||
|
/* JADX WARN: Type inference failed for: r5v4 */
|
||
|
/* JADX WARN: Type inference failed for: r5v5 */
|
||
|
/*
|
||
|
Code decompiled incorrectly, please refer to instructions dump.
|
||
|
To view partially-correct add '--show-bad-code' argument
|
||
|
*/
|
||
|
public static void c(java.security.cert.CertPath r25, o.C15457gqz r26, int r27, java.security.PublicKey r28, boolean r29, o.C15417gpt r30, java.security.cert.X509Certificate r31, o.gqQ r32) throws org.spongycastle.jce.exception.ExtCertPathValidatorException {
|
||
|
/*
|
||
|
Method dump skipped, instructions count: 648
|
||
|
To view this dump add '--comments-level debug' option
|
||
|
*/
|
||
|
throw new UnsupportedOperationException("Method not decompiled: o.C15492grt.c(java.security.cert.CertPath, o.gqz, int, java.security.PublicKey, boolean, o.gpt, java.security.cert.X509Certificate, o.gqQ):void");
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:12:0x002c, code lost:
|
||
|
|
||
|
r3 = new java.math.BigInteger(org.spongycastle.asn1.ASN1Integer.d(r1, false).b).intValue();
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:13:0x003c, code lost:
|
||
|
|
||
|
if (r3 >= r5) goto L16;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:14:0x003e, code lost:
|
||
|
|
||
|
return r3;
|
||
|
*/
|
||
|
/*
|
||
|
Code decompiled incorrectly, please refer to instructions dump.
|
||
|
To view partially-correct add '--show-bad-code' argument
|
||
|
*/
|
||
|
public static int a(java.security.cert.CertPath r3, int r4, int r5) throws java.security.cert.CertPathValidatorException {
|
||
|
/*
|
||
|
java.util.List r0 = r3.getCertificates()
|
||
|
java.lang.Object r0 = r0.get(r4)
|
||
|
java.security.cert.X509Certificate r0 = (java.security.cert.X509Certificate) r0
|
||
|
java.lang.String r1 = o.C15492grt.g // Catch: java.lang.Exception -> L49
|
||
|
o.gnE r0 = o.C15473gra.a(r0, r1) // Catch: java.lang.Exception -> L49
|
||
|
o.gnH r0 = o.C15385goy.a(r0) // Catch: java.lang.Exception -> L49
|
||
|
if (r0 == 0) goto L48
|
||
|
java.util.Enumeration r0 = r0.b()
|
||
|
L1a:
|
||
|
boolean r1 = r0.hasMoreElements()
|
||
|
if (r1 == 0) goto L48
|
||
|
java.lang.Object r1 = r0.nextElement() // Catch: java.lang.IllegalArgumentException -> L3f
|
||
|
o.gnP r1 = o.AbstractC15321gnP.d(r1) // Catch: java.lang.IllegalArgumentException -> L3f
|
||
|
int r2 = r1.e // Catch: java.lang.IllegalArgumentException -> L3f
|
||
|
if (r2 != 0) goto L1a
|
||
|
r0 = 0
|
||
|
org.spongycastle.asn1.ASN1Integer r0 = org.spongycastle.asn1.ASN1Integer.d(r1, r0) // Catch: java.lang.IllegalArgumentException -> L3f
|
||
|
java.math.BigInteger r1 = new java.math.BigInteger // Catch: java.lang.IllegalArgumentException -> L3f
|
||
|
byte[] r0 = r0.b // Catch: java.lang.IllegalArgumentException -> L3f
|
||
|
r1.<init>(r0) // Catch: java.lang.IllegalArgumentException -> L3f
|
||
|
int r3 = r1.intValue() // Catch: java.lang.IllegalArgumentException -> L3f
|
||
|
if (r3 >= r5) goto L48
|
||
|
return r3
|
||
|
L3f:
|
||
|
r5 = move-exception
|
||
|
org.spongycastle.jce.exception.ExtCertPathValidatorException r0 = new org.spongycastle.jce.exception.ExtCertPathValidatorException
|
||
|
java.lang.String r1 = "Policy constraints extension contents cannot be decoded."
|
||
|
r0.<init>(r1, r5, r3, r4)
|
||
|
throw r0
|
||
|
L48:
|
||
|
return r5
|
||
|
L49:
|
||
|
r5 = move-exception
|
||
|
org.spongycastle.jce.exception.ExtCertPathValidatorException r0 = new org.spongycastle.jce.exception.ExtCertPathValidatorException
|
||
|
java.lang.String r1 = "Policy constraints extension cannot be decoded."
|
||
|
r0.<init>(r1, r5, r3, r4)
|
||
|
throw r0
|
||
|
*/
|
||
|
throw new UnsupportedOperationException("Method not decompiled: o.C15492grt.a(java.security.cert.CertPath, int, int):int");
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:12:0x002d, code lost:
|
||
|
|
||
|
r4 = new java.math.BigInteger(org.spongycastle.asn1.ASN1Integer.d(r1, false).b).intValue();
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:13:0x003d, code lost:
|
||
|
|
||
|
if (r4 >= r6) goto L16;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:14:0x003f, code lost:
|
||
|
|
||
|
return r4;
|
||
|
*/
|
||
|
/*
|
||
|
Code decompiled incorrectly, please refer to instructions dump.
|
||
|
To view partially-correct add '--show-bad-code' argument
|
||
|
*/
|
||
|
public static int c(java.security.cert.CertPath r4, int r5, int r6) throws java.security.cert.CertPathValidatorException {
|
||
|
/*
|
||
|
java.util.List r0 = r4.getCertificates()
|
||
|
java.lang.Object r0 = r0.get(r5)
|
||
|
java.security.cert.X509Certificate r0 = (java.security.cert.X509Certificate) r0
|
||
|
java.lang.String r1 = o.C15492grt.g // Catch: java.lang.Exception -> L4a
|
||
|
o.gnE r0 = o.C15473gra.a(r0, r1) // Catch: java.lang.Exception -> L4a
|
||
|
o.gnH r0 = o.C15385goy.a(r0) // Catch: java.lang.Exception -> L4a
|
||
|
if (r0 == 0) goto L49
|
||
|
java.util.Enumeration r0 = r0.b()
|
||
|
L1a:
|
||
|
boolean r1 = r0.hasMoreElements()
|
||
|
if (r1 == 0) goto L49
|
||
|
java.lang.Object r1 = r0.nextElement() // Catch: java.lang.IllegalArgumentException -> L40
|
||
|
o.gnP r1 = o.AbstractC15321gnP.d(r1) // Catch: java.lang.IllegalArgumentException -> L40
|
||
|
int r2 = r1.e // Catch: java.lang.IllegalArgumentException -> L40
|
||
|
r3 = 1
|
||
|
if (r2 != r3) goto L1a
|
||
|
r0 = 0
|
||
|
org.spongycastle.asn1.ASN1Integer r0 = org.spongycastle.asn1.ASN1Integer.d(r1, r0) // Catch: java.lang.IllegalArgumentException -> L40
|
||
|
java.math.BigInteger r1 = new java.math.BigInteger // Catch: java.lang.IllegalArgumentException -> L40
|
||
|
byte[] r0 = r0.b // Catch: java.lang.IllegalArgumentException -> L40
|
||
|
r1.<init>(r0) // Catch: java.lang.IllegalArgumentException -> L40
|
||
|
int r4 = r1.intValue() // Catch: java.lang.IllegalArgumentException -> L40
|
||
|
if (r4 >= r6) goto L49
|
||
|
return r4
|
||
|
L40:
|
||
|
r6 = move-exception
|
||
|
org.spongycastle.jce.exception.ExtCertPathValidatorException r0 = new org.spongycastle.jce.exception.ExtCertPathValidatorException
|
||
|
java.lang.String r1 = "Policy constraints extension contents cannot be decoded."
|
||
|
r0.<init>(r1, r6, r4, r5)
|
||
|
throw r0
|
||
|
L49:
|
||
|
return r6
|
||
|
L4a:
|
||
|
r6 = move-exception
|
||
|
org.spongycastle.jce.exception.ExtCertPathValidatorException r0 = new org.spongycastle.jce.exception.ExtCertPathValidatorException
|
||
|
java.lang.String r1 = "Policy constraints extension cannot be decoded."
|
||
|
r0.<init>(r1, r6, r4, r5)
|
||
|
throw r0
|
||
|
*/
|
||
|
throw new UnsupportedOperationException("Method not decompiled: o.C15492grt.c(java.security.cert.CertPath, int, int):int");
|
||
|
}
|
||
|
|
||
|
/* JADX ERROR: JadxRuntimeException in pass: BlockProcessor
|
||
|
jadx.core.utils.exceptions.JadxRuntimeException: CFG modification limit reached, blocks count: 716
|
||
|
at jadx.core.dex.visitors.blocks.BlockProcessor.processBlocksTree(BlockProcessor.java:64)
|
||
|
at jadx.core.dex.visitors.blocks.BlockProcessor.visit(BlockProcessor.java:44)
|
||
|
*/
|
||
|
protected static void c(java.security.cert.CertPath r27, int r28, o.C15486grn r29) throws java.security.cert.CertPathValidatorException {
|
||
|
/*
|
||
|
Method dump skipped, instructions count: 2169
|
||
|
To view this dump add '--comments-level debug' option
|
||
|
*/
|
||
|
throw new UnsupportedOperationException("Method not decompiled: o.C15492grt.c(java.security.cert.CertPath, int, o.grn):void");
|
||
|
}
|
||
|
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:337:0x0141, code lost:
|
||
|
|
||
|
if (r5 == 0) goto L352;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:338:0x0143, code lost:
|
||
|
|
||
|
r3 = r3;
|
||
|
*/
|
||
|
/* JADX WARN: Multi-variable type inference failed */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:114:0x03d2 */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:124:0x03eb A[SYNTHETIC] */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:197:0x031b A[Catch: Exception -> 0x0361, AnnotatedException -> 0x04af, TRY_LEAVE, TryCatch #17 {Exception -> 0x0361, blocks: (B:195:0x0310, B:197:0x031b), top: B:194:0x0310, outer: #0 }] */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:200:0x032a A[Catch: AnnotatedException -> 0x04af, TryCatch #0 {AnnotatedException -> 0x04af, blocks: (B:189:0x02ef, B:191:0x02f5, B:193:0x02fd, B:195:0x0310, B:197:0x031b, B:198:0x0326, B:200:0x032a, B:203:0x0330, B:207:0x0337, B:208:0x033e, B:209:0x033f, B:212:0x0345, B:216:0x034c, B:217:0x0353, B:219:0x0354, B:95:0x0375, B:97:0x037d, B:98:0x0388, B:100:0x038c, B:103:0x03aa, B:105:0x03b0, B:135:0x0406, B:136:0x040d, B:115:0x03d4, B:119:0x03db, B:120:0x03e2, B:122:0x03e3, B:123:0x03ea, B:125:0x03eb, B:126:0x03f2, B:132:0x03fe, B:133:0x0405, B:129:0x03f4, B:130:0x03fc, B:137:0x03c0, B:146:0x0417, B:147:0x041e, B:143:0x040f, B:144:0x0416, B:54:0x0426, B:151:0x0420, B:152:0x0425, B:223:0x0359, B:224:0x0360, B:228:0x0362, B:229:0x0369, B:231:0x0300, B:232:0x0305, B:234:0x0306, B:235:0x030e, B:109:0x03c6, B:112:0x03cc), top: B:188:0x02ef, inners: #1, #9, #13, #15, #17 }] */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:221:0x0358 */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:222:0x0359 A[SYNTHETIC] */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:225:0x0325 */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:311:0x00f7 A[EXC_TOP_SPLITTER, SYNTHETIC] */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:45:0x014c A[Catch: AnnotatedException -> 0x04c7, TRY_LEAVE, TryCatch #5 {AnnotatedException -> 0x04c7, blocks: (B:312:0x00f7, B:314:0x0106, B:318:0x010f, B:322:0x012c, B:326:0x0124, B:327:0x012b, B:334:0x0137, B:335:0x013e, B:48:0x0162, B:50:0x016a, B:289:0x018f, B:296:0x0194, B:341:0x0144, B:342:0x014b, B:45:0x014c), top: B:311:0x00f7, inners: #12 }] */
|
||
|
/* JADX WARN: Type inference failed for: r0v107, types: [java.lang.Object, o.gpt] */
|
||
|
/* JADX WARN: Type inference failed for: r14v6 */
|
||
|
/* JADX WARN: Type inference failed for: r3v51, types: [java.lang.Object, o.gpt] */
|
||
|
/* JADX WARN: Type inference failed for: r4v1 */
|
||
|
/* JADX WARN: Type inference failed for: r4v14 */
|
||
|
/* JADX WARN: Type inference failed for: r4v15 */
|
||
|
/* JADX WARN: Type inference failed for: r4v2 */
|
||
|
/* JADX WARN: Type inference failed for: r4v20, types: [byte[]] */
|
||
|
/* JADX WARN: Type inference failed for: r4v21 */
|
||
|
/* JADX WARN: Type inference failed for: r4v23 */
|
||
|
/* JADX WARN: Type inference failed for: r4v30 */
|
||
|
/* JADX WARN: Type inference failed for: r4v31 */
|
||
|
/* JADX WARN: Type inference failed for: r4v32 */
|
||
|
/* JADX WARN: Type inference failed for: r4v37, types: [o.grr] */
|
||
|
/* JADX WARN: Type inference failed for: r4v38 */
|
||
|
/* JADX WARN: Type inference failed for: r4v39, types: [o.gpV] */
|
||
|
/* JADX WARN: Type inference failed for: r4v42, types: [java.util.List] */
|
||
|
/* JADX WARN: Type inference failed for: r4v46 */
|
||
|
/* JADX WARN: Type inference failed for: r4v47 */
|
||
|
/* JADX WARN: Type inference failed for: r4v48 */
|
||
|
/* JADX WARN: Type inference failed for: r4v6 */
|
||
|
/*
|
||
|
Code decompiled incorrectly, please refer to instructions dump.
|
||
|
To view partially-correct add '--show-bad-code' argument
|
||
|
*/
|
||
|
private static void e(o.C15392gpI r22, o.C15457gqz r23, java.security.cert.X509Certificate r24, java.util.Date r25, java.security.cert.X509Certificate r26, java.security.PublicKey r27, o.gqY r28, o.C15490grr r29, java.util.List r30, o.gqQ r31) throws org.spongycastle.jce.provider.AnnotatedException {
|
||
|
/*
|
||
|
Method dump skipped, instructions count: 1295
|
||
|
To view this dump add '--comments-level debug' option
|
||
|
*/
|
||
|
throw new UnsupportedOperationException("Method not decompiled: o.C15492grt.e(o.gpI, o.gqz, java.security.cert.X509Certificate, java.util.Date, java.security.cert.X509Certificate, java.security.PublicKey, o.gqY, o.grr, java.util.List, o.gqQ):void");
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public static int g(CertPath certPath, int i2, int i3) throws CertPathValidatorException {
|
||
|
int intValue;
|
||
|
try {
|
||
|
ASN1Integer e2 = ASN1Integer.e((Object) C15473gra.a((X509Certificate) certPath.getCertificates().get(i2), a));
|
||
|
return (e2 == null || (intValue = new BigInteger(e2.b).intValue()) >= i3) ? i3 : intValue;
|
||
|
} catch (Exception e3) {
|
||
|
throw new ExtCertPathValidatorException("Inhibit any-policy extension cannot be decoded.", e3, certPath, i2);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public static void b(CertPath certPath, int i2) throws CertPathValidatorException {
|
||
|
try {
|
||
|
AbstractC15315gnE a2 = C15473gra.a((X509Certificate) certPath.getCertificates().get(i2), c);
|
||
|
C15422gpy c15422gpy = a2 != null ? new C15422gpy(AbstractC15317gnH.a(a2)) : null;
|
||
|
if (c15422gpy != null) {
|
||
|
if (!c15422gpy.a()) {
|
||
|
throw new CertPathValidatorException("Not a CA certificate");
|
||
|
}
|
||
|
return;
|
||
|
}
|
||
|
throw new CertPathValidatorException("Intermediate certificate lacks BasicConstraints");
|
||
|
} catch (Exception e2) {
|
||
|
throw new ExtCertPathValidatorException("Basic constraints extension cannot be decoded.", e2, certPath, i2);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public static int h(CertPath certPath, int i2, int i3) throws CertPathValidatorException {
|
||
|
if (C15473gra.c((X509Certificate) certPath.getCertificates().get(i2))) {
|
||
|
return i3;
|
||
|
}
|
||
|
if (i3 > 0) {
|
||
|
return i3 - 1;
|
||
|
}
|
||
|
throw new ExtCertPathValidatorException("Max path length not greater than zero", null, certPath, i2);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public static int i(CertPath certPath, int i2, int i3) throws CertPathValidatorException {
|
||
|
int intValue;
|
||
|
try {
|
||
|
AbstractC15315gnE a2 = C15473gra.a((X509Certificate) certPath.getCertificates().get(i2), c);
|
||
|
C15422gpy c15422gpy = a2 != null ? new C15422gpy(AbstractC15317gnH.a(a2)) : null;
|
||
|
if (c15422gpy != null) {
|
||
|
ASN1Integer aSN1Integer = c15422gpy.e;
|
||
|
BigInteger bigInteger = aSN1Integer != null ? new BigInteger(aSN1Integer.b) : null;
|
||
|
if (bigInteger != null && (intValue = bigInteger.intValue()) < i3) {
|
||
|
return intValue;
|
||
|
}
|
||
|
}
|
||
|
return i3;
|
||
|
} catch (Exception e2) {
|
||
|
throw new ExtCertPathValidatorException("Basic constraints extension cannot be decoded.", e2, certPath, i2);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public static void d(CertPath certPath, int i2) throws CertPathValidatorException {
|
||
|
boolean[] keyUsage = ((X509Certificate) certPath.getCertificates().get(i2)).getKeyUsage();
|
||
|
if (keyUsage != null && !keyUsage[5]) {
|
||
|
throw new ExtCertPathValidatorException("Issuer certificate keyusage extension is critical and does not permit key signing.", null, certPath, i2);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public static void d(CertPath certPath, int i2, Set set, List list) throws CertPathValidatorException {
|
||
|
X509Certificate x509Certificate = (X509Certificate) certPath.getCertificates().get(i2);
|
||
|
Iterator it = list.iterator();
|
||
|
while (it.hasNext()) {
|
||
|
try {
|
||
|
((PKIXCertPathChecker) it.next()).check(x509Certificate, set);
|
||
|
} catch (CertPathValidatorException e2) {
|
||
|
throw new CertPathValidatorException(e2.getMessage(), e2.getCause(), certPath, i2);
|
||
|
}
|
||
|
}
|
||
|
if (!set.isEmpty()) {
|
||
|
throw new ExtCertPathValidatorException("Certificate has unsupported critical extension: ".concat(String.valueOf(set)), null, certPath, i2);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public static int e(CertPath certPath, int i2, int i3) {
|
||
|
return (C15473gra.c((X509Certificate) certPath.getCertificates().get(i2)) || i3 == 0) ? i3 : i3 - 1;
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public static int d(CertPath certPath, int i2, int i3) {
|
||
|
return (C15473gra.c((X509Certificate) certPath.getCertificates().get(i2)) || i3 == 0) ? i3 : i3 - 1;
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public static int b(CertPath certPath, int i2, int i3) {
|
||
|
return (C15473gra.c((X509Certificate) certPath.getCertificates().get(i2)) || i3 == 0) ? i3 : i3 - 1;
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public static int a(int i2, X509Certificate x509Certificate) {
|
||
|
return (C15473gra.c(x509Certificate) || i2 == 0) ? i2 : i2 - 1;
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public static int j(CertPath certPath, int i2, int i3) throws CertPathValidatorException {
|
||
|
try {
|
||
|
AbstractC15317gnH a2 = C15385goy.a(C15473gra.a((X509Certificate) certPath.getCertificates().get(i2), g));
|
||
|
if (a2 != null) {
|
||
|
Enumeration b2 = a2.b();
|
||
|
while (b2.hasMoreElements()) {
|
||
|
AbstractC15321gnP abstractC15321gnP = (AbstractC15321gnP) b2.nextElement();
|
||
|
if (abstractC15321gnP.e == 0) {
|
||
|
try {
|
||
|
if (new BigInteger(ASN1Integer.d(abstractC15321gnP, false).b).intValue() == 0) {
|
||
|
return 0;
|
||
|
}
|
||
|
} catch (Exception e2) {
|
||
|
throw new ExtCertPathValidatorException("Policy constraints requireExplicitPolicy field could not be decoded.", e2, certPath, i2);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return i3;
|
||
|
} catch (AnnotatedException e3) {
|
||
|
throw new ExtCertPathValidatorException("Policy constraints could not be decoded.", e3, certPath, i2);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public static void e(CertPath certPath, int i2, List list, Set set) throws CertPathValidatorException {
|
||
|
X509Certificate x509Certificate = (X509Certificate) certPath.getCertificates().get(i2);
|
||
|
Iterator it = list.iterator();
|
||
|
while (it.hasNext()) {
|
||
|
try {
|
||
|
((PKIXCertPathChecker) it.next()).check(x509Certificate, set);
|
||
|
} catch (CertPathValidatorException e2) {
|
||
|
throw new ExtCertPathValidatorException("Additional certificate path checker failed.", e2, certPath, i2);
|
||
|
}
|
||
|
}
|
||
|
if (!set.isEmpty()) {
|
||
|
throw new ExtCertPathValidatorException("Certificate has unsupported critical extension: ".concat(String.valueOf(set)), null, certPath, i2);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public static C15485grm b(CertPath certPath, C15457gqz c15457gqz, Set set, int i2, List[] listArr, C15485grm c15485grm, Set set2) throws CertPathValidatorException {
|
||
|
int size = certPath.getCertificates().size();
|
||
|
if (c15485grm != null) {
|
||
|
if (!C15473gra.d(set)) {
|
||
|
HashSet<C15485grm> hashSet = new HashSet();
|
||
|
for (List list : listArr) {
|
||
|
for (int i3 = 0; i3 < list.size(); i3++) {
|
||
|
C15485grm c15485grm2 = (C15485grm) list.get(i3);
|
||
|
if (RFC3280CertPathUtilities.ANY_POLICY.equals(c15485grm2.getValidPolicy())) {
|
||
|
Iterator children = c15485grm2.getChildren();
|
||
|
while (children.hasNext()) {
|
||
|
C15485grm c15485grm3 = (C15485grm) children.next();
|
||
|
if (!RFC3280CertPathUtilities.ANY_POLICY.equals(c15485grm3.getValidPolicy())) {
|
||
|
hashSet.add(c15485grm3);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
for (C15485grm c15485grm4 : hashSet) {
|
||
|
if (!set.contains(c15485grm4.getValidPolicy())) {
|
||
|
c15485grm = C15473gra.a(c15485grm, listArr, c15485grm4);
|
||
|
}
|
||
|
}
|
||
|
if (c15485grm != null) {
|
||
|
for (int i4 = size - 1; i4 >= 0; i4--) {
|
||
|
List list2 = listArr[i4];
|
||
|
for (int i5 = 0; i5 < list2.size(); i5++) {
|
||
|
C15485grm c15485grm5 = (C15485grm) list2.get(i5);
|
||
|
if (!(!c15485grm5.d.isEmpty())) {
|
||
|
c15485grm = C15473gra.a(c15485grm, listArr, c15485grm5);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
} else if (c15457gqz.b.isExplicitPolicyRequired()) {
|
||
|
if (set2.isEmpty()) {
|
||
|
throw new ExtCertPathValidatorException("Explicit policy requested but none available.", null, certPath, i2);
|
||
|
}
|
||
|
HashSet hashSet2 = new HashSet();
|
||
|
for (List list3 : listArr) {
|
||
|
for (int i6 = 0; i6 < list3.size(); i6++) {
|
||
|
C15485grm c15485grm6 = (C15485grm) list3.get(i6);
|
||
|
if (RFC3280CertPathUtilities.ANY_POLICY.equals(c15485grm6.getValidPolicy())) {
|
||
|
Iterator children2 = c15485grm6.getChildren();
|
||
|
while (children2.hasNext()) {
|
||
|
hashSet2.add(children2.next());
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
Iterator it = hashSet2.iterator();
|
||
|
while (it.hasNext()) {
|
||
|
set2.contains(((C15485grm) it.next()).getValidPolicy());
|
||
|
}
|
||
|
if (c15485grm != null) {
|
||
|
for (int i7 = size - 1; i7 >= 0; i7--) {
|
||
|
List list4 = listArr[i7];
|
||
|
for (int i8 = 0; i8 < list4.size(); i8++) {
|
||
|
C15485grm c15485grm7 = (C15485grm) list4.get(i8);
|
||
|
if (!(!c15485grm7.d.isEmpty())) {
|
||
|
c15485grm = C15473gra.a(c15485grm, listArr, c15485grm7);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return c15485grm;
|
||
|
}
|
||
|
if (c15457gqz.b.isExplicitPolicyRequired()) {
|
||
|
throw new ExtCertPathValidatorException("Explicit policy requested but none available.", null, certPath, i2);
|
||
|
}
|
||
|
return null;
|
||
|
}
|
||
|
}
|