[#CMS_signed_get_attr_by_OBJ]
= CMS&lowbar;signed&lowbar;get&lowbar;attr&lowbar;by&lowbar;OBJ
:mrdocs:

Find the next signed attribute matching an OID 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;signed&lowbar;get&lowbar;attr&lowbar;by&lowbar;OBJ(
    xref:CMS_SignerInfo.adoc[CMS&lowbar;SignerInfo] const* si,
    xref:ASN1_OBJECT.adoc[ASN1&lowbar;OBJECT] const* obj,
    int lastpos);
----

== Return Value

Index of the matching attribute, or &hyphen;1 if none is found (or on error)&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *si*
| SignerInfo whose signedAttrs are searched&period;
| *obj*
| Attribute type OID 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]#
