Blame doc/man3/EVP_PKEY_cmp.pod

Packit c4476c
=pod
Packit c4476c
Packit c4476c
=head1 NAME
Packit c4476c
Packit c4476c
EVP_PKEY_copy_parameters, EVP_PKEY_missing_parameters, EVP_PKEY_cmp_parameters,
Packit c4476c
EVP_PKEY_cmp - public key parameter and comparison functions
Packit c4476c
Packit c4476c
=head1 SYNOPSIS
Packit c4476c
Packit c4476c
 #include <openssl/evp.h>
Packit c4476c
Packit c4476c
 int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey);
Packit c4476c
 int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from);
Packit c4476c
Packit c4476c
 int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b);
Packit c4476c
 int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b);
Packit c4476c
Packit c4476c
=head1 DESCRIPTION
Packit c4476c
Packit c4476c
The function EVP_PKEY_missing_parameters() returns 1 if the public key
Packit c4476c
parameters of B<pkey> are missing and 0 if they are present or the algorithm
Packit c4476c
doesn't use parameters.
Packit c4476c
Packit c4476c
The function EVP_PKEY_copy_parameters() copies the parameters from key
Packit c4476c
B<from> to key B<to>. An error is returned if the parameters are missing in
Packit c4476c
B<from> or present in both B<from> and B<to> and mismatch. If the parameters
Packit c4476c
in B<from> and B<to> are both present and match this function has no effect.
Packit c4476c
Packit c4476c
The function EVP_PKEY_cmp_parameters() compares the parameters of keys
Packit c4476c
B and B.
Packit c4476c
Packit c4476c
The function EVP_PKEY_cmp() compares the public key components and parameters
Packit c4476c
(if present) of keys B and B.
Packit c4476c
Packit c4476c
=head1 NOTES
Packit c4476c
Packit c4476c
The main purpose of the functions EVP_PKEY_missing_parameters() and
Packit c4476c
EVP_PKEY_copy_parameters() is to handle public keys in certificates where the
Packit c4476c
parameters are sometimes omitted from a public key if they are inherited from
Packit c4476c
the CA that signed it.
Packit c4476c
Packit c4476c
Since OpenSSL private keys contain public key components too the function
Packit c4476c
EVP_PKEY_cmp() can also be used to determine if a private key matches
Packit c4476c
a public key.
Packit c4476c
Packit c4476c
=head1 RETURN VALUES
Packit c4476c
Packit c4476c
The function EVP_PKEY_missing_parameters() returns 1 if the public key
Packit c4476c
parameters of B<pkey> are missing and 0 if they are present or the algorithm
Packit c4476c
doesn't use parameters.
Packit c4476c
Packit c4476c
These functions EVP_PKEY_copy_parameters() returns 1 for success and 0 for
Packit c4476c
failure.
Packit c4476c
Packit c4476c
The function EVP_PKEY_cmp_parameters() and EVP_PKEY_cmp() return 1 if the
Packit c4476c
keys match, 0 if they don't match, -1 if the key types are different and
Packit c4476c
-2 if the operation is not supported.
Packit c4476c
Packit c4476c
=head1 SEE ALSO
Packit c4476c
Packit c4476c
L<EVP_PKEY_CTX_new(3)>,
Packit c4476c
L<EVP_PKEY_keygen(3)>
Packit c4476c
Packit c4476c
=head1 COPYRIGHT
Packit c4476c
Packit c4476c
Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved.
Packit c4476c
Packit c4476c
Licensed under the OpenSSL license (the "License").  You may not use
Packit c4476c
this file except in compliance with the License.  You can obtain a copy
Packit c4476c
in the file LICENSE in the source distribution or at
Packit c4476c
L<https://www.openssl.org/source/license.html>.
Packit c4476c
Packit c4476c
=cut