Blame doc/man3/EVP_PKEY_get_default_digest_nid.pod

Packit c4476c
=pod
Packit c4476c
Packit c4476c
=head1 NAME
Packit c4476c
Packit c4476c
EVP_PKEY_get_default_digest_nid - get default signature digest
Packit c4476c
Packit c4476c
=head1 SYNOPSIS
Packit c4476c
Packit c4476c
 #include <openssl/evp.h>
Packit c4476c
 int EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid);
Packit c4476c
Packit c4476c
=head1 DESCRIPTION
Packit c4476c
Packit c4476c
The EVP_PKEY_get_default_digest_nid() function sets B<pnid> to the default
Packit c4476c
message digest NID for the public key signature operations associated with key
Packit c4476c
B<pkey>. Note that some signature algorithms (i.e. Ed25519 and Ed448) do not use
Packit c4476c
a digest during signing. In this case B<pnid> will be set to NID_undef.
Packit c4476c
Packit c4476c
=head1 NOTES
Packit c4476c
Packit c4476c
For all current standard OpenSSL public key algorithms SHA1 is returned.
Packit c4476c
Packit c4476c
=head1 RETURN VALUES
Packit c4476c
Packit c4476c
The EVP_PKEY_get_default_digest_nid() function returns 1 if the message digest
Packit c4476c
is advisory (that is other digests can be used) and 2 if it is mandatory (other
Packit c4476c
digests can not be used).  It returns 0 or a negative value for failure. In
Packit c4476c
particular a return value of -2 indicates the operation is not supported by the
Packit c4476c
public key algorithm.
Packit c4476c
Packit c4476c
=head1 SEE ALSO
Packit c4476c
Packit c4476c
L<EVP_PKEY_CTX_new(3)>,
Packit c4476c
L<EVP_PKEY_sign(3)>,
Packit c4476c
L<EVP_PKEY_verify(3)>,
Packit c4476c
L<EVP_PKEY_verify_recover(3)>,
Packit c4476c
Packit c4476c
=head1 HISTORY
Packit c4476c
Packit c4476c
This function was added in OpenSSL 1.0.0.
Packit c4476c
Packit c4476c
=head1 COPYRIGHT
Packit c4476c
Packit c4476c
Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved.
Packit c4476c
Packit c4476c
Licensed under the OpenSSL license (the "License").  You may not use
Packit c4476c
this file except in compliance with the License.  You can obtain a copy
Packit c4476c
in the file LICENSE in the source distribution or at
Packit c4476c
L<https://www.openssl.org/source/license.html>.
Packit c4476c
Packit c4476c
=cut