what-the-bank/sources/org/bouncycastle/asn1/ocsp/ResponseBytes.java

57 lines
1.9 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package org.bouncycastle.asn1.ocsp;
import org.bouncycastle.asn1.ASN1EncodableVector;
import org.bouncycastle.asn1.ASN1Object;
import org.bouncycastle.asn1.ASN1ObjectIdentifier;
import org.bouncycastle.asn1.ASN1OctetString;
import org.bouncycastle.asn1.ASN1Primitive;
import org.bouncycastle.asn1.ASN1Sequence;
import org.bouncycastle.asn1.ASN1TaggedObject;
import org.bouncycastle.asn1.DERSequence;
/* loaded from: classes6.dex */
public class ResponseBytes extends ASN1Object {
ASN1OctetString response;
ASN1ObjectIdentifier responseType;
@Override // org.bouncycastle.asn1.ASN1Object, org.bouncycastle.asn1.ASN1Encodable
public ASN1Primitive toASN1Primitive() {
ASN1EncodableVector aSN1EncodableVector = new ASN1EncodableVector();
aSN1EncodableVector.add(this.responseType);
aSN1EncodableVector.add(this.response);
return new DERSequence(aSN1EncodableVector);
}
public ASN1ObjectIdentifier getResponseType() {
return this.responseType;
}
public ASN1OctetString getResponse() {
return this.response;
}
public static ResponseBytes getInstance(ASN1TaggedObject aSN1TaggedObject, boolean z) {
return getInstance(ASN1Sequence.getInstance(aSN1TaggedObject, z));
}
public static ResponseBytes getInstance(Object obj) {
if (obj instanceof ResponseBytes) {
return (ResponseBytes) obj;
}
if (obj != null) {
return new ResponseBytes(ASN1Sequence.getInstance(obj));
}
return null;
}
public ResponseBytes(ASN1Sequence aSN1Sequence) {
this.responseType = (ASN1ObjectIdentifier) aSN1Sequence.getObjectAt(0);
this.response = (ASN1OctetString) aSN1Sequence.getObjectAt(1);
}
public ResponseBytes(ASN1ObjectIdentifier aSN1ObjectIdentifier, ASN1OctetString aSN1OctetString) {
this.responseType = aSN1ObjectIdentifier;
this.response = aSN1OctetString;
}
}