]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/man3/EVP_PKEY_get_default_digest_nid.pod
Restore sensible "sess_accept" counter tracking
[thirdparty/openssl.git] / doc / man3 / EVP_PKEY_get_default_digest_nid.pod
CommitLineData
7441052b
DSH
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
aabbc24e
MC
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.
7441052b
DSH
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
9b86974e
RS
33L<EVP_PKEY_CTX_new(3)>,
34L<EVP_PKEY_sign(3)>,
35L<EVP_PKEY_verify(3)>,
36L<EVP_PKEY_verify_recover(3)>,
7441052b
DSH
37
38=head1 HISTORY
39
fb552ac6 40This function was first added to OpenSSL 1.0.0.
7441052b 41
e2f92610
RS
42=head1 COPYRIGHT
43
1212818e 44Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved.
e2f92610
RS
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