[#CMS_unsigned_add1_attr_by_NID]
= CMS&lowbar;unsigned&lowbar;add1&lowbar;attr&lowbar;by&lowbar;NID
:mrdocs:

Append an unsigned attribute identified by NID to 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;add1&lowbar;attr&lowbar;by&lowbar;NID(
    xref:CMS_SignerInfo.adoc[CMS&lowbar;SignerInfo]* si,
    int nid,
    int type,
    void const* bytes,
    int len);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *si*
| SignerInfo whose unsignedAttrs set is extended&period;
| *nid*
| Attribute type NID (for example NID&lowbar;pkcs9&lowbar;signingTime)&period;
| *type*
| ASN&period;1 string type for `bytes` (for example V&lowbar;ASN1&lowbar;OCTET&lowbar;STRING)&period;
| *bytes*
| Attribute value bytes, or NULL when `len` is 0&period;
| *len*
| Length of `bytes` in octets&period;
|===


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