EVP_PKEY_cmp.pod 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. =pod
  2. =head1 NAME
  3. EVP_PKEY_copy_parameters, EVP_PKEY_missing_parameters, EVP_PKEY_cmp_parameters, EVP_PKEY_cmp - public key parameter and comparison functions
  4. =head1 SYNOPSIS
  5. #include <openssl/evp.h>
  6. int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey);
  7. int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from);
  8. int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b);
  9. int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b);
  10. =head1 DESCRIPTION
  11. The function EVP_PKEY_missing_parameters() returns 1 if the public key
  12. parameters of B<pkey> are missing and 0 if they are present or the algorithm
  13. doesn't use parameters.
  14. The function EVP_PKEY_copy_parameters() copies the parameters from key
  15. B<from> to key B<to>.
  16. The funcion EVP_PKEY_cmp_parameters() compares the parameters of keys
  17. B<a> and B<b>.
  18. The funcion EVP_PKEY_cmp() compares the public key components and paramters
  19. (if present) of keys B<a> and B<b>.
  20. =head1 NOTES
  21. The main purpose of the functions EVP_PKEY_missing_parameters() and
  22. EVP_PKEY_copy_parameters() is to handle public keys in certificates where the
  23. parameters are sometimes omitted from a public key if they are inherited from
  24. the CA that signed it.
  25. Since OpenSSL private keys contain public key components too the function
  26. EVP_PKEY_cmp() can also be used to determine if a private key matches
  27. a public key.
  28. =head1 RETURN VALUES
  29. The function EVP_PKEY_missing_parameters() returns 1 if the public key
  30. parameters of B<pkey> are missing and 0 if they are present or the algorithm
  31. doesn't use parameters.
  32. These functions EVP_PKEY_copy_parameters() returns 1 for success and 0 for
  33. failure.
  34. The function EVP_PKEY_cmp_parameters() and EVP_PKEY_cmp() return 1 if the
  35. keys match, 0 if they don't match, -1 if the key types are different and
  36. -2 if the operation is not supported.
  37. =head1 SEE ALSO
  38. L<EVP_PKEY_CTX_new(3)|EVP_PKEY_CTX_new(3)>,
  39. L<EVP_PKEY_keygen(3)|EVP_PKEY_keygen(3)>
  40. =cut