[#EVP_PKEY2PKCS8]
= EVP&lowbar;PKEY2PKCS8
:mrdocs:

Convert an EVP&lowbar;PKEY into a PKCS&num;8 PrivateKeyInfo structure&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:PKCS8_PRIV_KEY_INFO.adoc[PKCS8&lowbar;PRIV&lowbar;KEY&lowbar;INFO]*
EVP&lowbar;PKEY2PKCS8(xref:EVP_PKEY.adoc[EVP&lowbar;PKEY] const* pkey);
----

== Return Value

Newly allocated PKCS8&lowbar;PRIV&lowbar;KEY&lowbar;INFO, or NULL on error&semi; free with PKCS8&lowbar;PRIV&lowbar;KEY&lowbar;INFO&lowbar;free()&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *pkey*
| Private key to encode&period;
|===


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