use of org.jruby.ext.openssl.ASN1._ASN1 in project jruby-openssl by jruby.
the class X509Attribute method toASN1.
ASN1Primitive toASN1(final ThreadContext context) {
ASN1EncodableVector v1 = new ASN1EncodableVector();
v1.add(getTypeID());
if (value instanceof ASN1.Constructive) {
v1.add(((ASN1.Constructive) value).toASN1(context));
} else {
ASN1EncodableVector v2 = new ASN1EncodableVector();
v2.add(((ASN1.ASN1Data) value).toASN1(context));
v1.add(new DERSet(v2));
}
return new DLSequence(v1);
}
Aggregations