93 lines
3.1 KiB
Java
93 lines
3.1 KiB
Java
package org.bouncycastle.asn1.dvcs;
|
|
|
|
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.x509.GeneralName;
|
|
|
|
/* loaded from: classes6.dex */
|
|
public class DVCSRequest extends ASN1Object {
|
|
private Data data;
|
|
private DVCSRequestInformation requestInformation;
|
|
private GeneralName transactionIdentifier;
|
|
|
|
public String toString() {
|
|
String str;
|
|
StringBuilder sb = new StringBuilder("DVCSRequest {\nrequestInformation: ");
|
|
sb.append(this.requestInformation);
|
|
sb.append("\ndata: ");
|
|
sb.append(this.data);
|
|
sb.append("\n");
|
|
if (this.transactionIdentifier != null) {
|
|
StringBuilder sb2 = new StringBuilder("transactionIdentifier: ");
|
|
sb2.append(this.transactionIdentifier);
|
|
sb2.append("\n");
|
|
str = sb2.toString();
|
|
} else {
|
|
str = "";
|
|
}
|
|
sb.append(str);
|
|
sb.append("}\n");
|
|
return sb.toString();
|
|
}
|
|
|
|
@Override // org.bouncycastle.asn1.ASN1Object, org.bouncycastle.asn1.ASN1Encodable
|
|
public ASN1Primitive toASN1Primitive() {
|
|
ASN1EncodableVector aSN1EncodableVector = new ASN1EncodableVector();
|
|
aSN1EncodableVector.add(this.requestInformation);
|
|
aSN1EncodableVector.add(this.data);
|
|
GeneralName generalName = this.transactionIdentifier;
|
|
if (generalName != null) {
|
|
aSN1EncodableVector.add(generalName);
|
|
}
|
|
return new DERSequence(aSN1EncodableVector);
|
|
}
|
|
|
|
public GeneralName getTransactionIdentifier() {
|
|
return this.transactionIdentifier;
|
|
}
|
|
|
|
public DVCSRequestInformation getRequestInformation() {
|
|
return this.requestInformation;
|
|
}
|
|
|
|
public Data getData() {
|
|
return this.data;
|
|
}
|
|
|
|
public static DVCSRequest getInstance(ASN1TaggedObject aSN1TaggedObject, boolean z) {
|
|
return getInstance(ASN1Sequence.getInstance(aSN1TaggedObject, z));
|
|
}
|
|
|
|
public static DVCSRequest getInstance(Object obj) {
|
|
if (obj instanceof DVCSRequest) {
|
|
return (DVCSRequest) obj;
|
|
}
|
|
if (obj != null) {
|
|
return new DVCSRequest(ASN1Sequence.getInstance(obj));
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public DVCSRequest(DVCSRequestInformation dVCSRequestInformation, Data data, GeneralName generalName) {
|
|
this.requestInformation = dVCSRequestInformation;
|
|
this.data = data;
|
|
this.transactionIdentifier = generalName;
|
|
}
|
|
|
|
public DVCSRequest(DVCSRequestInformation dVCSRequestInformation, Data data) {
|
|
this(dVCSRequestInformation, data, null);
|
|
}
|
|
|
|
private DVCSRequest(ASN1Sequence aSN1Sequence) {
|
|
this.requestInformation = DVCSRequestInformation.getInstance(aSN1Sequence.getObjectAt(0));
|
|
this.data = Data.getInstance(aSN1Sequence.getObjectAt(1));
|
|
if (aSN1Sequence.size() > 2) {
|
|
this.transactionIdentifier = GeneralName.getInstance(aSN1Sequence.getObjectAt(2));
|
|
}
|
|
}
|
|
}
|