what-the-bank/sources/org/bouncycastle/asn1/cmp/RevDetails.java

67 lines
2.2 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package org.bouncycastle.asn1.cmp;
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.crmf.CertTemplate;
import org.bouncycastle.asn1.x509.Extensions;
import org.bouncycastle.asn1.x509.X509Extensions;
/* loaded from: classes6.dex */
public class RevDetails extends ASN1Object {
private CertTemplate certDetails;
private Extensions crlEntryDetails;
@Override // org.bouncycastle.asn1.ASN1Object, org.bouncycastle.asn1.ASN1Encodable
public ASN1Primitive toASN1Primitive() {
ASN1EncodableVector aSN1EncodableVector = new ASN1EncodableVector();
aSN1EncodableVector.add(this.certDetails);
Extensions extensions = this.crlEntryDetails;
if (extensions != null) {
aSN1EncodableVector.add(extensions);
}
return new DERSequence(aSN1EncodableVector);
}
public Extensions getCrlEntryDetails() {
return this.crlEntryDetails;
}
public CertTemplate getCertDetails() {
return this.certDetails;
}
public static RevDetails getInstance(Object obj) {
if (obj instanceof RevDetails) {
return (RevDetails) obj;
}
if (obj != null) {
return new RevDetails(ASN1Sequence.getInstance(obj));
}
return null;
}
public RevDetails(CertTemplate certTemplate, X509Extensions x509Extensions) {
this.certDetails = certTemplate;
this.crlEntryDetails = Extensions.getInstance(x509Extensions.toASN1Primitive());
}
public RevDetails(CertTemplate certTemplate, Extensions extensions) {
this.certDetails = certTemplate;
this.crlEntryDetails = extensions;
}
public RevDetails(CertTemplate certTemplate) {
this.certDetails = certTemplate;
}
private RevDetails(ASN1Sequence aSN1Sequence) {
this.certDetails = CertTemplate.getInstance(aSN1Sequence.getObjectAt(0));
if (aSN1Sequence.size() > 1) {
this.crlEntryDetails = Extensions.getInstance(aSN1Sequence.getObjectAt(1));
}
}
}