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