[#EVP_PKEY_asn1_set_private]
= EVP&lowbar;PKEY&lowbar;asn1&lowbar;set&lowbar;private
:mrdocs:

Install PKCS&num;8 private&hyphen;key decode, encode, and print callbacks on an ASN&period;1 method&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
EVP&lowbar;PKEY&lowbar;asn1&lowbar;set&lowbar;private(
    xref:EVP_PKEY_ASN1_METHOD.adoc[EVP&lowbar;PKEY&lowbar;ASN1&lowbar;METHOD]* ameth,
    int(* priv&lowbar;decode)(xref:EVP_PKEY.adoc[EVP&lowbar;PKEY]*, xref:PKCS8_PRIV_KEY_INFO.adoc[PKCS8&lowbar;PRIV&lowbar;KEY&lowbar;INFO] const*),
    int(* priv&lowbar;encode)(xref:PKCS8_PRIV_KEY_INFO.adoc[PKCS8&lowbar;PRIV&lowbar;KEY&lowbar;INFO]*, xref:EVP_PKEY.adoc[EVP&lowbar;PKEY] const*),
    int(* priv&lowbar;print)(xref:BIO.adoc[BIO]*, xref:EVP_PKEY.adoc[EVP&lowbar;PKEY] const*, int, xref:ASN1_PCTX.adoc[ASN1&lowbar;PCTX]*));
----

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ameth*
| ASN&period;1 method being customized&period;
| *priv&lowbar;decode*
| Decode a PKCS8&lowbar;PRIV&lowbar;KEY&lowbar;INFO into `pk&period;`
| *priv&lowbar;encode*
| Encode `pk` into a PKCS8&lowbar;PRIV&lowbar;KEY&lowbar;INFO&period;
| *priv&lowbar;print*
| Print the private key to a BIO&period;
|===


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