summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/doc/PKCS7_encrypt.pod
diff options
context:
space:
mode:
authorschwarze <>2016-11-03 15:20:36 +0000
committerschwarze <>2016-11-03 15:20:36 +0000
commit60d59582dc15b87539a8dc135d2baf8a181ff37b (patch)
tree1ce08c06c8b7c83fa9592d241cddc0d7b95ce2ce /src/lib/libcrypto/doc/PKCS7_encrypt.pod
parent05002f727738ee445b4a9367f51474995302c6a6 (diff)
downloadopenbsd-60d59582dc15b87539a8dc135d2baf8a181ff37b.tar.gz
openbsd-60d59582dc15b87539a8dc135d2baf8a181ff37b.tar.bz2
openbsd-60d59582dc15b87539a8dc135d2baf8a181ff37b.zip
convert PEM and PKCS manuals from pod to mdoc
Diffstat (limited to 'src/lib/libcrypto/doc/PKCS7_encrypt.pod')
-rw-r--r--src/lib/libcrypto/doc/PKCS7_encrypt.pod73
1 files changed, 0 insertions, 73 deletions
diff --git a/src/lib/libcrypto/doc/PKCS7_encrypt.pod b/src/lib/libcrypto/doc/PKCS7_encrypt.pod
deleted file mode 100644
index 8bc77407b9..0000000000
--- a/src/lib/libcrypto/doc/PKCS7_encrypt.pod
+++ /dev/null
@@ -1,73 +0,0 @@
1=pod
2
3=head1 NAME
4
5PKCS7_encrypt - create a PKCS#7 envelopedData structure
6
7=head1 SYNOPSIS
8
9 #include <openssl/pkcs7.h>
10
11 PKCS7 *PKCS7_encrypt(STACK_OF(X509) *certs, BIO *in, const EVP_CIPHER *cipher, int flags);
12
13=head1 DESCRIPTION
14
15PKCS7_encrypt() creates and returns a PKCS#7 envelopedData structure. B<certs>
16is a list of recipient certificates. B<in> is the content to be encrypted.
17B<cipher> is the symmetric cipher to use. B<flags> is an optional set of flags.
18
19=head1 NOTES
20
21Only RSA keys are supported in PKCS#7 and envelopedData so the recipient
22certificates supplied to this function must all contain RSA public keys, though
23they do not have to be signed using the RSA algorithm.
24
25The algorithm passed in the B<cipher> parameter must support ASN1 encoding of
26its parameters.
27
28Many browsers implement a "sign and encrypt" option which is simply an S/MIME
29envelopedData containing an S/MIME signed message. This can be readily produced
30by storing the S/MIME signed message in a memory BIO and passing it to
31PKCS7_encrypt().
32
33The following flags can be passed in the B<flags> parameter.
34
35If the B<PKCS7_TEXT> flag is set MIME headers for type B<text/plain> are
36prepended to the data.
37
38Normally the supplied content is translated into MIME canonical format (as
39required by the S/MIME specifications) if B<PKCS7_BINARY> is set no translation
40occurs. This option should be used if the supplied data is in binary format
41otherwise the translation will corrupt it. If B<PKCS7_BINARY> is set then
42B<PKCS7_TEXT> is ignored.
43
44If the B<PKCS7_STREAM> flag is set a partial B<PKCS7> structure is output
45suitable for streaming I/O: no data is read from the BIO B<in>.
46
47=head1 NOTES
48
49If the flag B<PKCS7_STREAM> is set the returned B<PKCS7> structure is B<not>
50complete and outputting its contents via a function that does not
51properly finalize the B<PKCS7> structure will give unpredictable
52results.
53
54Several functions including SMIME_write_PKCS7(), i2d_PKCS7_bio_stream(),
55PEM_write_bio_PKCS7_stream() finalize the structure. Alternatively finalization
56can be performed by obtaining the streaming ASN1 B<BIO> directly using
57BIO_new_PKCS7().
58
59=head1 RETURN VALUES
60
61PKCS7_encrypt() returns either a PKCS7 structure or NULL if an error occurred.
62The error can be obtained from ERR_get_error(3).
63
64=head1 SEE ALSO
65
66L<ERR_get_error(3)|ERR_get_error(3)>, L<PKCS7_decrypt(3)|PKCS7_decrypt(3)>
67
68=head1 HISTORY
69
70PKCS7_decrypt() was added to OpenSSL 0.9.5
71The B<PKCS7_STREAM> flag was first supported in OpenSSL 1.0.0.
72
73=cut