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