[#EVP_PKEY_get_default_digest_nid]
= EVP&lowbar;PKEY&lowbar;get&lowbar;default&lowbar;digest&lowbar;nid
:mrdocs:

Return the default message&hyphen;digest NID associated with `pkey&period;`

== Synopsis

Declared in `&lt;openssl&sol;evp&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;PKEY&lowbar;get&lowbar;default&lowbar;digest&lowbar;nid(
    xref:EVP_PKEY.adoc[EVP&lowbar;PKEY]* pkey,
    int* pnid);
----

== Return Value

1 if an advisory default was returned, 2 if the digest is mandatory, or a non&hyphen;positive value on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *pkey*
| Key whose signature defaults are queried&period;
| *pnid*
| Receives the NID (for example NID&lowbar;sha256), or NID&lowbar;undef when unrestricted&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
