47 lines
1.6 KiB
Java
47 lines
1.6 KiB
Java
package org.bouncycastle.x509;
|
|
|
|
import org.bouncycastle.asn1.ASN1Encodable;
|
|
import org.bouncycastle.asn1.ASN1EncodableVector;
|
|
import org.bouncycastle.asn1.ASN1Object;
|
|
import org.bouncycastle.asn1.ASN1ObjectIdentifier;
|
|
import org.bouncycastle.asn1.ASN1Primitive;
|
|
import org.bouncycastle.asn1.ASN1Set;
|
|
import org.bouncycastle.asn1.DERSet;
|
|
import org.bouncycastle.asn1.x509.Attribute;
|
|
|
|
/* loaded from: classes6.dex */
|
|
public class X509Attribute extends ASN1Object {
|
|
Attribute attr;
|
|
|
|
@Override // org.bouncycastle.asn1.ASN1Object, org.bouncycastle.asn1.ASN1Encodable
|
|
public ASN1Primitive toASN1Primitive() {
|
|
return this.attr.toASN1Primitive();
|
|
}
|
|
|
|
public ASN1Encodable[] getValues() {
|
|
ASN1Set attrValues = this.attr.getAttrValues();
|
|
ASN1Encodable[] aSN1EncodableArr = new ASN1Encodable[attrValues.size()];
|
|
for (int i = 0; i != attrValues.size(); i++) {
|
|
aSN1EncodableArr[i] = attrValues.getObjectAt(i);
|
|
}
|
|
return aSN1EncodableArr;
|
|
}
|
|
|
|
public String getOID() {
|
|
return this.attr.getAttrType().getId();
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public X509Attribute(ASN1Encodable aSN1Encodable) {
|
|
this.attr = Attribute.getInstance(aSN1Encodable);
|
|
}
|
|
|
|
public X509Attribute(String str, ASN1EncodableVector aSN1EncodableVector) {
|
|
this.attr = new Attribute(new ASN1ObjectIdentifier(str), new DERSet(aSN1EncodableVector));
|
|
}
|
|
|
|
public X509Attribute(String str, ASN1Encodable aSN1Encodable) {
|
|
this.attr = new Attribute(new ASN1ObjectIdentifier(str), new DERSet(aSN1Encodable));
|
|
}
|
|
}
|