[#PKCS8_add_keyusage]
= PKCS8&lowbar;add&lowbar;keyusage
:mrdocs:

Add a Microsoft key&hyphen;usage attribute to PKCS&num;8 private key info&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
PKCS8&lowbar;add&lowbar;keyusage(
    xref:PKCS8_PRIV_KEY_INFO.adoc[PKCS8&lowbar;PRIV&lowbar;KEY&lowbar;INFO]* p8,
    int usage);
----

== Return Value

1 on success, 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *p8*
| PKCS&num;8 private key info to modify&period;
| *usage*
| Key&hyphen;usage flag (KEY&lowbar;SIG or KEY&lowbar;EX)&period;
|===


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