1238384Sjkim=pod 2238384Sjkim 3238384Sjkim=head1 NAME 4238384Sjkim 5238384SjkimEVP_PKEY_copy_parameters, EVP_PKEY_missing_parameters, EVP_PKEY_cmp_parameters, EVP_PKEY_cmp - public key parameter and comparison functions 6238384Sjkim 7238384Sjkim=head1 SYNOPSIS 8238384Sjkim 9238384Sjkim #include <openssl/evp.h> 10238384Sjkim 11238384Sjkim int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey); 12238384Sjkim int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from); 13238384Sjkim 14238384Sjkim int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b); 15238384Sjkim int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b); 16238384Sjkim 17238384Sjkim=head1 DESCRIPTION 18238384Sjkim 19238384SjkimThe function EVP_PKEY_missing_parameters() returns 1 if the public key 20238384Sjkimparameters of B<pkey> are missing and 0 if they are present or the algorithm 21238384Sjkimdoesn't use parameters. 22238384Sjkim 23238384SjkimThe function EVP_PKEY_copy_parameters() copies the parameters from key 24238384SjkimB<from> to key B<to>. 25238384Sjkim 26238384SjkimThe funcion EVP_PKEY_cmp_parameters() compares the parameters of keys 27238384SjkimB<a> and B<b>. 28238384Sjkim 29238384SjkimThe funcion EVP_PKEY_cmp() compares the public key components and paramters 30238384Sjkim(if present) of keys B<a> and B<b>. 31238384Sjkim 32238384Sjkim=head1 NOTES 33238384Sjkim 34238384SjkimThe main purpose of the functions EVP_PKEY_missing_parameters() and 35238384SjkimEVP_PKEY_copy_parameters() is to handle public keys in certificates where the 36238384Sjkimparameters are sometimes omitted from a public key if they are inherited from 37238384Sjkimthe CA that signed it. 38238384Sjkim 39238384SjkimSince OpenSSL private keys contain public key components too the function 40238384SjkimEVP_PKEY_cmp() can also be used to determine if a private key matches 41238384Sjkima public key. 42238384Sjkim 43238384Sjkim=head1 RETURN VALUES 44238384Sjkim 45238384SjkimThe function EVP_PKEY_missing_parameters() returns 1 if the public key 46238384Sjkimparameters of B<pkey> are missing and 0 if they are present or the algorithm 47238384Sjkimdoesn't use parameters. 48238384Sjkim 49238384SjkimThese functions EVP_PKEY_copy_parameters() returns 1 for success and 0 for 50238384Sjkimfailure. 51238384Sjkim 52238384SjkimThe function EVP_PKEY_cmp_parameters() and EVP_PKEY_cmp() return 1 if the 53238384Sjkimkeys match, 0 if they don't match, -1 if the key types are different and 54238384Sjkim-2 if the operation is not supported. 55238384Sjkim 56238384Sjkim=head1 SEE ALSO 57238384Sjkim 58238384SjkimL<EVP_PKEY_CTX_new(3)|EVP_PKEY_CTX_new(3)>, 59238384SjkimL<EVP_PKEY_keygen(3)|EVP_PKEY_keygen(3)> 60238384Sjkim 61238384Sjkim=cut 62