diff options
author | schwarze <> | 2023-09-09 14:35:23 +0000 |
---|---|---|
committer | schwarze <> | 2023-09-09 14:35:23 +0000 |
commit | b3e258f679b8c2c266d39a7d84dd6e3c42b2698d (patch) | |
tree | f42b482f3b32c85376a64645d5f2c98cad292605 /src/lib | |
parent | 235a01a03d29cd07cde581e34ae6ca4f4ad3eed8 (diff) | |
download | openbsd-b3e258f679b8c2c266d39a7d84dd6e3c42b2698d.tar.gz openbsd-b3e258f679b8c2c266d39a7d84dd6e3c42b2698d.tar.bz2 openbsd-b3e258f679b8c2c266d39a7d84dd6e3c42b2698d.zip |
document EVP_PKEY_CTX_get_data(3) and EVP_PKEY_CTX_set_data(3)
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/man/EVP_PKEY_meth_new.3 | 64 |
1 files changed, 58 insertions, 6 deletions
diff --git a/src/lib/libcrypto/man/EVP_PKEY_meth_new.3 b/src/lib/libcrypto/man/EVP_PKEY_meth_new.3 index 3d9d1ba5be..5ec0b12105 100644 --- a/src/lib/libcrypto/man/EVP_PKEY_meth_new.3 +++ b/src/lib/libcrypto/man/EVP_PKEY_meth_new.3 | |||
@@ -1,7 +1,24 @@ | |||
1 | .\" $OpenBSD: EVP_PKEY_meth_new.3,v 1.5 2022/07/13 19:10:40 schwarze Exp $ | 1 | .\" $OpenBSD: EVP_PKEY_meth_new.3,v 1.6 2023/09/09 14:35:23 schwarze Exp $ |
2 | .\" selective merge up to: OpenSSL 335a587b May 7 11:59:11 2019 +0200 | 2 | .\" selective merge up to: OpenSSL 35fd9953 May 28 14:49:38 2019 +0200 |
3 | .\" | 3 | .\" |
4 | .\" This file was written by Paul Yang <yang.yang@baishancloud.com> | 4 | .\" This file is a derived work. |
5 | .\" The changes are covered by the following Copyright and license: | ||
6 | .\" | ||
7 | .\" Copyright (c) 2023 Ingo Schwarze <schwarze@openbsd.org> | ||
8 | .\" | ||
9 | .\" Permission to use, copy, modify, and distribute this software for any | ||
10 | .\" purpose with or without fee is hereby granted, provided that the above | ||
11 | .\" copyright notice and this permission notice appear in all copies. | ||
12 | .\" | ||
13 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
14 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
15 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
16 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
17 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
18 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
19 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
20 | .\" | ||
21 | .\" The original file was written by Paul Yang <yang.yang@baishancloud.com>. | ||
5 | .\" Copyright (c) 2017 The OpenSSL Project. All rights reserved. | 22 | .\" Copyright (c) 2017 The OpenSSL Project. All rights reserved. |
6 | .\" | 23 | .\" |
7 | .\" Redistribution and use in source and binary forms, with or without | 24 | .\" Redistribution and use in source and binary forms, with or without |
@@ -48,7 +65,7 @@ | |||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 65 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 66 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
50 | .\" | 67 | .\" |
51 | .Dd $Mdocdate: July 13 2022 $ | 68 | .Dd $Mdocdate: September 9 2023 $ |
52 | .Dt EVP_PKEY_METH_NEW 3 | 69 | .Dt EVP_PKEY_METH_NEW 3 |
53 | .Os | 70 | .Os |
54 | .Sh NAME | 71 | .Sh NAME |
@@ -73,7 +90,9 @@ | |||
73 | .Nm EVP_PKEY_meth_set_ctrl , | 90 | .Nm EVP_PKEY_meth_set_ctrl , |
74 | .Nm EVP_PKEY_meth_set_check , | 91 | .Nm EVP_PKEY_meth_set_check , |
75 | .Nm EVP_PKEY_meth_set_public_check , | 92 | .Nm EVP_PKEY_meth_set_public_check , |
76 | .Nm EVP_PKEY_meth_set_param_check | 93 | .Nm EVP_PKEY_meth_set_param_check , |
94 | .Nm EVP_PKEY_CTX_get_data , | ||
95 | .Nm EVP_PKEY_CTX_set_data | ||
77 | .Nd manipulate an EVP_PKEY_METHOD structure | 96 | .Nd manipulate an EVP_PKEY_METHOD structure |
78 | .Sh SYNOPSIS | 97 | .Sh SYNOPSIS |
79 | .In openssl/evp.h | 98 | .In openssl/evp.h |
@@ -202,6 +221,15 @@ | |||
202 | .Fa "EVP_PKEY_METHOD *pmeth" | 221 | .Fa "EVP_PKEY_METHOD *pmeth" |
203 | .Fa "int (*param_check)(EVP_PKEY *pkey)" | 222 | .Fa "int (*param_check)(EVP_PKEY *pkey)" |
204 | .Fc | 223 | .Fc |
224 | .Ft void * | ||
225 | .Fo EVP_PKEY_CTX_get_data | ||
226 | .Fa "EVP_PKEY_CTX *ctx" | ||
227 | .Fc | ||
228 | .Ft void | ||
229 | .Fo EVP_PKEY_CTX_set_data | ||
230 | .Fa "EVP_PKEY_CTX *ctx" | ||
231 | .Fa "void *data" | ||
232 | .Fc | ||
205 | .Sh DESCRIPTION | 233 | .Sh DESCRIPTION |
206 | The | 234 | The |
207 | .Vt EVP_PKEY_METHOD | 235 | .Vt EVP_PKEY_METHOD |
@@ -539,6 +567,24 @@ The | |||
539 | functions set the corresponding fields of | 567 | functions set the corresponding fields of |
540 | .Fa pmeth | 568 | .Fa pmeth |
541 | to the arguments passed. | 569 | to the arguments passed. |
570 | .Pp | ||
571 | .Fn EVP_PKEY_CTX_get_data | ||
572 | retrieves algorithm- and implementation-specific private key data from | ||
573 | .Fa ctx . | ||
574 | Public key algorithm implementations typically allocate and initialize | ||
575 | this data automatically in their | ||
576 | .Fn init | ||
577 | function. | ||
578 | .Pp | ||
579 | .Fn EVP_PKEY_CTX_set_data | ||
580 | transfers ownership of the given | ||
581 | .Fa data | ||
582 | to | ||
583 | .Fa ctx , | ||
584 | replacing the existing algorithm- and implementation-specific | ||
585 | private key data. | ||
586 | It is the responsibility of the caller to free the existing data | ||
587 | before calling this function. | ||
542 | .Sh RETURN VALUES | 588 | .Sh RETURN VALUES |
543 | .Fn EVP_PKEY_meth_new | 589 | .Fn EVP_PKEY_meth_new |
544 | returns a pointer to a new | 590 | returns a pointer to a new |
@@ -556,6 +602,10 @@ if no matching object is found. | |||
556 | .Pp | 602 | .Pp |
557 | .Fn EVP_PKEY_meth_add0 | 603 | .Fn EVP_PKEY_meth_add0 |
558 | returns 1 if the method is added successfully or 0 if an error occurred. | 604 | returns 1 if the method is added successfully or 0 if an error occurred. |
605 | .Pp | ||
606 | .Fn EVP_PKEY_CTX_get_data | ||
607 | returns an internal pointer owned by | ||
608 | .Fa ctx . | ||
559 | .Sh SEE ALSO | 609 | .Sh SEE ALSO |
560 | .Xr EVP_DigestInit 3 , | 610 | .Xr EVP_DigestInit 3 , |
561 | .Xr EVP_PKEY_meth_get0_info 3 , | 611 | .Xr EVP_PKEY_meth_get0_info 3 , |
@@ -578,8 +628,10 @@ returns 1 if the method is added successfully or 0 if an error occurred. | |||
578 | .Fn EVP_PKEY_meth_set_encrypt , | 628 | .Fn EVP_PKEY_meth_set_encrypt , |
579 | .Fn EVP_PKEY_meth_set_decrypt , | 629 | .Fn EVP_PKEY_meth_set_decrypt , |
580 | .Fn EVP_PKEY_meth_set_derive , | 630 | .Fn EVP_PKEY_meth_set_derive , |
631 | .Fn EVP_PKEY_meth_set_ctrl , | ||
632 | .Fn EVP_PKEY_CTX_get_data , | ||
581 | and | 633 | and |
582 | .Fn EVP_PKEY_meth_set_ctrl | 634 | .Fn EVP_PKEY_CTX_set_data |
583 | first appeared in OpenSSL 1.0.0 and have been available since | 635 | first appeared in OpenSSL 1.0.0 and have been available since |
584 | .Ox 4.9 . | 636 | .Ox 4.9 . |
585 | .Pp | 637 | .Pp |