|SMIME_WRITE_CMS(3)||Library Functions Manual||SMIME_WRITE_CMS(3)|
convert CMS structure to S/MIME format
CMS_ContentInfo *cms, BIO *data,
adds the appropriate MIME headers to the cms structure
to produce an S/MIME message and writes it to out. If
streaming is enabled, the content must be supplied in the
The following flags can be passed:
CMS_DETACHEDwas also set when it was created with CMS_sign(3).
CMS_STREAM is not set, the data
must be read twice: once to compute the signature in
CMS_sign(3) and once to output the
CMS_DETACHEDis also set.
CMS_STREAMwas also passed to the function that created cms.
The content is output in BER format using indefinite length constructed encoding except in the case of SignedData with detached content where the content is absent and DER format is used.
SMIME_write_CMS() returns 1 for success or
0 for failure.
SMIME_write_CMS() first appeared in
OpenSSL 0.9.8h and has been available since OpenBSD
SMIME_write_CMS() always base64 encodes
CMS structures. There should be an option to disable this.
|November 2, 2019||OpenBSD-current|