[#PKCS12_get_attr_gen]
= PKCS12&lowbar;get&lowbar;attr&lowbar;gen
:mrdocs:

Retrieve an attribute by NID from a stack of X509&lowbar;ATTRIBUTEs&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]*
PKCS12&lowbar;get&lowbar;attr&lowbar;gen(
    xref:stack_st_X509_ATTRIBUTE.adoc[stack&lowbar;st&lowbar;X509&lowbar;ATTRIBUTE] const* attrs,
    int attr&lowbar;nid);
----

== Return Value

Attribute value (owned by the containing structure), or NULL if absent or on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *attrs*
| Stack of attributes to search&period;
| *attr&lowbar;nid*
| NID of the attribute to retrieve&period;
|===


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