[#EVP_PKEY_add1_attr_by_OBJ]
= EVP&lowbar;PKEY&lowbar;add1&lowbar;attr&lowbar;by&lowbar;OBJ
:mrdocs:

Append an attribute identified by OID to an EVP&lowbar;PKEY&apos;s attribute set&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;OBJ(
    xref:EVP_PKEY.adoc[EVP&lowbar;PKEY]* key,
    xref:ASN1_OBJECT.adoc[ASN1&lowbar;OBJECT] const* obj,
    int type,
    unsigned char const* bytes,
    int len);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *key*
| Key whose attributes are extended&period;
| *obj*
| Attribute type OID&period;
| *type*
| ASN&period;1 string&sol;type code for `bytes` (for example V&lowbar;ASN1&lowbar;UTF8STRING)&period;
| *bytes*
| Attribute value bytes interpreted according to `type&period;`
| *len*
| Length of `bytes` in bytes&period;
|===


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