what-the-bank/sources/org/bouncycastle/asn1/cms/SCVPReqRes.java

67 lines
2.1 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package org.bouncycastle.asn1.cms;
import org.bouncycastle.asn1.ASN1Encodable;
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.asn1.DERTaggedObject;
/* loaded from: classes6.dex */
public class SCVPReqRes extends ASN1Object {
private final ContentInfo request;
private final ContentInfo response;
@Override // org.bouncycastle.asn1.ASN1Object, org.bouncycastle.asn1.ASN1Encodable
public ASN1Primitive toASN1Primitive() {
ASN1EncodableVector aSN1EncodableVector = new ASN1EncodableVector();
if (this.request != null) {
aSN1EncodableVector.add(new DERTaggedObject(true, 0, this.request));
}
aSN1EncodableVector.add(this.response);
return new DERSequence(aSN1EncodableVector);
}
public ContentInfo getResponse() {
return this.response;
}
public ContentInfo getRequest() {
return this.request;
}
public static SCVPReqRes getInstance(Object obj) {
if (obj instanceof SCVPReqRes) {
return (SCVPReqRes) obj;
}
if (obj != null) {
return new SCVPReqRes(ASN1Sequence.getInstance(obj));
}
return null;
}
public SCVPReqRes(ContentInfo contentInfo, ContentInfo contentInfo2) {
this.request = contentInfo;
this.response = contentInfo2;
}
public SCVPReqRes(ContentInfo contentInfo) {
this.request = null;
this.response = contentInfo;
}
private SCVPReqRes(ASN1Sequence aSN1Sequence) {
ASN1Encodable objectAt;
if (aSN1Sequence.getObjectAt(0) instanceof ASN1TaggedObject) {
this.request = ContentInfo.getInstance(ASN1TaggedObject.getInstance(aSN1Sequence.getObjectAt(0)), true);
objectAt = aSN1Sequence.getObjectAt(1);
} else {
this.request = null;
objectAt = aSN1Sequence.getObjectAt(0);
}
this.response = ContentInfo.getInstance(objectAt);
}
}