2
0

EVP_PKEY_cmp.pod 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. =pod
  2. =head1 NAME
  3. EVP_PKEY_copy_parameters, EVP_PKEY_missing_parameters, EVP_PKEY_cmp_parameters,
  4. EVP_PKEY_cmp - public key parameter and comparison functions
  5. =head1 SYNOPSIS
  6. #include <openssl/evp.h>
  7. int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey);
  8. int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from);
  9. int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b);
  10. int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b);
  11. =head1 DESCRIPTION
  12. The function EVP_PKEY_missing_parameters() returns 1 if the public key
  13. parameters of B<pkey> are missing and 0 if they are present or the algorithm
  14. doesn't use parameters.
  15. The function EVP_PKEY_copy_parameters() copies the parameters from key
  16. B<from> to key B<to>. An error is returned if the parameters are missing in
  17. B<from> or present in both B<from> and B<to> and mismatch. If the parameters
  18. in B<from> and B<to> are both present and match this function has no effect.
  19. The function EVP_PKEY_cmp_parameters() compares the parameters of keys
  20. B<a> and B<b>.
  21. The function EVP_PKEY_cmp() compares the public key components and parameters
  22. (if present) of keys B<a> and B<b>.
  23. =head1 NOTES
  24. The main purpose of the functions EVP_PKEY_missing_parameters() and
  25. EVP_PKEY_copy_parameters() is to handle public keys in certificates where the
  26. parameters are sometimes omitted from a public key if they are inherited from
  27. the CA that signed it.
  28. Since OpenSSL private keys contain public key components too the function
  29. EVP_PKEY_cmp() can also be used to determine if a private key matches
  30. a public key.
  31. =head1 RETURN VALUES
  32. The function EVP_PKEY_missing_parameters() returns 1 if the public key
  33. parameters of B<pkey> are missing and 0 if they are present or the algorithm
  34. doesn't use parameters.
  35. These functions EVP_PKEY_copy_parameters() returns 1 for success and 0 for
  36. failure.
  37. The function EVP_PKEY_cmp_parameters() and EVP_PKEY_cmp() return 1 if the
  38. keys match, 0 if they don't match, -1 if the key types are different and
  39. -2 if the operation is not supported.
  40. =head1 SEE ALSO
  41. L<EVP_PKEY_CTX_new(3)>,
  42. L<EVP_PKEY_keygen(3)>
  43. =head1 COPYRIGHT
  44. Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved.
  45. Licensed under the OpenSSL license (the "License"). You may not use
  46. this file except in compliance with the License. You can obtain a copy
  47. in the file LICENSE in the source distribution or at
  48. L<https://www.openssl.org/source/license.html>.
  49. =cut