[#EVP_PKEY_get_attr]
= EVP&lowbar;PKEY&lowbar;get&lowbar;attr
:mrdocs:

Return an attribute attached to an EVP&lowbar;PKEY by index&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:X509_ATTRIBUTE.adoc[X509&lowbar;ATTRIBUTE]*
EVP&lowbar;PKEY&lowbar;get&lowbar;attr(
    xref:EVP_PKEY.adoc[EVP&lowbar;PKEY] const* key,
    int loc);
----

== Return Value

Internal X509&lowbar;ATTRIBUTE pointer (do not free), or NULL if `loc` is out of range&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *key*
| Key whose attribute stack is queried&period;
| *loc*
| Zero&hyphen;based attribute index&period;
|===


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