]>
Commit | Line | Data |
---|---|---|
7441052b DSH |
1 | =pod |
2 | ||
3 | =head1 NAME | |
4 | ||
5 | EVP_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 | ||
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 | |
aabbc24e MC |
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. | |
7441052b DSH |
18 | |
19 | =head1 NOTES | |
20 | ||
21 | For all current standard OpenSSL public key algorithms SHA1 is returned. | |
22 | ||
23 | =head1 RETURN VALUES | |
24 | ||
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 | |
29 | public key algorithm. | |
30 | ||
31 | =head1 SEE ALSO | |
32 | ||
9b86974e RS |
33 | L<EVP_PKEY_CTX_new(3)>, |
34 | L<EVP_PKEY_sign(3)>, | |
35 | L<EVP_PKEY_verify(3)>, | |
36 | L<EVP_PKEY_verify_recover(3)>, | |
7441052b DSH |
37 | |
38 | =head1 HISTORY | |
39 | ||
fb552ac6 | 40 | This function was first added to OpenSSL 1.0.0. |
7441052b | 41 | |
e2f92610 RS |
42 | =head1 COPYRIGHT |
43 | ||
1212818e | 44 | Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved. |
e2f92610 RS |
45 | |
46 | Licensed under the OpenSSL license (the "License"). You may not use | |
47 | this file except in compliance with the License. You can obtain a copy | |
48 | in the file LICENSE in the source distribution or at | |
49 | L<https://www.openssl.org/source/license.html>. | |
50 | ||
51 | =cut |