[#SSL_CTX_use_PrivateKey]
= SSL&lowbar;CTX&lowbar;use&lowbar;PrivateKey
:mrdocs:

Assign an EVP&lowbar;PKEY private key to an SSL context&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
SSL&lowbar;CTX&lowbar;use&lowbar;PrivateKey(
    xref:SSL_CTX.adoc[SSL&lowbar;CTX]* ctx,
    xref:EVP_PKEY.adoc[EVP&lowbar;PKEY]* pkey);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| SSL context that receives the key&semi; the key&apos;s reference count is incremented on success&period;
| *pkey*
| Private key that must match any certificate already set on `ctx&period;`
|===


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