From afcb077ec918d8097ac3b454d3ebbba4420c3f95 Mon Sep 17 00:00:00 2001 From: schwarze <> Date: Tue, 19 Oct 2021 16:27:47 +0000 Subject: more precision, fewer words --- src/lib/libcrypto/man/EVP_PKEY_cmp.3 | 71 ++++++++++++++++++++++-------------- 1 file changed, 43 insertions(+), 28 deletions(-) (limited to 'src/lib') 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 @@ -.\" $OpenBSD: EVP_PKEY_cmp.3,v 1.10 2019/06/06 01:06:58 schwarze Exp $ -.\" OpenSSL 05ea606a May 20 20:52:46 2016 -0400 +.\" $OpenBSD: EVP_PKEY_cmp.3,v 1.11 2021/10/19 16:27:47 schwarze Exp $ +.\" full merge up to: OpenSSL 05ea606a May 20 20:52:46 2016 -0400 +.\" selective merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 .\" -.\" This file was written by Dr. Stephen Henson . +.\" This file is a derived work. +.\" The changes are covered by the following Copyright and license: +.\" +.\" Copyright (c) 2021 Ingo Schwarze +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.\" The original file was written by Dr. Stephen Henson . .\" Copyright (c) 2006, 2013, 2014, 2016 The OpenSSL Project. .\" All rights reserved. .\" @@ -49,7 +67,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED .\" OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: June 6 2019 $ +.Dd $Mdocdate: October 19 2021 $ .Dt EVP_PKEY_CMP 3 .Os .Sh NAME @@ -66,8 +84,8 @@ .Fc .Ft int .Fo EVP_PKEY_copy_parameters -.Fa "EVP_PKEY *to" -.Fa "const EVP_PKEY *from" +.Fa "EVP_PKEY *destination" +.Fa "const EVP_PKEY *source" .Fc .Ft int .Fo EVP_PKEY_cmp_parameters @@ -80,35 +98,31 @@ .Fa "const EVP_PKEY *b" .Fc .Sh DESCRIPTION -The function .Fn EVP_PKEY_missing_parameters -returns 1 if the public key parameters of -.Fa pkey -are missing and 0 if they are present or the algorithm doesn't use -parameters. +checks whether any public key parameters are missing from +.Fa pkey . .Pp -The function .Fn EVP_PKEY_copy_parameters -copies the parameters from key -.Fa from -to key -.Fa to . -An error is returned if the parameters are missing in -.Fa from . +copies all public key parameters from the +.Fa source +to the +.Fa destination . +If the algorithm does not use parameters, no action occurs. .Pp -The function .Fn EVP_PKEY_cmp_parameters -compares the parameters of keys +compares the public key parameters of .Fa a and .Fa b . +This is only supported for algorithms that use parameters. .Pp -The function .Fn EVP_PKEY_cmp -compares the public key components and parameters (if present) of keys +compares the public key components of .Fa a and .Fa b . +If the algorithm uses public key parameters, +it also compares the parameters. .Pp The main purpose of the functions .Fn EVP_PKEY_missing_parameters @@ -123,18 +137,19 @@ function .Fn EVP_PKEY_cmp can also be used to determine if a private key matches a public key. .Sh RETURN VALUES -The function .Fn EVP_PKEY_missing_parameters returns 1 if the public key parameters of .Fa pkey -are missing and 0 if they are present or the algorithm doesn't use -parameters. +are missing or incomplete or 0 if they are present and complete +or if the algorithm doesn't use parameters. .Pp -The function .Fn EVP_PKEY_copy_parameters -returns 1 for success and 0 for failure. +returns 1 for success or 0 for failure. +In particular, it fails if the key types mismatch or if the public +key parameters in the +.Fa source +are missing or incomplete. .Pp -The functions .Fn EVP_PKEY_cmp_parameters and .Fn EVP_PKEY_cmp -- cgit v1.2.3-55-g6feb