[#EVP_PKEY_CTX_str2ctrl]
= EVP&lowbar;PKEY&lowbar;CTX&lowbar;str2ctrl
:mrdocs:

Pass a NUL&hyphen;terminated string to EVP&lowbar;PKEY&lowbar;CTX&lowbar;ctrl as the p2 argument&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;str2ctrl(
    xref:EVP_PKEY_CTX.adoc[EVP&lowbar;PKEY&lowbar;CTX]* ctx,
    int cmd,
    char const* str);
----

== Return Value

Positive on success, 0 or negative on failure (same convention as EVP&lowbar;PKEY&lowbar;CTX&lowbar;ctrl)&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| Key context that receives the control&period;
| *cmd*
| Control command number understood by the key method&period;
| *str*
| NUL&hyphen;terminated string passed as `p2` (length is strlen(`str))&period;`
|===


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