[#SMIME_write_ASN1] = SMIME_write_ASN1 :mrdocs: Write an ASN.1 CMS/PKCS#7 value as an S/MIME message (default library context). == Synopsis Declared in `<openssl/asn1.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int SMIME_write_ASN1( xref:BIO.adoc[BIO]* bio, xref:ASN1_VALUE.adoc[ASN1_VALUE]* val, xref:BIO.adoc[BIO]* data, int flags, int ctype_nid, int econt_nid, xref:stack_st_X509_ALGOR.adoc[stack_st_X509_ALGOR]* mdalgs, xref:ASN1_ITEM.adoc[ASN1_ITEM] const* it); ---- == Return Value 1 on success, or 0 on failure. == Parameters [cols="1,4"] |=== | 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). |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#