55 lines
1.9 KiB
Java
55 lines
1.9 KiB
Java
package org.bouncycastle.asn1.esf;
|
|
|
|
import java.util.Enumeration;
|
|
import org.bouncycastle.asn1.ASN1Object;
|
|
import org.bouncycastle.asn1.ASN1Primitive;
|
|
import org.bouncycastle.asn1.ASN1Sequence;
|
|
import org.bouncycastle.asn1.DERSequence;
|
|
|
|
/* loaded from: classes6.dex */
|
|
public class OcspListID extends ASN1Object {
|
|
private ASN1Sequence ocspResponses;
|
|
|
|
@Override // org.bouncycastle.asn1.ASN1Object, org.bouncycastle.asn1.ASN1Encodable
|
|
public ASN1Primitive toASN1Primitive() {
|
|
return new DERSequence(this.ocspResponses);
|
|
}
|
|
|
|
public OcspResponsesID[] getOcspResponses() {
|
|
int size = this.ocspResponses.size();
|
|
OcspResponsesID[] ocspResponsesIDArr = new OcspResponsesID[size];
|
|
for (int i = 0; i < size; i++) {
|
|
ocspResponsesIDArr[i] = OcspResponsesID.getInstance(this.ocspResponses.getObjectAt(i));
|
|
}
|
|
return ocspResponsesIDArr;
|
|
}
|
|
|
|
public static OcspListID getInstance(Object obj) {
|
|
if (obj instanceof OcspListID) {
|
|
return (OcspListID) obj;
|
|
}
|
|
if (obj != null) {
|
|
return new OcspListID(ASN1Sequence.getInstance(obj));
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public OcspListID(OcspResponsesID[] ocspResponsesIDArr) {
|
|
this.ocspResponses = new DERSequence(ocspResponsesIDArr);
|
|
}
|
|
|
|
private OcspListID(ASN1Sequence aSN1Sequence) {
|
|
if (aSN1Sequence.size() != 1) {
|
|
StringBuilder sb = new StringBuilder("Bad sequence size: ");
|
|
sb.append(aSN1Sequence.size());
|
|
throw new IllegalArgumentException(sb.toString());
|
|
}
|
|
ASN1Sequence aSN1Sequence2 = (ASN1Sequence) aSN1Sequence.getObjectAt(0);
|
|
this.ocspResponses = aSN1Sequence2;
|
|
Enumeration objects = aSN1Sequence2.getObjects();
|
|
while (objects.hasMoreElements()) {
|
|
OcspResponsesID.getInstance(objects.nextElement());
|
|
}
|
|
}
|
|
}
|