EVP_PKEY_cmp.pod revision 238384
1193323Sed=pod 2193323Sed 3193323Sed=head1 NAME 4193323Sed 5193323SedEVP_PKEY_copy_parameters, EVP_PKEY_missing_parameters, EVP_PKEY_cmp_parameters, EVP_PKEY_cmp - public key parameter and comparison functions 6193323Sed 7193323Sed=head1 SYNOPSIS 8193323Sed 9193323Sed #include <openssl/evp.h> 10193323Sed 11193323Sed int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey); 12193323Sed int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from); 13193323Sed 14193323Sed int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b); 15193323Sed int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b); 16193323Sed 17193323Sed=head1 DESCRIPTION 18193323Sed 19193323SedThe function EVP_PKEY_missing_parameters() returns 1 if the public key 20193323Sedparameters of B<pkey> are missing and 0 if they are present or the algorithm 21193323Seddoesn't use parameters. 22193323Sed 23193323SedThe function EVP_PKEY_copy_parameters() copies the parameters from key 24193323SedB<from> to key B<to>. 25193323Sed 26193323SedThe funcion EVP_PKEY_cmp_parameters() compares the parameters of keys 27193323SedB<a> and B<b>. 28193323Sed 29193323SedThe funcion EVP_PKEY_cmp() compares the public key components and paramters 30193323Sed(if present) of keys B<a> and B<b>. 31193323Sed 32249423Sdim=head1 NOTES 33249423Sdim 34193323SedThe main purpose of the functions EVP_PKEY_missing_parameters() and 35266715SdimEVP_PKEY_copy_parameters() is to handle public keys in certificates where the 36193323Sedparameters are sometimes omitted from a public key if they are inherited from 37193323Sedthe CA that signed it. 38249423Sdim 39249423SdimSince OpenSSL private keys contain public key components too the function 40249423SdimEVP_PKEY_cmp() can also be used to determine if a private key matches 41249423Sdima public key. 42249423Sdim 43198090Srdivacky=head1 RETURN VALUES 44193323Sed 45193323SedThe function EVP_PKEY_missing_parameters() returns 1 if the public key 46193323Sedparameters of B<pkey> are missing and 0 if they are present or the algorithm 47193323Seddoesn't use parameters. 48193323Sed 49198090SrdivackyThese functions EVP_PKEY_copy_parameters() returns 1 for success and 0 for 50193323Sedfailure. 51218893Sdim 52218893SdimThe function EVP_PKEY_cmp_parameters() and EVP_PKEY_cmp() return 1 if the 53218893Sdimkeys match, 0 if they don't match, -1 if the key types are different and 54193323Sed-2 if the operation is not supported. 55193323Sed 56193323Sed=head1 SEE ALSO 57243830Sdim 58243830SdimL<EVP_PKEY_CTX_new(3)|EVP_PKEY_CTX_new(3)>, 59193323SedL<EVP_PKEY_keygen(3)|EVP_PKEY_keygen(3)> 60198090Srdivacky 61193323Sed=cut 62193323Sed