402 lines
16 KiB
Java
402 lines
16 KiB
Java
|
package o;
|
||
|
|
||
|
import com.google.common.primitives.UnsignedBytes;
|
||
|
import com.huawei.hms.support.feature.result.CommonConstant;
|
||
|
import com.kofax.mobile.sdk._internal.impl.extraction.kta.KtaJsonExactionHelper;
|
||
|
import java.io.IOException;
|
||
|
import java.util.Enumeration;
|
||
|
import java.util.Hashtable;
|
||
|
import java.util.Vector;
|
||
|
import org.bouncycastle.asn1.ASN1Encoding;
|
||
|
|
||
|
/* renamed from: o.gqo, reason: case insensitive filesystem */
|
||
|
/* loaded from: classes6.dex */
|
||
|
public class C15446gqo extends AbstractC15346gnv {
|
||
|
private static final Boolean b;
|
||
|
private static Hashtable c;
|
||
|
private static final Boolean d;
|
||
|
private boolean h;
|
||
|
private AbstractC15317gnH i;
|
||
|
private int j;
|
||
|
private AbstractC15441gqj a = null;
|
||
|
private Vector f = new Vector();
|
||
|
private Vector g = new Vector();
|
||
|
private Vector e = new Vector();
|
||
|
|
||
|
static {
|
||
|
C15314gnC c15314gnC = new C15314gnC("2.5.4.6");
|
||
|
C15314gnC c15314gnC2 = new C15314gnC("2.5.4.10");
|
||
|
C15314gnC c15314gnC3 = new C15314gnC("2.5.4.11");
|
||
|
C15314gnC c15314gnC4 = new C15314gnC("2.5.4.12");
|
||
|
C15314gnC c15314gnC5 = new C15314gnC("2.5.4.3");
|
||
|
C15314gnC c15314gnC6 = new C15314gnC("2.5.4.5");
|
||
|
C15314gnC c15314gnC7 = new C15314gnC("2.5.4.9");
|
||
|
C15314gnC c15314gnC8 = new C15314gnC("2.5.4.7");
|
||
|
C15314gnC c15314gnC9 = new C15314gnC("2.5.4.8");
|
||
|
C15314gnC c15314gnC10 = new C15314gnC("2.5.4.4");
|
||
|
C15314gnC c15314gnC11 = new C15314gnC("2.5.4.42");
|
||
|
C15314gnC c15314gnC12 = new C15314gnC("2.5.4.43");
|
||
|
C15314gnC c15314gnC13 = new C15314gnC("2.5.4.44");
|
||
|
C15314gnC c15314gnC14 = new C15314gnC("2.5.4.45");
|
||
|
C15314gnC c15314gnC15 = new C15314gnC("2.5.4.15");
|
||
|
C15314gnC c15314gnC16 = new C15314gnC("2.5.4.17");
|
||
|
C15314gnC c15314gnC17 = new C15314gnC("2.5.4.46");
|
||
|
C15314gnC c15314gnC18 = new C15314gnC("2.5.4.65");
|
||
|
C15314gnC c15314gnC19 = new C15314gnC("1.3.6.1.5.5.7.9.1");
|
||
|
C15314gnC c15314gnC20 = new C15314gnC("1.3.6.1.5.5.7.9.2");
|
||
|
C15314gnC c15314gnC21 = new C15314gnC("1.3.6.1.5.5.7.9.3");
|
||
|
C15314gnC c15314gnC22 = new C15314gnC("1.3.6.1.5.5.7.9.4");
|
||
|
C15314gnC c15314gnC23 = new C15314gnC("1.3.6.1.5.5.7.9.5");
|
||
|
C15314gnC c15314gnC24 = new C15314gnC("1.3.36.8.3.14");
|
||
|
C15314gnC c15314gnC25 = new C15314gnC("2.5.4.16");
|
||
|
new C15314gnC("2.5.4.54");
|
||
|
C15314gnC c15314gnC26 = InterfaceC15443gql.c;
|
||
|
C15314gnC c15314gnC27 = InterfaceC15443gql.d;
|
||
|
C15314gnC c15314gnC28 = InterfaceC15405gph.e;
|
||
|
C15314gnC c15314gnC29 = InterfaceC15405gph.h;
|
||
|
C15314gnC c15314gnC30 = InterfaceC15405gph.i;
|
||
|
C15314gnC c15314gnC31 = new C15314gnC("0.9.2342.19200300.100.1.25");
|
||
|
C15314gnC c15314gnC32 = new C15314gnC("0.9.2342.19200300.100.1.1");
|
||
|
Hashtable hashtable = new Hashtable();
|
||
|
c = hashtable;
|
||
|
Hashtable hashtable2 = new Hashtable();
|
||
|
Hashtable hashtable3 = new Hashtable();
|
||
|
Hashtable hashtable4 = new Hashtable();
|
||
|
b = Boolean.TRUE;
|
||
|
d = Boolean.FALSE;
|
||
|
hashtable.put(c15314gnC, "C");
|
||
|
hashtable.put(c15314gnC2, "O");
|
||
|
hashtable.put(c15314gnC4, "T");
|
||
|
hashtable.put(c15314gnC3, "OU");
|
||
|
hashtable.put(c15314gnC5, "CN");
|
||
|
hashtable.put(c15314gnC8, "L");
|
||
|
hashtable.put(c15314gnC9, "ST");
|
||
|
hashtable.put(c15314gnC6, "SERIALNUMBER");
|
||
|
hashtable.put(c15314gnC28, "E");
|
||
|
hashtable.put(c15314gnC31, "DC");
|
||
|
hashtable.put(c15314gnC32, "UID");
|
||
|
hashtable.put(c15314gnC7, "STREET");
|
||
|
hashtable.put(c15314gnC10, "SURNAME");
|
||
|
hashtable.put(c15314gnC11, "GIVENNAME");
|
||
|
hashtable.put(c15314gnC12, "INITIALS");
|
||
|
hashtable.put(c15314gnC13, "GENERATION");
|
||
|
hashtable.put(c15314gnC30, "unstructuredAddress");
|
||
|
hashtable.put(c15314gnC29, "unstructuredName");
|
||
|
hashtable.put(c15314gnC14, "UniqueIdentifier");
|
||
|
hashtable.put(c15314gnC17, "DN");
|
||
|
hashtable.put(c15314gnC18, "Pseudonym");
|
||
|
hashtable.put(c15314gnC25, "PostalAddress");
|
||
|
hashtable.put(c15314gnC24, "NameAtBirth");
|
||
|
hashtable.put(c15314gnC22, "CountryOfCitizenship");
|
||
|
hashtable.put(c15314gnC23, "CountryOfResidence");
|
||
|
hashtable.put(c15314gnC21, "Gender");
|
||
|
hashtable.put(c15314gnC20, "PlaceOfBirth");
|
||
|
hashtable.put(c15314gnC19, "DateOfBirth");
|
||
|
hashtable.put(c15314gnC16, "PostalCode");
|
||
|
hashtable.put(c15314gnC15, "BusinessCategory");
|
||
|
hashtable.put(c15314gnC26, "TelephoneNumber");
|
||
|
hashtable.put(c15314gnC27, KtaJsonExactionHelper.NAME);
|
||
|
hashtable2.put(c15314gnC, "C");
|
||
|
hashtable2.put(c15314gnC2, "O");
|
||
|
hashtable2.put(c15314gnC3, "OU");
|
||
|
hashtable2.put(c15314gnC5, "CN");
|
||
|
hashtable2.put(c15314gnC8, "L");
|
||
|
hashtable2.put(c15314gnC9, "ST");
|
||
|
hashtable2.put(c15314gnC7, "STREET");
|
||
|
hashtable2.put(c15314gnC31, "DC");
|
||
|
hashtable2.put(c15314gnC32, "UID");
|
||
|
hashtable3.put(c15314gnC, "C");
|
||
|
hashtable3.put(c15314gnC2, "O");
|
||
|
hashtable3.put(c15314gnC3, "OU");
|
||
|
hashtable3.put(c15314gnC5, "CN");
|
||
|
hashtable3.put(c15314gnC8, "L");
|
||
|
hashtable3.put(c15314gnC9, "ST");
|
||
|
hashtable3.put(c15314gnC7, "STREET");
|
||
|
hashtable4.put("c", c15314gnC);
|
||
|
hashtable4.put("o", c15314gnC2);
|
||
|
hashtable4.put("t", c15314gnC4);
|
||
|
hashtable4.put("ou", c15314gnC3);
|
||
|
hashtable4.put("cn", c15314gnC5);
|
||
|
hashtable4.put("l", c15314gnC8);
|
||
|
hashtable4.put("st", c15314gnC9);
|
||
|
hashtable4.put("sn", c15314gnC6);
|
||
|
hashtable4.put("serialnumber", c15314gnC6);
|
||
|
hashtable4.put("street", c15314gnC7);
|
||
|
hashtable4.put("emailaddress", c15314gnC28);
|
||
|
hashtable4.put("dc", c15314gnC31);
|
||
|
hashtable4.put("e", c15314gnC28);
|
||
|
hashtable4.put(CommonConstant.KEY_UID, c15314gnC32);
|
||
|
hashtable4.put("surname", c15314gnC10);
|
||
|
hashtable4.put("givenname", c15314gnC11);
|
||
|
hashtable4.put("initials", c15314gnC12);
|
||
|
hashtable4.put("generation", c15314gnC13);
|
||
|
hashtable4.put("unstructuredaddress", c15314gnC30);
|
||
|
hashtable4.put("unstructuredname", c15314gnC29);
|
||
|
hashtable4.put("uniqueidentifier", c15314gnC14);
|
||
|
hashtable4.put("dn", c15314gnC17);
|
||
|
hashtable4.put("pseudonym", c15314gnC18);
|
||
|
hashtable4.put("postaladdress", c15314gnC25);
|
||
|
hashtable4.put("nameofbirth", c15314gnC24);
|
||
|
hashtable4.put("countryofcitizenship", c15314gnC22);
|
||
|
hashtable4.put("countryofresidence", c15314gnC23);
|
||
|
hashtable4.put(CommonConstant.KEY_GENDER, c15314gnC21);
|
||
|
hashtable4.put("placeofbirth", c15314gnC20);
|
||
|
hashtable4.put("dateofbirth", c15314gnC19);
|
||
|
hashtable4.put("postalcode", c15314gnC16);
|
||
|
hashtable4.put("businesscategory", c15314gnC15);
|
||
|
hashtable4.put("telephonenumber", c15314gnC26);
|
||
|
hashtable4.put("name", c15314gnC27);
|
||
|
}
|
||
|
|
||
|
public static C15446gqo d(Object obj) {
|
||
|
if (obj == null || (obj instanceof C15446gqo)) {
|
||
|
return (C15446gqo) obj;
|
||
|
}
|
||
|
if (obj instanceof C15417gpt) {
|
||
|
return new C15446gqo(AbstractC15317gnH.a(((C15417gpt) obj).i()));
|
||
|
}
|
||
|
if (obj != null) {
|
||
|
return new C15446gqo(AbstractC15317gnH.a(obj));
|
||
|
}
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
protected C15446gqo() {
|
||
|
}
|
||
|
|
||
|
public C15446gqo(AbstractC15317gnH abstractC15317gnH) {
|
||
|
this.i = abstractC15317gnH;
|
||
|
Enumeration b2 = abstractC15317gnH.b();
|
||
|
while (b2.hasMoreElements()) {
|
||
|
AbstractC15318gnI c2 = AbstractC15318gnI.c((Object) ((InterfaceC15342gnr) b2.nextElement()).i());
|
||
|
int i = 0;
|
||
|
while (i < c2.d.size()) {
|
||
|
AbstractC15317gnH a = AbstractC15317gnH.a(((InterfaceC15342gnr) c2.d.elementAt(i)).i());
|
||
|
if (a.e() != 2) {
|
||
|
throw new IllegalArgumentException("badly sized pair");
|
||
|
}
|
||
|
this.f.addElement(C15314gnC.d(a.d(0)));
|
||
|
InterfaceC15342gnr d2 = a.d(1);
|
||
|
if ((d2 instanceof InterfaceC15322gnQ) && !(d2 instanceof goH)) {
|
||
|
String j = ((InterfaceC15322gnQ) d2).j();
|
||
|
if (j.length() > 0 && j.charAt(0) == '#') {
|
||
|
this.g.addElement("\\".concat(String.valueOf(j)));
|
||
|
} else {
|
||
|
this.g.addElement(j);
|
||
|
}
|
||
|
} else {
|
||
|
try {
|
||
|
Vector vector = this.g;
|
||
|
StringBuilder sb = new StringBuilder();
|
||
|
sb.append("#");
|
||
|
byte[] c3 = grS.c(d2.i().c(ASN1Encoding.DER));
|
||
|
int length = c3.length;
|
||
|
char[] cArr = new char[length];
|
||
|
for (int i2 = 0; i2 != length; i2++) {
|
||
|
cArr[i2] = (char) (c3[i2] & UnsignedBytes.MAX_VALUE);
|
||
|
}
|
||
|
sb.append(new String(cArr));
|
||
|
vector.addElement(sb.toString());
|
||
|
} catch (IOException unused) {
|
||
|
throw new IllegalArgumentException("cannot encode value");
|
||
|
}
|
||
|
}
|
||
|
this.e.addElement(i != 0 ? b : d);
|
||
|
i++;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // o.AbstractC15346gnv, o.InterfaceC15342gnr
|
||
|
public final AbstractC15315gnE i() {
|
||
|
if (this.i == null) {
|
||
|
C15343gns c15343gns = new C15343gns();
|
||
|
C15343gns c15343gns2 = new C15343gns();
|
||
|
if (this.f.size() != 0) {
|
||
|
C15343gns c15343gns3 = new C15343gns();
|
||
|
c15343gns3.a.addElement((C15314gnC) this.f.elementAt(0));
|
||
|
throw null;
|
||
|
}
|
||
|
c15343gns.a.addElement(new C15384gox(c15343gns2));
|
||
|
this.i = new C15385goy(c15343gns);
|
||
|
}
|
||
|
return this.i;
|
||
|
}
|
||
|
|
||
|
@Override // o.AbstractC15346gnv
|
||
|
public int hashCode() {
|
||
|
if (this.h) {
|
||
|
return this.j;
|
||
|
}
|
||
|
this.h = true;
|
||
|
for (int i = 0; i != this.f.size(); i++) {
|
||
|
String b2 = b(a((String) this.g.elementAt(i)));
|
||
|
int hashCode = this.j ^ this.f.elementAt(i).hashCode();
|
||
|
this.j = hashCode;
|
||
|
this.j = b2.hashCode() ^ hashCode;
|
||
|
}
|
||
|
return this.j;
|
||
|
}
|
||
|
|
||
|
@Override // o.AbstractC15346gnv
|
||
|
public boolean equals(Object obj) {
|
||
|
int i;
|
||
|
int i2;
|
||
|
int i3;
|
||
|
if (obj == this) {
|
||
|
return true;
|
||
|
}
|
||
|
if (!(obj instanceof C15446gqo) && !(obj instanceof AbstractC15317gnH)) {
|
||
|
return false;
|
||
|
}
|
||
|
if (i().equals(((InterfaceC15342gnr) obj).i())) {
|
||
|
return true;
|
||
|
}
|
||
|
try {
|
||
|
C15446gqo d2 = d(obj);
|
||
|
int size = this.f.size();
|
||
|
if (size != d2.f.size()) {
|
||
|
return false;
|
||
|
}
|
||
|
boolean[] zArr = new boolean[size];
|
||
|
if (this.f.elementAt(0).equals(d2.f.elementAt(0))) {
|
||
|
i3 = 1;
|
||
|
i2 = size;
|
||
|
i = 0;
|
||
|
} else {
|
||
|
i = size - 1;
|
||
|
i2 = -1;
|
||
|
i3 = -1;
|
||
|
}
|
||
|
while (i != i2) {
|
||
|
C15314gnC c15314gnC = (C15314gnC) this.f.elementAt(i);
|
||
|
String str = (String) this.g.elementAt(i);
|
||
|
for (int i4 = 0; i4 < size; i4++) {
|
||
|
if (!zArr[i4] && c15314gnC.equals((C15314gnC) d2.f.elementAt(i4))) {
|
||
|
String str2 = (String) d2.g.elementAt(i4);
|
||
|
String a = a(str);
|
||
|
String a2 = a(str2);
|
||
|
if (a.equals(a2) || b(a).equals(b(a2))) {
|
||
|
zArr[i4] = true;
|
||
|
i += i3;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return false;
|
||
|
}
|
||
|
return true;
|
||
|
} catch (IllegalArgumentException unused) {
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
private static String a(String str) {
|
||
|
String c2 = grR.c(str.trim());
|
||
|
if (c2.length() <= 0 || c2.charAt(0) != '#') {
|
||
|
return c2;
|
||
|
}
|
||
|
Object d2 = d(c2);
|
||
|
return d2 instanceof InterfaceC15322gnQ ? grR.c(((InterfaceC15322gnQ) d2).j().trim()) : c2;
|
||
|
}
|
||
|
|
||
|
private static AbstractC15315gnE d(String str) {
|
||
|
try {
|
||
|
return AbstractC15315gnE.b(grS.b(str.substring(1)));
|
||
|
} catch (IOException e) {
|
||
|
throw new IllegalStateException("unknown encoding in name: ".concat(String.valueOf(e)));
|
||
|
}
|
||
|
}
|
||
|
|
||
|
private static String b(String str) {
|
||
|
StringBuffer stringBuffer = new StringBuffer();
|
||
|
if (str.length() != 0) {
|
||
|
char charAt = str.charAt(0);
|
||
|
stringBuffer.append(charAt);
|
||
|
int i = 1;
|
||
|
while (i < str.length()) {
|
||
|
char charAt2 = str.charAt(i);
|
||
|
if (charAt != ' ' || charAt2 != ' ') {
|
||
|
stringBuffer.append(charAt2);
|
||
|
}
|
||
|
i++;
|
||
|
charAt = charAt2;
|
||
|
}
|
||
|
}
|
||
|
return stringBuffer.toString();
|
||
|
}
|
||
|
|
||
|
private static void e(StringBuffer stringBuffer, Hashtable hashtable, C15314gnC c15314gnC, String str) {
|
||
|
String str2 = (String) hashtable.get(c15314gnC);
|
||
|
if (str2 != null) {
|
||
|
stringBuffer.append(str2);
|
||
|
} else {
|
||
|
stringBuffer.append(c15314gnC.d);
|
||
|
}
|
||
|
stringBuffer.append('=');
|
||
|
int length = stringBuffer.length();
|
||
|
stringBuffer.append(str);
|
||
|
int length2 = stringBuffer.length();
|
||
|
if (str.length() >= 2 && str.charAt(0) == '\\' && str.charAt(1) == '#') {
|
||
|
length += 2;
|
||
|
}
|
||
|
while (length < length2 && stringBuffer.charAt(length) == ' ') {
|
||
|
stringBuffer.insert(length, "\\");
|
||
|
length += 2;
|
||
|
length2++;
|
||
|
}
|
||
|
while (true) {
|
||
|
length2--;
|
||
|
if (length2 <= length || stringBuffer.charAt(length2) != ' ') {
|
||
|
break;
|
||
|
} else {
|
||
|
stringBuffer.insert(length2, '\\');
|
||
|
}
|
||
|
}
|
||
|
while (length <= length2) {
|
||
|
char charAt = stringBuffer.charAt(length);
|
||
|
if (charAt != '\"' && charAt != '\\' && charAt != '+' && charAt != ',') {
|
||
|
switch (charAt) {
|
||
|
case ';':
|
||
|
case '<':
|
||
|
case '=':
|
||
|
case '>':
|
||
|
break;
|
||
|
default:
|
||
|
length++;
|
||
|
continue;
|
||
|
}
|
||
|
}
|
||
|
stringBuffer.insert(length, "\\");
|
||
|
length += 2;
|
||
|
length2++;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public String toString() {
|
||
|
Hashtable hashtable = c;
|
||
|
StringBuffer stringBuffer = new StringBuffer();
|
||
|
Vector vector = new Vector();
|
||
|
StringBuffer stringBuffer2 = null;
|
||
|
for (int i = 0; i < this.f.size(); i++) {
|
||
|
if (((Boolean) this.e.elementAt(i)).booleanValue()) {
|
||
|
stringBuffer2.append('+');
|
||
|
e(stringBuffer2, hashtable, (C15314gnC) this.f.elementAt(i), (String) this.g.elementAt(i));
|
||
|
} else {
|
||
|
stringBuffer2 = new StringBuffer();
|
||
|
e(stringBuffer2, hashtable, (C15314gnC) this.f.elementAt(i), (String) this.g.elementAt(i));
|
||
|
vector.addElement(stringBuffer2);
|
||
|
}
|
||
|
}
|
||
|
boolean z = true;
|
||
|
for (int i2 = 0; i2 < vector.size(); i2++) {
|
||
|
if (z) {
|
||
|
z = false;
|
||
|
} else {
|
||
|
stringBuffer.append(',');
|
||
|
}
|
||
|
stringBuffer.append(vector.elementAt(i2).toString());
|
||
|
}
|
||
|
return stringBuffer.toString();
|
||
|
}
|
||
|
}
|