72 lines
2.4 KiB
Java
72 lines
2.4 KiB
Java
|
package org.bouncycastle.asn1.cmp;
|
||
|
|
||
|
import java.math.BigInteger;
|
||
|
import org.bouncycastle.asn1.ASN1EncodableVector;
|
||
|
import org.bouncycastle.asn1.ASN1Integer;
|
||
|
import org.bouncycastle.asn1.ASN1Object;
|
||
|
import org.bouncycastle.asn1.ASN1OctetString;
|
||
|
import org.bouncycastle.asn1.ASN1Primitive;
|
||
|
import org.bouncycastle.asn1.ASN1Sequence;
|
||
|
import org.bouncycastle.asn1.DEROctetString;
|
||
|
import org.bouncycastle.asn1.DERSequence;
|
||
|
|
||
|
/* loaded from: classes6.dex */
|
||
|
public class CertStatus extends ASN1Object {
|
||
|
private ASN1OctetString certHash;
|
||
|
private ASN1Integer certReqId;
|
||
|
private PKIStatusInfo statusInfo;
|
||
|
|
||
|
@Override // org.bouncycastle.asn1.ASN1Object, org.bouncycastle.asn1.ASN1Encodable
|
||
|
public ASN1Primitive toASN1Primitive() {
|
||
|
ASN1EncodableVector aSN1EncodableVector = new ASN1EncodableVector();
|
||
|
aSN1EncodableVector.add(this.certHash);
|
||
|
aSN1EncodableVector.add(this.certReqId);
|
||
|
PKIStatusInfo pKIStatusInfo = this.statusInfo;
|
||
|
if (pKIStatusInfo != null) {
|
||
|
aSN1EncodableVector.add(pKIStatusInfo);
|
||
|
}
|
||
|
return new DERSequence(aSN1EncodableVector);
|
||
|
}
|
||
|
|
||
|
public PKIStatusInfo getStatusInfo() {
|
||
|
return this.statusInfo;
|
||
|
}
|
||
|
|
||
|
public ASN1Integer getCertReqId() {
|
||
|
return this.certReqId;
|
||
|
}
|
||
|
|
||
|
public ASN1OctetString getCertHash() {
|
||
|
return this.certHash;
|
||
|
}
|
||
|
|
||
|
public static CertStatus getInstance(Object obj) {
|
||
|
if (obj instanceof CertStatus) {
|
||
|
return (CertStatus) obj;
|
||
|
}
|
||
|
if (obj != null) {
|
||
|
return new CertStatus(ASN1Sequence.getInstance(obj));
|
||
|
}
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
public CertStatus(byte[] bArr, BigInteger bigInteger, PKIStatusInfo pKIStatusInfo) {
|
||
|
this.certHash = new DEROctetString(bArr);
|
||
|
this.certReqId = new ASN1Integer(bigInteger);
|
||
|
this.statusInfo = pKIStatusInfo;
|
||
|
}
|
||
|
|
||
|
public CertStatus(byte[] bArr, BigInteger bigInteger) {
|
||
|
this.certHash = new DEROctetString(bArr);
|
||
|
this.certReqId = new ASN1Integer(bigInteger);
|
||
|
}
|
||
|
|
||
|
private CertStatus(ASN1Sequence aSN1Sequence) {
|
||
|
this.certHash = ASN1OctetString.getInstance(aSN1Sequence.getObjectAt(0));
|
||
|
this.certReqId = ASN1Integer.getInstance(aSN1Sequence.getObjectAt(1));
|
||
|
if (aSN1Sequence.size() > 2) {
|
||
|
this.statusInfo = PKIStatusInfo.getInstance(aSN1Sequence.getObjectAt(2));
|
||
|
}
|
||
|
}
|
||
|
}
|