[#PKCS8_get_attr]
= PKCS8&lowbar;get&lowbar;attr
:mrdocs:

Retrieve a PKCS&num;8 private&hyphen;key attribute by NID&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:ASN1_TYPE.adoc[ASN1&lowbar;TYPE]*
PKCS8&lowbar;get&lowbar;attr(
    xref:PKCS8_PRIV_KEY_INFO.adoc[PKCS8&lowbar;PRIV&lowbar;KEY&lowbar;INFO]* p8,
    int attr&lowbar;nid);
----

== Return Value

Attribute value, or NULL if absent or on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *p8*
| PKCS&num;8 private key info structure&period;
| *attr&lowbar;nid*
| NID of the attribute to retrieve&period;
|===


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