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
16 B<pkey>. Note that some signature algorithms (i.e. Ed25519 and Ed448) do not use
17 a digest during signing. In this case B<pnid> will be set to NID_undef.
21 For all current standard OpenSSL public key algorithms SHA256 is returned.
25 The EVP_PKEY_get_default_digest_nid() function returns 1 if the message digest
26 is advisory (that is other digests can be used) and 2 if it is mandatory (other
27 digests can not be used). It returns 0 or a negative value for failure. In
28 particular a return value of -2 indicates the operation is not supported by the
33 L<EVP_PKEY_CTX_new(3)>,
35 L<EVP_PKEY_supports_digest_nid(3)>,
36 L<EVP_PKEY_verify(3)>,
37 L<EVP_PKEY_verify_recover(3)>,
41 This function was added in OpenSSL 1.0.0.
45 Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved.
47 Licensed under the Apache License 2.0 (the "License"). You may not use
48 this file except in compliance with the License. You can obtain a copy
49 in the file LICENSE in the source distribution or at
50 L<https://www.openssl.org/source/license.html>.