convert PKCS#7 structure to S/MIME format
, PKCS7 *p7
() adds the appropriate MIME
headers to a PKCS#7 structure to produce an S/MIME message.
is the BIO
to write the data to. p7
is the appropriate
structure. If streaming is enabled,
then the content must be supplied in the data
is an optional set of flags.
The following flags can be passed in the flags
is set, then cleartext
signing will be used. This option only makes sense for signedData where
is also set when
flag is set, MIME headers
for type text/plain
are added to the content.
This only makes sense if
flag is set, streaming is
performed. This flag should only be set if
was also set in the previous
call to PKCS7_sign(3)
If cleartext signing is being used and
is not set, then the data must
be read twice: once to compute the signature in
and once to
output the S/MIME message.
If streaming is performed, the content is output in BER format using indefinite
length constructed encoding except in the case of signed data with detached
content where the content is absent and DER format is used.
() returns 1 for success or 0 for
() was added to OpenSSL 0.9.5.
() always base64 encodes PKCS#7
structures. There should be an option to disable this.