Search in sources :

Example 36 with DLSequence

use of org.spongycastle.asn1.DLSequence in project jruby-openssl by jruby.

the class EncContent method asASN1.

public ASN1Encodable asASN1() {
    ASN1EncodableVector vector = new ASN1EncodableVector();
    vector.add(ASN1Registry.nid2obj(contentType).toASN1Primitive());
    vector.add(algorithm.toASN1Primitive());
    if (encData != null) {
        vector.add(new DERTaggedObject(false, 0, encData));
    }
    return new DLSequence(vector);
}
Also used : DLSequence(org.bouncycastle.asn1.DLSequence) DERTaggedObject(org.bouncycastle.asn1.DERTaggedObject) ASN1EncodableVector(org.bouncycastle.asn1.ASN1EncodableVector)

Aggregations

DLSequence (org.bouncycastle.asn1.DLSequence)35 ASN1EncodableVector (org.bouncycastle.asn1.ASN1EncodableVector)21 IOException (java.io.IOException)13 DERTaggedObject (org.bouncycastle.asn1.DERTaggedObject)13 ASN1Integer (org.bouncycastle.asn1.ASN1Integer)12 ASN1ObjectIdentifier (org.bouncycastle.asn1.ASN1ObjectIdentifier)9 DEROctetString (org.bouncycastle.asn1.DEROctetString)9 ASN1Primitive (org.bouncycastle.asn1.ASN1Primitive)8 ASN1Sequence (org.bouncycastle.asn1.ASN1Sequence)8 DERIA5String (org.bouncycastle.asn1.DERIA5String)6 DERUTF8String (org.bouncycastle.asn1.DERUTF8String)6 BigInteger (java.math.BigInteger)5 ASN1Encodable (org.bouncycastle.asn1.ASN1Encodable)5 Pair (android.util.Pair)3 BufferedWriter (java.io.BufferedWriter)3 ASN1OutputStream (org.bouncycastle.asn1.ASN1OutputStream)3 JRubyMethod (org.jruby.anno.JRubyMethod)3 ByteArrayOutputStream (org.jruby.ext.openssl.util.ByteArrayOutputStream)3 CertificateEncodingException (java.security.cert.CertificateEncodingException)2 ASN1InputStream (org.bouncycastle.asn1.ASN1InputStream)2