Write a CMS_ContentInfo as an S/MIME (MIME) message to bio.

Synopsis

Declared in <openssl/cms.h>

int
SMIME_write_CMS(
    BIO* bio,
    CMS_ContentInfo* cms,
    BIO* data,
    int flags);

Return Value

1 on success, or 0 on failure.

Parameters

Name

Description

bio

Output BIO receiving the MIME‐formatted CMS.

cms

CMS object to serialise (typically signed or enveloped data).

data

Optional content BIO for detached/streaming content, or NULL.

flags

CMS_* / SMIME_* flags controlling MIME headers and streaming.

Created with MrDocs