summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/SMIME_write_PKCS7.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/man/SMIME_write_PKCS7.3')
-rw-r--r--src/lib/libcrypto/man/SMIME_write_PKCS7.393
1 files changed, 93 insertions, 0 deletions
diff --git a/src/lib/libcrypto/man/SMIME_write_PKCS7.3 b/src/lib/libcrypto/man/SMIME_write_PKCS7.3
new file mode 100644
index 0000000000..f4f465e2e4
--- /dev/null
+++ b/src/lib/libcrypto/man/SMIME_write_PKCS7.3
@@ -0,0 +1,93 @@
1.Dd $Mdocdate: November 3 2016 $
2.Dt SMIME_WRITE_PKCS7 3
3.Os
4.Sh NAME
5.Nm SMIME_write_PKCS7
6.Nd convert PKCS#7 structure to S/MIME format
7.Sh SYNOPSIS
8.In openssl/pkcs7.h
9.Ft int
10.Fo SMIME_write_PKCS7
11.Fa "BIO *out"
12.Fa "PKCS7 *p7"
13.Fa "BIO *data"
14.Fa "int flags"
15.Fc
16.Sh DESCRIPTION
17.Fn SMIME_write_PKCS7
18adds the appropriate MIME headers to a PKCS#7 structure to produce an
19S/MIME message.
20.Pp
21.Fa out
22is the
23.Vt BIO
24to write the data to.
25.Fa p7
26is the appropriate
27.Vt PKCS7
28structure.
29If streaming is enabled, then the content must be supplied in the
30.Fa data
31argument.
32.Fa flags
33is an optional set of flags.
34.Pp
35The following flags can be passed in the
36.Fa flags
37parameter.
38.Pp
39If
40.Dv PKCS7_DETACHED
41is set, then cleartext signing will be used.
42This option only makes sense for signedData where
43.Dv PKCS7_DETACHED
44is also set when
45.Xr PKCS7_sign 3
46is also called.
47.Pp
48If the
49.Dv PKCS7_TEXT
50flag is set, MIME headers for type
51.Sy text/plain
52are added to the content.
53This only makes sense if
54.Dv PKCS7_DETACHED
55is also set.
56.Pp
57If the
58.Dv PKCS7_STREAM
59flag is set, streaming is performed.
60This flag should only be set if
61.Dv PKCS7_STREAM
62was also set in the previous call to
63.Xr PKCS7_sign 3
64or
65.Xr PKCS7_encrypt 3 .
66.Pp
67If cleartext signing is being used and
68.Dv PKCS7_STREAM
69is not set, then the data must be read twice: once to compute the
70signature in
71.Xr PKCS7_sign 3
72and once to output the S/MIME message.
73.Pp
74If streaming is performed, the content is output in BER format using
75indefinite length constructed encoding except in the case of signed
76data with detached content where the content is absent and DER
77format is used.
78.Sh RETURN VALUES
79.Fn SMIME_write_PKCS7
80returns 1 for success or 0 for failure.
81.Sh SEE ALSO
82.Xr ERR_get_error 3 ,
83.Xr PKCS7_decrypt 3 ,
84.Xr PKCS7_encrypt 3 ,
85.Xr PKCS7_sign 3 ,
86.Xr PKCS7_verify 3
87.Sh HISTORY
88.Fn SMIME_write_PKCS7
89was added to OpenSSL 0.9.5.
90.Sh BUGS
91.Fn SMIME_write_PKCS7
92always base64 encodes PKCS#7 structures.
93There should be an option to disable this.