diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/man/EVP_PKEY_cmp.3 | 71 |
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 |
83 | The function | ||
84 | .Fn EVP_PKEY_missing_parameters | 101 | .Fn EVP_PKEY_missing_parameters |
85 | returns 1 if the public key parameters of | 102 | checks whether any public key parameters are missing from |
86 | .Fa pkey | 103 | .Fa pkey . |
87 | are missing and 0 if they are present or the algorithm doesn't use | ||
88 | parameters. | ||
89 | .Pp | 104 | .Pp |
90 | The function | ||
91 | .Fn EVP_PKEY_copy_parameters | 105 | .Fn EVP_PKEY_copy_parameters |
92 | copies the parameters from key | 106 | copies all public key parameters from the |
93 | .Fa from | 107 | .Fa source |
94 | to key | 108 | to the |
95 | .Fa to . | 109 | .Fa destination . |
96 | An error is returned if the parameters are missing in | 110 | If the algorithm does not use parameters, no action occurs. |
97 | .Fa from . | ||
98 | .Pp | 111 | .Pp |
99 | The function | ||
100 | .Fn EVP_PKEY_cmp_parameters | 112 | .Fn EVP_PKEY_cmp_parameters |
101 | compares the parameters of keys | 113 | compares the public key parameters of |
102 | .Fa a | 114 | .Fa a |
103 | and | 115 | and |
104 | .Fa b . | 116 | .Fa b . |
117 | This is only supported for algorithms that use parameters. | ||
105 | .Pp | 118 | .Pp |
106 | The function | ||
107 | .Fn EVP_PKEY_cmp | 119 | .Fn EVP_PKEY_cmp |
108 | compares the public key components and parameters (if present) of keys | 120 | compares the public key components of |
109 | .Fa a | 121 | .Fa a |
110 | and | 122 | and |
111 | .Fa b . | 123 | .Fa b . |
124 | If the algorithm uses public key parameters, | ||
125 | it also compares the parameters. | ||
112 | .Pp | 126 | .Pp |
113 | The main purpose of the functions | 127 | The 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 |
124 | can also be used to determine if a private key matches a public key. | 138 | can also be used to determine if a private key matches a public key. |
125 | .Sh RETURN VALUES | 139 | .Sh RETURN VALUES |
126 | The function | ||
127 | .Fn EVP_PKEY_missing_parameters | 140 | .Fn EVP_PKEY_missing_parameters |
128 | returns 1 if the public key parameters of | 141 | returns 1 if the public key parameters of |
129 | .Fa pkey | 142 | .Fa pkey |
130 | are missing and 0 if they are present or the algorithm doesn't use | 143 | are missing or incomplete or 0 if they are present and complete |
131 | parameters. | 144 | or if the algorithm doesn't use parameters. |
132 | .Pp | 145 | .Pp |
133 | The function | ||
134 | .Fn EVP_PKEY_copy_parameters | 146 | .Fn EVP_PKEY_copy_parameters |
135 | returns 1 for success and 0 for failure. | 147 | returns 1 for success or 0 for failure. |
148 | In particular, it fails if the key types mismatch or if the public | ||
149 | key parameters in the | ||
150 | .Fa source | ||
151 | are missing or incomplete. | ||
136 | .Pp | 152 | .Pp |
137 | The functions | ||
138 | .Fn EVP_PKEY_cmp_parameters | 153 | .Fn EVP_PKEY_cmp_parameters |
139 | and | 154 | and |
140 | .Fn EVP_PKEY_cmp | 155 | .Fn EVP_PKEY_cmp |