package org.bouncycastle.asn1.tsp; import java.util.Enumeration; import org.bouncycastle.asn1.ASN1EncodableVector; import org.bouncycastle.asn1.ASN1Object; import org.bouncycastle.asn1.ASN1Primitive; import org.bouncycastle.asn1.ASN1Sequence; import org.bouncycastle.asn1.DERSequence; import org.bouncycastle.asn1.cmp.PKIStatusInfo; import org.bouncycastle.asn1.cms.ContentInfo; /* loaded from: classes6.dex */ public class TimeStampResp extends ASN1Object { PKIStatusInfo pkiStatusInfo; ContentInfo timeStampToken; @Override // org.bouncycastle.asn1.ASN1Object, org.bouncycastle.asn1.ASN1Encodable public ASN1Primitive toASN1Primitive() { ASN1EncodableVector aSN1EncodableVector = new ASN1EncodableVector(); aSN1EncodableVector.add(this.pkiStatusInfo); ContentInfo contentInfo = this.timeStampToken; if (contentInfo != null) { aSN1EncodableVector.add(contentInfo); } return new DERSequence(aSN1EncodableVector); } public ContentInfo getTimeStampToken() { return this.timeStampToken; } public PKIStatusInfo getStatus() { return this.pkiStatusInfo; } public static TimeStampResp getInstance(Object obj) { if (obj instanceof TimeStampResp) { return (TimeStampResp) obj; } if (obj != null) { return new TimeStampResp(ASN1Sequence.getInstance(obj)); } return null; } public TimeStampResp(PKIStatusInfo pKIStatusInfo, ContentInfo contentInfo) { this.pkiStatusInfo = pKIStatusInfo; this.timeStampToken = contentInfo; } private TimeStampResp(ASN1Sequence aSN1Sequence) { Enumeration objects = aSN1Sequence.getObjects(); this.pkiStatusInfo = PKIStatusInfo.getInstance(objects.nextElement()); if (objects.hasMoreElements()) { this.timeStampToken = ContentInfo.getInstance(objects.nextElement()); } } }