[#EVP_PKEY_set_type]
= EVP&lowbar;PKEY&lowbar;set&lowbar;type
:mrdocs:

Assign the algorithm type of an empty EVP&lowbar;PKEY by NID &sol; EVP&lowbar;PKEY&lowbar;&ast; id&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;PKEY&lowbar;set&lowbar;type(
    xref:EVP_PKEY.adoc[EVP&lowbar;PKEY]* pkey,
    int type);
----

== Return Value

1 on success, or 0 on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *pkey*
| Key object to type (typically freshly EVP&lowbar;PKEY&lowbar;new()&apos;d)&period;
| *type*
| Key type identifier (for example EVP&lowbar;PKEY&lowbar;RSA)&period;
|===


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