Write an ASN.1 CMS/PKCS#7 value as an S/MIME message with library context.
Declared in <openssl/asn1.h>
int
SMIME_write_ASN1_ex(
BIO* bio,
ASN1_VALUE* val,
BIO* data,
int flags,
int ctype_nid,
int econt_nid,
stack_st_X509_ALGOR* mdalgs,
ASN1_ITEM const* it,
OSSL_LIB_CTX* libctx,
char const* propq);
1 on success, or 0 on failure.
| 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). |
| libctx | Library context for algorithm fetches, or NULL for the default. |
| propq | Property query for those fetches, or NULL. |