[#EVP_PKEY_CTX_set1_id]
= EVP&lowbar;PKEY&lowbar;CTX&lowbar;set1&lowbar;id
:mrdocs:

Set an algorithm&hyphen;specific identity value on a key operation context (copied)&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;PKEY&lowbar;CTX&lowbar;set1&lowbar;id(
    xref:EVP_PKEY_CTX.adoc[EVP&lowbar;PKEY&lowbar;CTX]* ctx,
    void const* id,
    int len);
----

== Return Value

1 on success, or a non&hyphen;positive value on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| Key context that supports an ID parameter (for example SM2)&period;
| *id*
| Identity bytes to copy into the context&period;
| *len*
| Length of `id` in bytes&period;
|===


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