2
0

EVP_PKEY_get_default_digest_nid.pod 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. =pod
  2. =head1 NAME
  3. EVP_PKEY_get_default_digest_nid - get default signature digest
  4. =head1 SYNOPSIS
  5. #include <openssl/evp.h>
  6. int EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid);
  7. =head1 DESCRIPTION
  8. The EVP_PKEY_get_default_digest_nid() function sets B<pnid> to the default
  9. message digest NID for the public key signature operations associated with key
  10. B<pkey>. Note that some signature algorithms (i.e. Ed25519 and Ed448) do not use
  11. a digest during signing. In this case B<pnid> will be set to NID_undef.
  12. =head1 NOTES
  13. For all current standard OpenSSL public key algorithms SHA256 is returned.
  14. =head1 RETURN VALUES
  15. The EVP_PKEY_get_default_digest_nid() function returns 1 if the message digest
  16. is advisory (that is other digests can be used) and 2 if it is mandatory (other
  17. digests can not be used). It returns 0 or a negative value for failure. In
  18. particular a return value of -2 indicates the operation is not supported by the
  19. public key algorithm.
  20. =head1 SEE ALSO
  21. L<EVP_PKEY_CTX_new(3)>,
  22. L<EVP_PKEY_sign(3)>,
  23. L<EVP_PKEY_supports_digest_nid(3)>,
  24. L<EVP_PKEY_verify(3)>,
  25. L<EVP_PKEY_verify_recover(3)>,
  26. =head1 HISTORY
  27. This function was first added to OpenSSL 1.0.0.
  28. =head1 COPYRIGHT
  29. Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved.
  30. Licensed under the Apache License 2.0 (the "License"). You may not use
  31. this file except in compliance with the License. You can obtain a copy
  32. in the file LICENSE in the source distribution or at
  33. L<https://www.openssl.org/source/license.html>.
  34. =cut