178 lines
6.8 KiB
Java
178 lines
6.8 KiB
Java
|
package org.bouncycastle.asn1.x509;
|
||
|
|
||
|
import java.util.Enumeration;
|
||
|
import java.util.Vector;
|
||
|
import org.bouncycastle.asn1.ASN1Encodable;
|
||
|
import org.bouncycastle.asn1.ASN1EncodableVector;
|
||
|
import org.bouncycastle.asn1.ASN1Object;
|
||
|
import org.bouncycastle.asn1.ASN1ObjectIdentifier;
|
||
|
import org.bouncycastle.asn1.ASN1OctetString;
|
||
|
import org.bouncycastle.asn1.ASN1Primitive;
|
||
|
import org.bouncycastle.asn1.ASN1Sequence;
|
||
|
import org.bouncycastle.asn1.DERSequence;
|
||
|
import org.bouncycastle.asn1.DERTaggedObject;
|
||
|
import org.bouncycastle.asn1.DERUTF8String;
|
||
|
|
||
|
/* loaded from: classes6.dex */
|
||
|
public class IetfAttrSyntax extends ASN1Object {
|
||
|
public static final int VALUE_OCTETS = 1;
|
||
|
public static final int VALUE_OID = 2;
|
||
|
public static final int VALUE_UTF8 = 3;
|
||
|
GeneralNames policyAuthority;
|
||
|
int valueChoice;
|
||
|
Vector values = new Vector();
|
||
|
|
||
|
@Override // org.bouncycastle.asn1.ASN1Object, org.bouncycastle.asn1.ASN1Encodable
|
||
|
public ASN1Primitive toASN1Primitive() {
|
||
|
ASN1EncodableVector aSN1EncodableVector = new ASN1EncodableVector();
|
||
|
if (this.policyAuthority != null) {
|
||
|
aSN1EncodableVector.add(new DERTaggedObject(0, this.policyAuthority));
|
||
|
}
|
||
|
ASN1EncodableVector aSN1EncodableVector2 = new ASN1EncodableVector();
|
||
|
Enumeration elements = this.values.elements();
|
||
|
while (elements.hasMoreElements()) {
|
||
|
aSN1EncodableVector2.add((ASN1Encodable) elements.nextElement());
|
||
|
}
|
||
|
aSN1EncodableVector.add(new DERSequence(aSN1EncodableVector2));
|
||
|
return new DERSequence(aSN1EncodableVector);
|
||
|
}
|
||
|
|
||
|
public Object[] getValues() {
|
||
|
int i = 0;
|
||
|
if (getValueType() == 1) {
|
||
|
int size = this.values.size();
|
||
|
ASN1OctetString[] aSN1OctetStringArr = new ASN1OctetString[size];
|
||
|
while (i != size) {
|
||
|
aSN1OctetStringArr[i] = (ASN1OctetString) this.values.elementAt(i);
|
||
|
i++;
|
||
|
}
|
||
|
return aSN1OctetStringArr;
|
||
|
}
|
||
|
if (getValueType() == 2) {
|
||
|
int size2 = this.values.size();
|
||
|
ASN1ObjectIdentifier[] aSN1ObjectIdentifierArr = new ASN1ObjectIdentifier[size2];
|
||
|
while (i != size2) {
|
||
|
aSN1ObjectIdentifierArr[i] = (ASN1ObjectIdentifier) this.values.elementAt(i);
|
||
|
i++;
|
||
|
}
|
||
|
return aSN1ObjectIdentifierArr;
|
||
|
}
|
||
|
int size3 = this.values.size();
|
||
|
DERUTF8String[] dERUTF8StringArr = new DERUTF8String[size3];
|
||
|
while (i != size3) {
|
||
|
dERUTF8StringArr[i] = (DERUTF8String) this.values.elementAt(i);
|
||
|
i++;
|
||
|
}
|
||
|
return dERUTF8StringArr;
|
||
|
}
|
||
|
|
||
|
public int getValueType() {
|
||
|
return this.valueChoice;
|
||
|
}
|
||
|
|
||
|
public GeneralNames getPolicyAuthority() {
|
||
|
return this.policyAuthority;
|
||
|
}
|
||
|
|
||
|
public static IetfAttrSyntax getInstance(Object obj) {
|
||
|
if (obj instanceof IetfAttrSyntax) {
|
||
|
return (IetfAttrSyntax) obj;
|
||
|
}
|
||
|
if (obj != null) {
|
||
|
return new IetfAttrSyntax(ASN1Sequence.getInstance(obj));
|
||
|
}
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
/* JADX WARN: Removed duplicated region for block: B:34:0x0087 */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:7:0x003f */
|
||
|
/*
|
||
|
Code decompiled incorrectly, please refer to instructions dump.
|
||
|
To view partially-correct add '--show-bad-code' argument
|
||
|
*/
|
||
|
private IetfAttrSyntax(org.bouncycastle.asn1.ASN1Sequence r6) {
|
||
|
/*
|
||
|
r5 = this;
|
||
|
r5.<init>()
|
||
|
r0 = 0
|
||
|
r5.policyAuthority = r0
|
||
|
java.util.Vector r0 = new java.util.Vector
|
||
|
r0.<init>()
|
||
|
r5.values = r0
|
||
|
r0 = -1
|
||
|
r5.valueChoice = r0
|
||
|
r0 = 0
|
||
|
org.bouncycastle.asn1.ASN1Encodable r1 = r6.getObjectAt(r0)
|
||
|
boolean r1 = r1 instanceof org.bouncycastle.asn1.ASN1TaggedObject
|
||
|
r2 = 1
|
||
|
r3 = 2
|
||
|
if (r1 == 0) goto L26
|
||
|
org.bouncycastle.asn1.ASN1Encodable r1 = r6.getObjectAt(r0)
|
||
|
org.bouncycastle.asn1.ASN1TaggedObject r1 = (org.bouncycastle.asn1.ASN1TaggedObject) r1
|
||
|
org.bouncycastle.asn1.x509.GeneralNames r0 = org.bouncycastle.asn1.x509.GeneralNames.getInstance(r1, r0)
|
||
|
goto L34
|
||
|
L26:
|
||
|
int r1 = r6.size()
|
||
|
if (r1 != r3) goto L37
|
||
|
org.bouncycastle.asn1.ASN1Encodable r0 = r6.getObjectAt(r0)
|
||
|
org.bouncycastle.asn1.x509.GeneralNames r0 = org.bouncycastle.asn1.x509.GeneralNames.getInstance(r0)
|
||
|
L34:
|
||
|
r5.policyAuthority = r0
|
||
|
r0 = r2
|
||
|
L37:
|
||
|
org.bouncycastle.asn1.ASN1Encodable r1 = r6.getObjectAt(r0)
|
||
|
boolean r1 = r1 instanceof org.bouncycastle.asn1.ASN1Sequence
|
||
|
if (r1 == 0) goto L87
|
||
|
org.bouncycastle.asn1.ASN1Encodable r6 = r6.getObjectAt(r0)
|
||
|
org.bouncycastle.asn1.ASN1Sequence r6 = (org.bouncycastle.asn1.ASN1Sequence) r6
|
||
|
java.util.Enumeration r6 = r6.getObjects()
|
||
|
L49:
|
||
|
boolean r0 = r6.hasMoreElements()
|
||
|
if (r0 == 0) goto L86
|
||
|
java.lang.Object r0 = r6.nextElement()
|
||
|
org.bouncycastle.asn1.ASN1Primitive r0 = (org.bouncycastle.asn1.ASN1Primitive) r0
|
||
|
boolean r1 = r0 instanceof org.bouncycastle.asn1.ASN1ObjectIdentifier
|
||
|
if (r1 == 0) goto L5b
|
||
|
r1 = r3
|
||
|
goto L66
|
||
|
L5b:
|
||
|
boolean r1 = r0 instanceof org.bouncycastle.asn1.DERUTF8String
|
||
|
if (r1 == 0) goto L61
|
||
|
r1 = 3
|
||
|
goto L66
|
||
|
L61:
|
||
|
boolean r1 = r0 instanceof org.bouncycastle.asn1.DEROctetString
|
||
|
if (r1 == 0) goto L7e
|
||
|
r1 = r2
|
||
|
L66:
|
||
|
int r4 = r5.valueChoice
|
||
|
if (r4 >= 0) goto L6c
|
||
|
r5.valueChoice = r1
|
||
|
L6c:
|
||
|
int r4 = r5.valueChoice
|
||
|
if (r1 != r4) goto L76
|
||
|
java.util.Vector r1 = r5.values
|
||
|
r1.addElement(r0)
|
||
|
goto L49
|
||
|
L76:
|
||
|
java.lang.IllegalArgumentException r6 = new java.lang.IllegalArgumentException
|
||
|
java.lang.String r0 = "Mix of value types in IetfAttrSyntax"
|
||
|
r6.<init>(r0)
|
||
|
throw r6
|
||
|
L7e:
|
||
|
java.lang.IllegalArgumentException r6 = new java.lang.IllegalArgumentException
|
||
|
java.lang.String r0 = "Bad value type encoding IetfAttrSyntax"
|
||
|
r6.<init>(r0)
|
||
|
throw r6
|
||
|
L86:
|
||
|
return
|
||
|
L87:
|
||
|
java.lang.IllegalArgumentException r6 = new java.lang.IllegalArgumentException
|
||
|
java.lang.String r0 = "Non-IetfAttrSyntax encoding"
|
||
|
r6.<init>(r0)
|
||
|
throw r6
|
||
|
*/
|
||
|
throw new UnsupportedOperationException("Method not decompiled: org.bouncycastle.asn1.x509.IetfAttrSyntax.<init>(org.bouncycastle.asn1.ASN1Sequence):void");
|
||
|
}
|
||
|
}
|