[#CMS_unsigned_get_attr_by_NID]
= CMS&lowbar;unsigned&lowbar;get&lowbar;attr&lowbar;by&lowbar;NID
:mrdocs:

Find an unsigned attribute by NID in a CMS SignerInfo&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
CMS&lowbar;unsigned&lowbar;get&lowbar;attr&lowbar;by&lowbar;NID(
    xref:CMS_SignerInfo.adoc[CMS&lowbar;SignerInfo] const* si,
    int nid,
    int lastpos);
----

== Return Value

Attribute index, or &hyphen;1 if not found&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *si*
| SignerInfo whose unsignedAttrs are searched&period;
| *nid*
| Attribute type NID to match&period;
| *lastpos*
| Index after which to continue searching (&hyphen;1 to start from the beginning)&period;
|===


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