what-the-bank/sources/org/bouncycastle/asn1/esf/SignaturePolicyIdentifier.java

46 lines
1.5 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package org.bouncycastle.asn1.esf;
import org.bouncycastle.asn1.ASN1Null;
import org.bouncycastle.asn1.ASN1Object;
import org.bouncycastle.asn1.ASN1Primitive;
import org.bouncycastle.asn1.DERNull;
/* loaded from: classes6.dex */
public class SignaturePolicyIdentifier extends ASN1Object {
private boolean isSignaturePolicyImplied = true;
private SignaturePolicyId signaturePolicyId;
@Override // org.bouncycastle.asn1.ASN1Object, org.bouncycastle.asn1.ASN1Encodable
public ASN1Primitive toASN1Primitive() {
return this.isSignaturePolicyImplied ? DERNull.INSTANCE : this.signaturePolicyId.toASN1Primitive();
}
public boolean isSignaturePolicyImplied() {
return this.isSignaturePolicyImplied;
}
public SignaturePolicyId getSignaturePolicyId() {
return this.signaturePolicyId;
}
public static SignaturePolicyIdentifier getInstance(Object obj) {
if (obj instanceof SignaturePolicyIdentifier) {
return (SignaturePolicyIdentifier) obj;
}
if ((obj instanceof ASN1Null) || hasEncodedTagValue(obj, 5)) {
return new SignaturePolicyIdentifier();
}
if (obj != null) {
return new SignaturePolicyIdentifier(SignaturePolicyId.getInstance(obj));
}
return null;
}
public SignaturePolicyIdentifier(SignaturePolicyId signaturePolicyId) {
this.signaturePolicyId = signaturePolicyId;
}
public SignaturePolicyIdentifier() {
}
}