Add documentation for the BIO_s_mem pecularities
[openssl.git] / doc / man3 / EVP_PKEY_supports_digest_nid.pod
1 =pod
2
3 =head1 NAME
4
5 EVP_PKEY_supports_digest_nid - indicate support for signature digest
6
7 =head1 SYNOPSIS
8
9  #include <openssl/evp.h>
10  int EVP_PKEY_supports_digest_nid(EVP_PKEY *pkey, int nid);
11
12 =head1 DESCRIPTION
13
14 The EVP_PKEY_supports_digest_nid() function queries whether the message digest
15 NID B<nid> is supported for public key signature operations associated with key
16 B<pkey>.
17
18 =head1 NOTES
19
20 If the EVP_PKEY implementation does not explicitly support this method, but
21 L<EVP_PKEY_get_default_digest_nid(3)> returns a mandatory digest result, then
22 only that mandatory digest will be supported.
23
24 =head1 RETURN VALUES
25
26 The EVP_PKEY_supports_digest_nid() function returns 1 if the message digest
27 algorithm identified by B<nid> can be used for public key signature operations
28 associated with key B<pkey> and 0 if it cannot be used. It returns a negative
29 value for failure. In particular a return value of -2 indicates the query
30 operation is not supported by the public key algorithm.
31
32 =head1 SEE ALSO
33
34 L<EVP_PKEY_CTX_new(3)>,
35 L<EVP_PKEY_get_default_digest_nid(3)>,
36 L<EVP_PKEY_sign(3)>,
37 L<EVP_PKEY_verify(3)>,
38 L<EVP_PKEY_verify_recover(3)>,
39
40 =head1 HISTORY
41
42 The EVP_PKEY_supports_digest_nid() function was added in OpenSSL 3.0.0.
43
44 =head1 COPYRIGHT
45
46 Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved.
47
48 Licensed under the Apache License 2.0 (the "License").  You may not use
49 this file except in compliance with the License.  You can obtain a copy
50 in the file LICENSE in the source distribution or at
51 L<https://www.openssl.org/source/license.html>.
52
53 =cut