64 lines
2.3 KiB
Java
64 lines
2.3 KiB
Java
|
package org.bouncycastle.asn1.x509;
|
||
|
|
||
|
import org.bouncycastle.asn1.ASN1EncodableVector;
|
||
|
import org.bouncycastle.asn1.ASN1Object;
|
||
|
import org.bouncycastle.asn1.ASN1Primitive;
|
||
|
import org.bouncycastle.asn1.ASN1Sequence;
|
||
|
import org.bouncycastle.asn1.DERBitString;
|
||
|
import org.bouncycastle.asn1.DERSequence;
|
||
|
|
||
|
/* loaded from: classes6.dex */
|
||
|
public class AttributeCertificate extends ASN1Object {
|
||
|
AttributeCertificateInfo acinfo;
|
||
|
AlgorithmIdentifier signatureAlgorithm;
|
||
|
DERBitString signatureValue;
|
||
|
|
||
|
@Override // org.bouncycastle.asn1.ASN1Object, org.bouncycastle.asn1.ASN1Encodable
|
||
|
public ASN1Primitive toASN1Primitive() {
|
||
|
ASN1EncodableVector aSN1EncodableVector = new ASN1EncodableVector();
|
||
|
aSN1EncodableVector.add(this.acinfo);
|
||
|
aSN1EncodableVector.add(this.signatureAlgorithm);
|
||
|
aSN1EncodableVector.add(this.signatureValue);
|
||
|
return new DERSequence(aSN1EncodableVector);
|
||
|
}
|
||
|
|
||
|
public DERBitString getSignatureValue() {
|
||
|
return this.signatureValue;
|
||
|
}
|
||
|
|
||
|
public AlgorithmIdentifier getSignatureAlgorithm() {
|
||
|
return this.signatureAlgorithm;
|
||
|
}
|
||
|
|
||
|
public AttributeCertificateInfo getAcinfo() {
|
||
|
return this.acinfo;
|
||
|
}
|
||
|
|
||
|
public static AttributeCertificate getInstance(Object obj) {
|
||
|
if (obj instanceof AttributeCertificate) {
|
||
|
return (AttributeCertificate) obj;
|
||
|
}
|
||
|
if (obj != null) {
|
||
|
return new AttributeCertificate(ASN1Sequence.getInstance(obj));
|
||
|
}
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
public AttributeCertificate(AttributeCertificateInfo attributeCertificateInfo, AlgorithmIdentifier algorithmIdentifier, DERBitString dERBitString) {
|
||
|
this.acinfo = attributeCertificateInfo;
|
||
|
this.signatureAlgorithm = algorithmIdentifier;
|
||
|
this.signatureValue = dERBitString;
|
||
|
}
|
||
|
|
||
|
public AttributeCertificate(ASN1Sequence aSN1Sequence) {
|
||
|
if (aSN1Sequence.size() != 3) {
|
||
|
StringBuilder sb = new StringBuilder("Bad sequence size: ");
|
||
|
sb.append(aSN1Sequence.size());
|
||
|
throw new IllegalArgumentException(sb.toString());
|
||
|
}
|
||
|
this.acinfo = AttributeCertificateInfo.getInstance(aSN1Sequence.getObjectAt(0));
|
||
|
this.signatureAlgorithm = AlgorithmIdentifier.getInstance(aSN1Sequence.getObjectAt(1));
|
||
|
this.signatureValue = DERBitString.getInstance(aSN1Sequence.getObjectAt(2));
|
||
|
}
|
||
|
}
|