diff options
author | cvs2svn <admin@example.com> | 2025-04-14 17:32:06 +0000 |
---|---|---|
committer | cvs2svn <admin@example.com> | 2025-04-14 17:32:06 +0000 |
commit | eb8dd9dca1228af0cd132f515509051ecfabf6f6 (patch) | |
tree | edb6da6af7e865d488dc1a29309f1e1ec226e603 /src/lib/libcrypto/man/PKCS7_encrypt.3 | |
parent | 247f0352e0ed72a4f476db9dc91f4d982bc83eb2 (diff) | |
download | openbsd-tb_20250414.tar.gz openbsd-tb_20250414.tar.bz2 openbsd-tb_20250414.zip |
This commit was manufactured by cvs2git to create tag 'tb_20250414'.tb_20250414
Diffstat (limited to 'src/lib/libcrypto/man/PKCS7_encrypt.3')
-rw-r--r-- | src/lib/libcrypto/man/PKCS7_encrypt.3 | 169 |
1 files changed, 0 insertions, 169 deletions
diff --git a/src/lib/libcrypto/man/PKCS7_encrypt.3 b/src/lib/libcrypto/man/PKCS7_encrypt.3 deleted file mode 100644 index 700498a1de..0000000000 --- a/src/lib/libcrypto/man/PKCS7_encrypt.3 +++ /dev/null | |||
@@ -1,169 +0,0 @@ | |||
1 | .\" $OpenBSD: PKCS7_encrypt.3,v 1.11 2020/06/03 13:41:27 schwarze Exp $ | ||
2 | .\" full merge up to: OpenSSL e9b77246 Jan 20 19:58:49 2017 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. | ||
5 | .\" Copyright (c) 2002, 2006, 2007, 2008, 2009 The OpenSSL Project. | ||
6 | .\" All rights reserved. | ||
7 | .\" | ||
8 | .\" Redistribution and use in source and binary forms, with or without | ||
9 | .\" modification, are permitted provided that the following conditions | ||
10 | .\" are met: | ||
11 | .\" | ||
12 | .\" 1. Redistributions of source code must retain the above copyright | ||
13 | .\" notice, this list of conditions and the following disclaimer. | ||
14 | .\" | ||
15 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
16 | .\" notice, this list of conditions and the following disclaimer in | ||
17 | .\" the documentation and/or other materials provided with the | ||
18 | .\" distribution. | ||
19 | .\" | ||
20 | .\" 3. All advertising materials mentioning features or use of this | ||
21 | .\" software must display the following acknowledgment: | ||
22 | .\" "This product includes software developed by the OpenSSL Project | ||
23 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
24 | .\" | ||
25 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
26 | .\" endorse or promote products derived from this software without | ||
27 | .\" prior written permission. For written permission, please contact | ||
28 | .\" openssl-core@openssl.org. | ||
29 | .\" | ||
30 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
31 | .\" nor may "OpenSSL" appear in their names without prior written | ||
32 | .\" permission of the OpenSSL Project. | ||
33 | .\" | ||
34 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
35 | .\" acknowledgment: | ||
36 | .\" "This product includes software developed by the OpenSSL Project | ||
37 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
38 | .\" | ||
39 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
40 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
41 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
42 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
43 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
44 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
45 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
46 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
47 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
48 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
51 | .\" | ||
52 | .Dd $Mdocdate: June 3 2020 $ | ||
53 | .Dt PKCS7_ENCRYPT 3 | ||
54 | .Os | ||
55 | .Sh NAME | ||
56 | .Nm PKCS7_encrypt | ||
57 | .Nd create a PKCS#7 envelopedData structure | ||
58 | .Sh SYNOPSIS | ||
59 | .In openssl/pkcs7.h | ||
60 | .Ft PKCS7 * | ||
61 | .Fo PKCS7_encrypt | ||
62 | .Fa "STACK_OF(X509) *certs" | ||
63 | .Fa "BIO *in" | ||
64 | .Fa "const EVP_CIPHER *cipher" | ||
65 | .Fa "int flags" | ||
66 | .Fc | ||
67 | .Sh DESCRIPTION | ||
68 | .Fn PKCS7_encrypt | ||
69 | creates and returns a PKCS#7 envelopedData structure. | ||
70 | .Fa certs | ||
71 | is a list of recipient certificates. | ||
72 | .Fa in | ||
73 | is the content to be encrypted. | ||
74 | .Fa cipher | ||
75 | is the symmetric cipher to use. | ||
76 | .Fa flags | ||
77 | is an optional set of flags. | ||
78 | .Pp | ||
79 | Only RSA keys are supported in PKCS#7 and envelopedData so the recipient | ||
80 | certificates supplied to this function must all contain RSA public keys, | ||
81 | though they do not have to be signed using the RSA algorithm. | ||
82 | .Pp | ||
83 | The algorithm passed in the | ||
84 | .Fa cipher | ||
85 | parameter must support ASN.1 encoding of its parameters. | ||
86 | .Pp | ||
87 | Many browsers implement a "sign and encrypt" option which is simply an | ||
88 | S/MIME envelopedData containing an S/MIME signed message. | ||
89 | This can be readily produced by storing the S/MIME signed message in a | ||
90 | memory | ||
91 | .Vt BIO | ||
92 | and passing it to | ||
93 | .Fn PKCS7_encrypt . | ||
94 | .Pp | ||
95 | The following flags can be passed in the | ||
96 | .Fa flags | ||
97 | parameter. | ||
98 | .Pp | ||
99 | If the | ||
100 | .Dv PKCS7_TEXT | ||
101 | flag is set, MIME headers for type | ||
102 | .Sy text/plain | ||
103 | are prepended to the data. | ||
104 | .Pp | ||
105 | Normally the supplied content is translated into MIME canonical format | ||
106 | (as required by the S/MIME specifications). | ||
107 | If | ||
108 | .Dv PKCS7_BINARY | ||
109 | is set, no translation occurs. | ||
110 | This option should be used if the supplied data is in binary format; | ||
111 | otherwise, the translation will corrupt it. | ||
112 | If | ||
113 | .Dv PKCS7_BINARY | ||
114 | is set, then | ||
115 | .Dv PKCS7_TEXT | ||
116 | is ignored. | ||
117 | .Pp | ||
118 | If the | ||
119 | .Dv PKCS7_STREAM | ||
120 | flag is set, a partial | ||
121 | .Vt PKCS7 | ||
122 | structure is output suitable for streaming I/O: no data is read from | ||
123 | .Fa in . | ||
124 | .Pp | ||
125 | If the flag | ||
126 | .Dv PKCS7_STREAM | ||
127 | is set, the returned | ||
128 | .Vt PKCS7 | ||
129 | structure is | ||
130 | .Sy not | ||
131 | complete and outputting its contents via a function that does not | ||
132 | properly finalize the | ||
133 | .Vt PKCS7 | ||
134 | structure will give unpredictable results. | ||
135 | .Pp | ||
136 | Several functions including | ||
137 | .Xr PKCS7_final 3 , | ||
138 | .Xr SMIME_write_PKCS7 3 , | ||
139 | .Xr PEM_write_bio_PKCS7_stream 3 , | ||
140 | and | ||
141 | .Xr i2d_PKCS7_bio_stream 3 | ||
142 | finalize the structure. | ||
143 | Alternatively finalization can be performed by obtaining the streaming | ||
144 | ASN.1 | ||
145 | .Vt BIO | ||
146 | directly using | ||
147 | .Fn BIO_new_PKCS7 . | ||
148 | .Sh RETURN VALUES | ||
149 | .Fn PKCS7_encrypt | ||
150 | returns either a | ||
151 | .Vt PKCS7 | ||
152 | structure or | ||
153 | .Dv NULL | ||
154 | if an error occurred. | ||
155 | The error can be obtained from | ||
156 | .Xr ERR_get_error 3 . | ||
157 | .Sh SEE ALSO | ||
158 | .Xr PKCS7_decrypt 3 , | ||
159 | .Xr PKCS7_final 3 , | ||
160 | .Xr PKCS7_new 3 , | ||
161 | .Xr PKCS7_sign 3 | ||
162 | .Sh HISTORY | ||
163 | .Fn PKCS7_encrypt | ||
164 | first appeared in OpenSSL 0.9.5 and has been available since | ||
165 | .Ox 2.7 . | ||
166 | .Pp | ||
167 | The | ||
168 | .Dv PKCS7_STREAM | ||
169 | flag was first supported in OpenSSL 1.0.0. | ||