what-the-bank/sources/org/bouncycastle/asn1/x509/CRLDistPoint.java

68 lines
2.4 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package org.bouncycastle.asn1.x509;
import org.bouncycastle.asn1.ASN1EncodableVector;
import org.bouncycastle.asn1.ASN1Object;
import org.bouncycastle.asn1.ASN1Primitive;
import org.bouncycastle.asn1.ASN1Sequence;
import org.bouncycastle.asn1.ASN1TaggedObject;
import org.bouncycastle.asn1.DERSequence;
import org.bouncycastle.util.Strings;
/* loaded from: classes6.dex */
public class CRLDistPoint extends ASN1Object {
ASN1Sequence seq;
public String toString() {
StringBuffer stringBuffer = new StringBuffer("CRLDistPoint:");
String lineSeparator = Strings.lineSeparator();
stringBuffer.append(lineSeparator);
DistributionPoint[] distributionPoints = getDistributionPoints();
for (int i = 0; i != distributionPoints.length; i++) {
stringBuffer.append(" ");
stringBuffer.append(distributionPoints[i]);
stringBuffer.append(lineSeparator);
}
return stringBuffer.toString();
}
@Override // org.bouncycastle.asn1.ASN1Object, org.bouncycastle.asn1.ASN1Encodable
public ASN1Primitive toASN1Primitive() {
return this.seq;
}
public DistributionPoint[] getDistributionPoints() {
DistributionPoint[] distributionPointArr = new DistributionPoint[this.seq.size()];
for (int i = 0; i != this.seq.size(); i++) {
distributionPointArr[i] = DistributionPoint.getInstance(this.seq.getObjectAt(i));
}
return distributionPointArr;
}
public static CRLDistPoint getInstance(ASN1TaggedObject aSN1TaggedObject, boolean z) {
return getInstance(ASN1Sequence.getInstance(aSN1TaggedObject, z));
}
public static CRLDistPoint getInstance(Object obj) {
if (obj instanceof CRLDistPoint) {
return (CRLDistPoint) obj;
}
if (obj != null) {
return new CRLDistPoint(ASN1Sequence.getInstance(obj));
}
return null;
}
public CRLDistPoint(DistributionPoint[] distributionPointArr) {
this.seq = null;
ASN1EncodableVector aSN1EncodableVector = new ASN1EncodableVector();
for (int i = 0; i != distributionPointArr.length; i++) {
aSN1EncodableVector.add(distributionPointArr[i]);
}
this.seq = new DERSequence(aSN1EncodableVector);
}
private CRLDistPoint(ASN1Sequence aSN1Sequence) {
this.seq = aSN1Sequence;
}
}