EVP_PKEY_supports_digest_nid.pod 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. =pod
  2. =head1 NAME
  3. EVP_PKEY_supports_digest_nid - indicate support for signature digest
  4. =head1 SYNOPSIS
  5. #include <openssl/evp.h>
  6. int EVP_PKEY_supports_digest_nid(EVP_PKEY *pkey, int nid);
  7. =head1 DESCRIPTION
  8. The EVP_PKEY_supports_digest_nid() function queries whether the message digest
  9. NID B<nid> is supported for public key signature operations associated with key
  10. B<pkey>.
  11. =head1 NOTES
  12. If the EVP_PKEY implementation does not explicitly support this method, but
  13. L<EVP_PKEY_get_default_digest_nid(3)> returns a mandatory digest result, then
  14. only that mandatory digest will be supported.
  15. =head1 RETURN VALUES
  16. The EVP_PKEY_supports_digest_nid() function returns 1 if the message digest
  17. algorithm identified by B<nid> can be used for public key signature operations
  18. associated with key B<pkey> and 0 if it cannot be used. It returns a negative
  19. value for failure. In particular a return value of -2 indicates the query
  20. operation is not supported by the public key algorithm.
  21. =head1 SEE ALSO
  22. L<EVP_PKEY_CTX_new(3)>,
  23. L<EVP_PKEY_get_default_digest_nid(3)>,
  24. L<EVP_PKEY_sign(3)>,
  25. L<EVP_PKEY_verify(3)>,
  26. L<EVP_PKEY_verify_recover(3)>,
  27. =head1 HISTORY
  28. The EVP_PKEY_supports_digest_nid() function was added in OpenSSL 3.0.0.
  29. =head1 COPYRIGHT
  30. Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved.
  31. Licensed under the Apache License 2.0 (the "License"). You may not use
  32. this file except in compliance with the License. You can obtain a copy
  33. in the file LICENSE in the source distribution or at
  34. L<https://www.openssl.org/source/license.html>.
  35. =cut