[#PKCS12_add_localkeyid]
= PKCS12&lowbar;add&lowbar;localkeyid
:mrdocs:

Add a PKCS&num;9 localKeyID attribute to a safeBag&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
PKCS12&lowbar;add&lowbar;localkeyid(
    xref:PKCS12_SAFEBAG.adoc[PKCS12&lowbar;SAFEBAG]* bag,
    unsigned char* name,
    int namelen);
----

== Return Value

1 on success, 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *bag*
| SafeBag to modify&period;
| *name*
| Octet&hyphen;string local key identifier&period;
| *namelen*
| Length of `name` in bytes&period;
|===


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