Search in sources :

Example 1 with ASN1._ASN1

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);
}
Also used : DLSequence(org.bouncycastle.asn1.DLSequence) ASN1EncodableVector(org.bouncycastle.asn1.ASN1EncodableVector) ASN1._ASN1(org.jruby.ext.openssl.ASN1._ASN1) DERSet(org.bouncycastle.asn1.DERSet)

Aggregations

ASN1EncodableVector (org.bouncycastle.asn1.ASN1EncodableVector)1 DERSet (org.bouncycastle.asn1.DERSet)1 DLSequence (org.bouncycastle.asn1.DLSequence)1 ASN1._ASN1 (org.jruby.ext.openssl.ASN1._ASN1)1