5 EVP_PKEY_get_default_digest_nid - get default signature digest
9 #include <openssl/evp.h>
10 int EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid);
14 The EVP_PKEY_get_default_digest_nid() function sets B<pnid> to the default
15 message digest NID for the public key signature operations associated with key
20 For all current standard OpenSSL public key algorithms SHA1 is returned.
24 The EVP_PKEY_get_default_digest_nid() function returns 1 if the message digest
25 is advisory (that is other digests can be used) and 2 if it is mandatory (other
26 digests can not be used). It returns 0 or a negative value for failure. In
27 particular a return value of -2 indicates the operation is not supported by the
32 L<EVP_PKEY_CTX_new(3)|EVP_PKEY_CTX_new(3)>,
33 L<EVP_PKEY_sign(3)|EVP_PKEY_sign(3)>,
34 L<EVP_PKEY_verify(3)|EVP_PKEY_verify(3)>,
35 L<EVP_PKEY_verify_recover(3)|EVP_PKEY_verify_recover(3)>,
39 This function was first added to OpenSSL 1.0.0.