summaryrefslogtreecommitdiff
path: root/src/lib/libc
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/libcrypto/man/EVP_PKEY_cmp.371
1 files changed, 43 insertions, 28 deletions
diff --git a/src/lib/libcrypto/man/EVP_PKEY_cmp.3 b/src/lib/libcrypto/man/EVP_PKEY_cmp.3
index 5226ec58fa..e377ccdb50 100644
--- a/src/lib/libcrypto/man/EVP_PKEY_cmp.3
+++ b/src/lib/libcrypto/man/EVP_PKEY_cmp.3
@@ -1,7 +1,25 @@
1.\" $OpenBSD: EVP_PKEY_cmp.3,v 1.10 2019/06/06 01:06:58 schwarze Exp $ 1.\" $OpenBSD: EVP_PKEY_cmp.3,v 1.11 2021/10/19 16:27:47 schwarze Exp $
2.\" OpenSSL 05ea606a May 20 20:52:46 2016 -0400 2.\" full merge up to: OpenSSL 05ea606a May 20 20:52:46 2016 -0400
3.\" selective merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
3.\" 4.\"
4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>. 5.\" This file is a derived work.
6.\" The changes are covered by the following Copyright and license:
7.\"
8.\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org>
9.\"
10.\" Permission to use, copy, modify, and distribute this software for any
11.\" purpose with or without fee is hereby granted, provided that the above
12.\" copyright notice and this permission notice appear in all copies.
13.\"
14.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
15.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
16.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
17.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
18.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
19.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
20.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21.\"
22.\" The original file was written by Dr. Stephen Henson <steve@openssl.org>.
5.\" Copyright (c) 2006, 2013, 2014, 2016 The OpenSSL Project. 23.\" Copyright (c) 2006, 2013, 2014, 2016 The OpenSSL Project.
6.\" All rights reserved. 24.\" All rights reserved.
7.\" 25.\"
@@ -49,7 +67,7 @@
49.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 67.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
50.\" OF THE POSSIBILITY OF SUCH DAMAGE. 68.\" OF THE POSSIBILITY OF SUCH DAMAGE.
51.\" 69.\"
52.Dd $Mdocdate: June 6 2019 $ 70.Dd $Mdocdate: October 19 2021 $
53.Dt EVP_PKEY_CMP 3 71.Dt EVP_PKEY_CMP 3
54.Os 72.Os
55.Sh NAME 73.Sh NAME
@@ -66,8 +84,8 @@
66.Fc 84.Fc
67.Ft int 85.Ft int
68.Fo EVP_PKEY_copy_parameters 86.Fo EVP_PKEY_copy_parameters
69.Fa "EVP_PKEY *to" 87.Fa "EVP_PKEY *destination"
70.Fa "const EVP_PKEY *from" 88.Fa "const EVP_PKEY *source"
71.Fc 89.Fc
72.Ft int 90.Ft int
73.Fo EVP_PKEY_cmp_parameters 91.Fo EVP_PKEY_cmp_parameters
@@ -80,35 +98,31 @@
80.Fa "const EVP_PKEY *b" 98.Fa "const EVP_PKEY *b"
81.Fc 99.Fc
82.Sh DESCRIPTION 100.Sh DESCRIPTION
83The function
84.Fn EVP_PKEY_missing_parameters 101.Fn EVP_PKEY_missing_parameters
85returns 1 if the public key parameters of 102checks whether any public key parameters are missing from
86.Fa pkey 103.Fa pkey .
87are missing and 0 if they are present or the algorithm doesn't use
88parameters.
89.Pp 104.Pp
90The function
91.Fn EVP_PKEY_copy_parameters 105.Fn EVP_PKEY_copy_parameters
92copies the parameters from key 106copies all public key parameters from the
93.Fa from 107.Fa source
94to key 108to the
95.Fa to . 109.Fa destination .
96An error is returned if the parameters are missing in 110If the algorithm does not use parameters, no action occurs.
97.Fa from .
98.Pp 111.Pp
99The function
100.Fn EVP_PKEY_cmp_parameters 112.Fn EVP_PKEY_cmp_parameters
101compares the parameters of keys 113compares the public key parameters of
102.Fa a 114.Fa a
103and 115and
104.Fa b . 116.Fa b .
117This is only supported for algorithms that use parameters.
105.Pp 118.Pp
106The function
107.Fn EVP_PKEY_cmp 119.Fn EVP_PKEY_cmp
108compares the public key components and parameters (if present) of keys 120compares the public key components of
109.Fa a 121.Fa a
110and 122and
111.Fa b . 123.Fa b .
124If the algorithm uses public key parameters,
125it also compares the parameters.
112.Pp 126.Pp
113The main purpose of the functions 127The main purpose of the functions
114.Fn EVP_PKEY_missing_parameters 128.Fn EVP_PKEY_missing_parameters
@@ -123,18 +137,19 @@ function
123.Fn EVP_PKEY_cmp 137.Fn EVP_PKEY_cmp
124can also be used to determine if a private key matches a public key. 138can also be used to determine if a private key matches a public key.
125.Sh RETURN VALUES 139.Sh RETURN VALUES
126The function
127.Fn EVP_PKEY_missing_parameters 140.Fn EVP_PKEY_missing_parameters
128returns 1 if the public key parameters of 141returns 1 if the public key parameters of
129.Fa pkey 142.Fa pkey
130are missing and 0 if they are present or the algorithm doesn't use 143are missing or incomplete or 0 if they are present and complete
131parameters. 144or if the algorithm doesn't use parameters.
132.Pp 145.Pp
133The function
134.Fn EVP_PKEY_copy_parameters 146.Fn EVP_PKEY_copy_parameters
135returns 1 for success and 0 for failure. 147returns 1 for success or 0 for failure.
148In particular, it fails if the key types mismatch or if the public
149key parameters in the
150.Fa source
151are missing or incomplete.
136.Pp 152.Pp
137The functions
138.Fn EVP_PKEY_cmp_parameters 153.Fn EVP_PKEY_cmp_parameters
139and 154and
140.Fn EVP_PKEY_cmp 155.Fn EVP_PKEY_cmp