[#PKCS7_add_signed_attribute]
= PKCS7&lowbar;add&lowbar;signed&lowbar;attribute
:mrdocs:

Add an authenticated (signed) attribute to a PKCS&num;7 signer info&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
PKCS7&lowbar;add&lowbar;signed&lowbar;attribute(
    xref:PKCS7_SIGNER_INFO.adoc[PKCS7&lowbar;SIGNER&lowbar;INFO]* p7si,
    int nid,
    int type,
    void* data);
----

== Return Value

1 on success, or 0 on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *p7si*
| Signer info receiving the attribute&period;
| *nid*
| Attribute type NID (for example NID&lowbar;pkcs9&lowbar;contentType)&period;
| *type*
| ASN&period;1 value type tag (V&lowbar;ASN1&lowbar;&ast;) for `data&period;`
| *data*
| Attribute value pointer interpreted according to `type&period;`
|===


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