diff options
Diffstat (limited to 'src/lib/libcrypto/doc/SMIME_write_PKCS7.pod')
-rw-r--r-- | src/lib/libcrypto/doc/SMIME_write_PKCS7.pod | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/lib/libcrypto/doc/SMIME_write_PKCS7.pod b/src/lib/libcrypto/doc/SMIME_write_PKCS7.pod new file mode 100644 index 0000000000..2cfad2e049 --- /dev/null +++ b/src/lib/libcrypto/doc/SMIME_write_PKCS7.pod | |||
@@ -0,0 +1,59 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | SMIME_write_PKCS7 - convert PKCS#7 structure to S/MIME format. | ||
6 | |||
7 | =head1 SYNOPSIS | ||
8 | |||
9 | int SMIME_write_PKCS7(BIO *out, PKCS7 *p7, BIO *data, int flags); | ||
10 | |||
11 | =head1 DESCRIPTION | ||
12 | |||
13 | SMIME_write_PKCS7() adds the appropriate MIME headers to a PKCS#7 | ||
14 | structure to produce an S/MIME message. | ||
15 | |||
16 | B<out> is the BIO to write the data to. B<p7> is the appropriate | ||
17 | B<PKCS7> structure. If cleartext signing (B<multipart/signed>) is | ||
18 | being used then the signed data must be supplied in the B<data> | ||
19 | argument. B<flags> is an optional set of flags. | ||
20 | |||
21 | =head1 NOTES | ||
22 | |||
23 | The following flags can be passed in the B<flags> parameter. | ||
24 | |||
25 | If B<PKCS7_DETACHED> is set then cleartext signing will be used, | ||
26 | this option only makes sense for signedData where B<PKCS7_DETACHED> | ||
27 | is also set when PKCS7_sign() is also called. | ||
28 | |||
29 | If the B<PKCS7_TEXT> flag is set MIME headers for type B<text/plain> | ||
30 | are added to the content, this only makes sense if B<PKCS7_DETACHED> | ||
31 | is also set. | ||
32 | |||
33 | If cleartext signing is being used then the data must be read twice: | ||
34 | once to compute the signature in PKCS7_sign() and once to output the | ||
35 | S/MIME message. | ||
36 | |||
37 | =head1 BUGS | ||
38 | |||
39 | SMIME_write_PKCS7() always base64 encodes PKCS#7 structures, there | ||
40 | should be an option to disable this. | ||
41 | |||
42 | There should really be a way to produce cleartext signing using only | ||
43 | a single pass of the data. | ||
44 | |||
45 | =head1 RETURN VALUES | ||
46 | |||
47 | SMIME_write_PKCS7() returns 1 for success or 0 for failure. | ||
48 | |||
49 | =head1 SEE ALSO | ||
50 | |||
51 | L<ERR_get_error(3)|ERR_get_error(3)>, L<PKCS7_sign(3)|PKCS7_sign(3)>, | ||
52 | L<PKCS7_verify(3)|PKCS7_verify(3)>, L<PKCS7_encrypt(3)|PKCS7_encrypt(3)> | ||
53 | L<PKCS7_decrypt(3)|PKCS7_decrypt(3)> | ||
54 | |||
55 | =head1 HISTORY | ||
56 | |||
57 | SMIME_write_PKCS7() was added to OpenSSL 0.9.5 | ||
58 | |||
59 | =cut | ||