[#EVP_PKEY_add1_attr_by_txt]
= EVP&lowbar;PKEY&lowbar;add1&lowbar;attr&lowbar;by&lowbar;txt
:mrdocs:

Append an X509&lowbar;ATTRIBUTE named by `attrname` to an EVP&lowbar;PKEY attribute list&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;PKEY&lowbar;add1&lowbar;attr&lowbar;by&lowbar;txt(
    xref:EVP_PKEY.adoc[EVP&lowbar;PKEY]* key,
    char const* attrname,
    int type,
    unsigned char const* bytes,
    int len);
----

== Return Value

1 on success, or 0 on failure (including duplicate attributes)&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *key*
| Key whose attribute stack is updated&period;
| *attrname*
| Short or long attribute name (see obj&lowbar;mac&period;h SN&lowbar;&ast; &sol; LN&lowbar;&ast;)&period;
| *type*
| ASN&period;1 value type for the attribute data (V&lowbar;ASN1&lowbar;&ast;)&period;
| *bytes*
| Attribute value bytes&period;
| *len*
| Length of `bytes,` or &hyphen;1 if `bytes` is a NUL&hyphen;terminated string when applicable&period;
|===


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