Write an ASN.1 CMS/PKCS#7 value as an S/MIME message (default library context).

Synopsis

Declared in <openssl/asn1.h>

int
SMIME_write_ASN1(
    BIO* bio,
    ASN1_VALUE* val,
    BIO* data,
    int flags,
    int ctype_nid,
    int econt_nid,
    stack_st_X509_ALGOR* mdalgs,
    ASN1_ITEM const* it);

Return Value

1 on success, or 0 on failure.

Parameters

Name

Description

bio

BIO that receives the S/MIME output.

val

CMS_ContentInfo or PKCS7 value to wrap (not const because streaming may update state).

data

Optional content BIO when streaming / detached content is used, or NULL.

flags

CMS_* / SMIME_* flags (for example CMS_DETACHED, CMS_TEXT, CMS_STREAM).

ctype_nid

NID of the content type.

econt_nid

NID of the embedded content type.

mdalgs

Digest algorithms for SignedData, or NULL when unused.

it

Item descriptor such as ASN1_ITEM_rptr(CMS_ContentInfo) or ASN1_ITEM_rptr(PKCS7).

Created with MrDocs