summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2021-10-19 16:27:48 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2021-10-19 16:27:48 +0000
commitfc651d5f57463621dcf67bb54013400ad756b357 (patch)
treee4bad8cfe685d1ac0df3b82d08932872a429cc54 /lib
parent27b24ee98ed42b29bf18f59412e38928a097472c (diff)
more precision, fewer words
Diffstat (limited to 'lib')
-rw-r--r--lib/libcrypto/man/EVP_PKEY_cmp.371
1 files changed, 43 insertions, 28 deletions
diff --git a/lib/libcrypto/man/EVP_PKEY_cmp.3 b/lib/libcrypto/man/EVP_PKEY_cmp.3
index 5226ec58fa7..e377ccdb500 100644
--- a/lib/libcrypto/man/EVP_PKEY_cmp.3
+++ b/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 <steve@openssl.org>.
+.\" This file is a derived work.
+.\" The changes are covered by the following Copyright and license:
+.\"
+.\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org>
+.\"
+.\" 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 <steve@openssl.org>.
.\" 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