203 lines
7.1 KiB
Java
203 lines
7.1 KiB
Java
|
package o;
|
||
|
|
||
|
import java.io.IOException;
|
||
|
import java.math.BigInteger;
|
||
|
import java.security.cert.CRLException;
|
||
|
import java.security.cert.X509CRLEntry;
|
||
|
import java.util.Date;
|
||
|
import java.util.Enumeration;
|
||
|
import java.util.HashSet;
|
||
|
import java.util.Set;
|
||
|
import javax.security.auth.x500.X500Principal;
|
||
|
import o.C15433gqb;
|
||
|
import org.bouncycastle.asn1.ASN1Encoding;
|
||
|
import org.spongycastle.asn1.ASN1Integer;
|
||
|
|
||
|
/* renamed from: o.gqI, reason: case insensitive filesystem */
|
||
|
/* loaded from: classes6.dex */
|
||
|
final class C15429gqI extends X509CRLEntry {
|
||
|
private C15417gpt a;
|
||
|
private int b;
|
||
|
private boolean c;
|
||
|
private C15433gqb.Sts d;
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public C15429gqI(C15433gqb.Sts sts, boolean z, C15417gpt c15417gpt) {
|
||
|
this.d = sts;
|
||
|
this.a = e(z, c15417gpt);
|
||
|
}
|
||
|
|
||
|
@Override // java.security.cert.X509Extension
|
||
|
public final boolean hasUnsupportedCriticalExtension() {
|
||
|
Set criticalExtensionOIDs = getCriticalExtensionOIDs();
|
||
|
return (criticalExtensionOIDs == null || criticalExtensionOIDs.isEmpty()) ? false : true;
|
||
|
}
|
||
|
|
||
|
private C15417gpt e(boolean z, C15417gpt c15417gpt) {
|
||
|
if (!z) {
|
||
|
return null;
|
||
|
}
|
||
|
C15314gnC c15314gnC = C15394gpK.a;
|
||
|
C15391gpH a = this.d.a();
|
||
|
C15394gpK c15394gpK = a != null ? (C15394gpK) a.d.get(c15314gnC) : null;
|
||
|
if (c15394gpK == null) {
|
||
|
return c15417gpt;
|
||
|
}
|
||
|
try {
|
||
|
AbstractC15315gnE b = C15394gpK.b(c15394gpK);
|
||
|
gpO[] gpoArr = (b != null ? new gpP(AbstractC15317gnH.a(b)) : null).b;
|
||
|
int length = gpoArr.length;
|
||
|
gpO[] gpoArr2 = new gpO[length];
|
||
|
System.arraycopy(gpoArr, 0, gpoArr2, 0, gpoArr.length);
|
||
|
for (int i = 0; i < length; i++) {
|
||
|
if (gpoArr2[i].e == 4) {
|
||
|
return C15417gpt.c(gpoArr2[i].d);
|
||
|
}
|
||
|
}
|
||
|
} catch (Exception unused) {
|
||
|
}
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
@Override // java.security.cert.X509CRLEntry
|
||
|
public final X500Principal getCertificateIssuer() {
|
||
|
if (this.a == null) {
|
||
|
return null;
|
||
|
}
|
||
|
try {
|
||
|
return new X500Principal(this.a.l());
|
||
|
} catch (IOException unused) {
|
||
|
return null;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
private Set e(boolean z) {
|
||
|
C15391gpH a = this.d.a();
|
||
|
if (a == null) {
|
||
|
return null;
|
||
|
}
|
||
|
HashSet hashSet = new HashSet();
|
||
|
Enumeration elements = a.a.elements();
|
||
|
while (elements.hasMoreElements()) {
|
||
|
C15314gnC c15314gnC = (C15314gnC) elements.nextElement();
|
||
|
if (z == ((C15394gpK) a.d.get(c15314gnC)).p) {
|
||
|
hashSet.add(c15314gnC.d);
|
||
|
}
|
||
|
}
|
||
|
return hashSet;
|
||
|
}
|
||
|
|
||
|
@Override // java.security.cert.X509Extension
|
||
|
public final Set getCriticalExtensionOIDs() {
|
||
|
return e(true);
|
||
|
}
|
||
|
|
||
|
@Override // java.security.cert.X509Extension
|
||
|
public final Set getNonCriticalExtensionOIDs() {
|
||
|
return e(false);
|
||
|
}
|
||
|
|
||
|
@Override // java.security.cert.X509Extension
|
||
|
public final byte[] getExtensionValue(String str) {
|
||
|
C15314gnC c15314gnC = new C15314gnC(str);
|
||
|
C15391gpH a = this.d.a();
|
||
|
C15394gpK c15394gpK = a != null ? (C15394gpK) a.d.get(c15314gnC) : null;
|
||
|
if (c15394gpK == null) {
|
||
|
return null;
|
||
|
}
|
||
|
try {
|
||
|
return c15394gpK.v.l();
|
||
|
} catch (Exception e) {
|
||
|
StringBuilder sb = new StringBuilder("Exception encoding: ");
|
||
|
sb.append(e.toString());
|
||
|
throw new IllegalStateException(sb.toString());
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // java.security.cert.X509CRLEntry
|
||
|
public final int hashCode() {
|
||
|
if (!this.c) {
|
||
|
this.b = super.hashCode();
|
||
|
this.c = true;
|
||
|
}
|
||
|
return this.b;
|
||
|
}
|
||
|
|
||
|
@Override // java.security.cert.X509CRLEntry
|
||
|
public final boolean equals(Object obj) {
|
||
|
if (obj == this) {
|
||
|
return true;
|
||
|
}
|
||
|
if (obj instanceof C15429gqI) {
|
||
|
return this.d.equals(((C15429gqI) obj).d);
|
||
|
}
|
||
|
return super.equals(this);
|
||
|
}
|
||
|
|
||
|
@Override // java.security.cert.X509CRLEntry
|
||
|
public final byte[] getEncoded() throws CRLException {
|
||
|
try {
|
||
|
return this.d.c(ASN1Encoding.DER);
|
||
|
} catch (IOException e) {
|
||
|
throw new CRLException(e.toString());
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // java.security.cert.X509CRLEntry
|
||
|
public final BigInteger getSerialNumber() {
|
||
|
return new BigInteger(ASN1Integer.e(this.d.e.d(0)).b);
|
||
|
}
|
||
|
|
||
|
@Override // java.security.cert.X509CRLEntry
|
||
|
public final Date getRevocationDate() {
|
||
|
return C15439gqh.e(this.d.e.d(1)).c();
|
||
|
}
|
||
|
|
||
|
@Override // java.security.cert.X509CRLEntry
|
||
|
public final boolean hasExtensions() {
|
||
|
return this.d.a() != null;
|
||
|
}
|
||
|
|
||
|
@Override // java.security.cert.X509CRLEntry
|
||
|
public final String toString() {
|
||
|
StringBuffer stringBuffer = new StringBuffer(" userCertificate: ");
|
||
|
String b = grR.b();
|
||
|
stringBuffer.append(getSerialNumber()).append(b);
|
||
|
stringBuffer.append(" revocationDate: ").append(getRevocationDate()).append(b);
|
||
|
stringBuffer.append(" certificateIssuer: ").append(getCertificateIssuer()).append(b);
|
||
|
C15391gpH a = this.d.a();
|
||
|
if (a != null) {
|
||
|
Enumeration elements = a.a.elements();
|
||
|
if (elements.hasMoreElements()) {
|
||
|
stringBuffer.append(" crlEntryExtensions:").append(b);
|
||
|
while (elements.hasMoreElements()) {
|
||
|
C15314gnC c15314gnC = (C15314gnC) elements.nextElement();
|
||
|
C15394gpK c15394gpK = (C15394gpK) a.d.get(c15314gnC);
|
||
|
if (c15394gpK.v != null) {
|
||
|
C15348gnx c15348gnx = new C15348gnx(c15394gpK.v.b());
|
||
|
stringBuffer.append(" critical(").append(c15394gpK.p).append(") ");
|
||
|
try {
|
||
|
if (c15314gnC.equals(C15394gpK.r)) {
|
||
|
stringBuffer.append(gpF.d(C15350gnz.a(c15348gnx.b()))).append(b);
|
||
|
} else if (c15314gnC.equals(C15394gpK.a)) {
|
||
|
StringBuffer append = stringBuffer.append("Certificate issuer: ");
|
||
|
AbstractC15315gnE b2 = c15348gnx.b();
|
||
|
append.append(b2 != null ? new gpP(AbstractC15317gnH.a(b2)) : null).append(b);
|
||
|
} else {
|
||
|
stringBuffer.append(c15314gnC.d);
|
||
|
stringBuffer.append(" value = ").append(C15408gpk.d(c15348gnx.b())).append(b);
|
||
|
}
|
||
|
} catch (Exception unused) {
|
||
|
stringBuffer.append(c15314gnC.d);
|
||
|
stringBuffer.append(" value = *****").append(b);
|
||
|
}
|
||
|
} else {
|
||
|
stringBuffer.append(b);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return stringBuffer.toString();
|
||
|
}
|
||
|
}
|