diff options
author | schwarze <> | 2023-08-25 18:22:41 +0000 |
---|---|---|
committer | schwarze <> | 2023-08-25 18:22:41 +0000 |
commit | f0dec45001c44d6a323e1c438dc0b06a254a95ef (patch) | |
tree | 0c70ee6134a5908977eac83e6538efd85f4d8928 /src/lib | |
parent | ddf502a28b3c9006c3bb3ac8c532c6c6ac5f6fe6 (diff) | |
download | openbsd-f0dec45001c44d6a323e1c438dc0b06a254a95ef.tar.gz openbsd-f0dec45001c44d6a323e1c438dc0b06a254a95ef.tar.bz2 openbsd-f0dec45001c44d6a323e1c438dc0b06a254a95ef.zip |
In evp.h rev.s 1.90 and 1.97, tb@ provided EVP_CIPHER_CTX_get_cipher_data(3)
and EVP_CIPHER_CTX_set_cipher_data(3).
Import the manual page from the OpenSSL 1.1 branch, which is still
under a free licence, with several improvements by me.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/man/EVP_CIPHER_CTX_get_cipher_data.3 | 109 | ||||
-rw-r--r-- | src/lib/libcrypto/man/Makefile | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/man/evp.3 | 5 |
3 files changed, 114 insertions, 3 deletions
diff --git a/src/lib/libcrypto/man/EVP_CIPHER_CTX_get_cipher_data.3 b/src/lib/libcrypto/man/EVP_CIPHER_CTX_get_cipher_data.3 new file mode 100644 index 0000000000..910d3f00f3 --- /dev/null +++ b/src/lib/libcrypto/man/EVP_CIPHER_CTX_get_cipher_data.3 | |||
@@ -0,0 +1,109 @@ | |||
1 | .\" $OpenBSD: EVP_CIPHER_CTX_get_cipher_data.3,v 1.1 2023/08/25 18:22:41 schwarze Exp $ | ||
2 | .\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 | ||
3 | .\" | ||
4 | .\" This file was written by Matt Caswell <matt@openssl.org> | ||
5 | .\" Copyright (c) 2016 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: August 25 2023 $ | ||
52 | .Dt EVP_CIPHER_CTX_GET_CIPHER_DATA 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm EVP_CIPHER_CTX_get_cipher_data , | ||
56 | .Nm EVP_CIPHER_CTX_set_cipher_data | ||
57 | .Nd inspect and modify EVP_CIPHER_CTX objects | ||
58 | .Sh SYNOPSIS | ||
59 | .In openssl/evp.h | ||
60 | .Ft void * | ||
61 | .Fo EVP_CIPHER_CTX_get_cipher_data | ||
62 | .Fa "const EVP_CIPHER_CTX *ctx" | ||
63 | .Fc | ||
64 | .Ft void * | ||
65 | .Fo EVP_CIPHER_CTX_set_cipher_data | ||
66 | .Fa "EVP_CIPHER_CTX *ctx" | ||
67 | .Fa "void *cipher_data" | ||
68 | .Fc | ||
69 | .Sh DESCRIPTION | ||
70 | .Fn EVP_CIPHER_CTX_get_cipher_data | ||
71 | returns a pointer to the cipher data of | ||
72 | .Fa ctx . | ||
73 | The format and content of this data is specific to the algorithm | ||
74 | and to the particular implementation of the cipher. | ||
75 | For example, this data can be used by engines | ||
76 | to store engine specific information. | ||
77 | The data is automatically allocated and freed by OpenSSL, so | ||
78 | applications and engines should not normally free this directly (but see | ||
79 | below). | ||
80 | .Pp | ||
81 | .Fn EVP_CIPHER_CTX_set_cipher_data | ||
82 | allows an application or engine to replace the existing cipher data | ||
83 | with new data, transfering ownership of | ||
84 | .Fa cipher_data | ||
85 | to the | ||
86 | .Fa ctx | ||
87 | object. | ||
88 | A pointer to any existing cipher data is returned from this function. | ||
89 | If the old data is no longer required, | ||
90 | it should be freed through a call to | ||
91 | .Xr free 3 . | ||
92 | .Sh RETURN VALUES | ||
93 | .Fn EVP_CIPHER_CTX_get_cipher_data | ||
94 | returns an internal pointer owned by | ||
95 | .Fa ctx . | ||
96 | .Pp | ||
97 | .Fn EVP_CIPHER_CTX_set_cipher_data | ||
98 | returns a pointer to the old cipher data of | ||
99 | .Fa ctx | ||
100 | and transfers ownership to the caller. | ||
101 | .Sh SEE ALSO | ||
102 | .Xr evp 3 , | ||
103 | .Xr EVP_EncryptInit 3 | ||
104 | .Sh HISTORY | ||
105 | .Fn EVP_CIPHER_CTX_get_cipher_data | ||
106 | and | ||
107 | .Fn EVP_CIPHER_CTX_set_cipher_data | ||
108 | first appeared in OpenSSL 1.1.0 and have been available since | ||
109 | .Ox 7.1 . | ||
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile index 27e64c494f..24b53b9eb1 100644 --- a/src/lib/libcrypto/man/Makefile +++ b/src/lib/libcrypto/man/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.262 2023/08/25 05:29:35 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.263 2023/08/25 18:22:41 schwarze Exp $ |
2 | 2 | ||
3 | .include <bsd.own.mk> | 3 | .include <bsd.own.mk> |
4 | 4 | ||
@@ -164,6 +164,7 @@ MAN= \ | |||
164 | ESS_SIGNING_CERT_new.3 \ | 164 | ESS_SIGNING_CERT_new.3 \ |
165 | EVP_AEAD_CTX_init.3 \ | 165 | EVP_AEAD_CTX_init.3 \ |
166 | EVP_BytesToKey.3 \ | 166 | EVP_BytesToKey.3 \ |
167 | EVP_CIPHER_CTX_get_cipher_data.3 \ | ||
167 | EVP_CIPHER_meth_new.3 \ | 168 | EVP_CIPHER_meth_new.3 \ |
168 | EVP_DigestInit.3 \ | 169 | EVP_DigestInit.3 \ |
169 | EVP_DigestSignInit.3 \ | 170 | EVP_DigestSignInit.3 \ |
diff --git a/src/lib/libcrypto/man/evp.3 b/src/lib/libcrypto/man/evp.3 index 02e21b8570..92a6c6a416 100644 --- a/src/lib/libcrypto/man/evp.3 +++ b/src/lib/libcrypto/man/evp.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: evp.3,v 1.18 2023/08/25 05:29:35 tb Exp $ | 1 | .\" $OpenBSD: evp.3,v 1.19 2023/08/25 18:22:41 schwarze Exp $ |
2 | .\" full merge up to: OpenSSL man7/evp 24a535ea Sep 22 13:14:20 2020 +0100 | 2 | .\" full merge up to: OpenSSL man7/evp 24a535ea Sep 22 13:14:20 2020 +0100 |
3 | .\" | 3 | .\" |
4 | .\" This file was written by Ulf Moeller <ulf@openssl.org>, | 4 | .\" This file was written by Ulf Moeller <ulf@openssl.org>, |
@@ -193,12 +193,13 @@ operations are more efficient using the high-level interfaces. | |||
193 | .Xr d2i_PrivateKey 3 , | 193 | .Xr d2i_PrivateKey 3 , |
194 | .Xr ENGINE_get_cipher 3 , | 194 | .Xr ENGINE_get_cipher 3 , |
195 | .Xr ENGINE_register_RSA 3 , | 195 | .Xr ENGINE_register_RSA 3 , |
196 | .Xr EVP_AEAD_CTX_init 3 , | ||
197 | .Xr EVP_add_cipher 3 , | 196 | .Xr EVP_add_cipher 3 , |
197 | .Xr EVP_AEAD_CTX_init 3 , | ||
198 | .Xr EVP_aes_128_cbc 3 , | 198 | .Xr EVP_aes_128_cbc 3 , |
199 | .Xr EVP_BytesToKey 3 , | 199 | .Xr EVP_BytesToKey 3 , |
200 | .Xr EVP_camellia_128_cbc 3 , | 200 | .Xr EVP_camellia_128_cbc 3 , |
201 | .Xr EVP_chacha20 3 , | 201 | .Xr EVP_chacha20 3 , |
202 | .Xr EVP_CIPHER_CTX_get_cipher_data 3 , | ||
202 | .Xr EVP_CIPHER_meth_new 3 , | 203 | .Xr EVP_CIPHER_meth_new 3 , |
203 | .Xr EVP_des_cbc 3 , | 204 | .Xr EVP_des_cbc 3 , |
204 | .Xr EVP_DigestInit 3 , | 205 | .Xr EVP_DigestInit 3 , |