[#SSL_CTX_use_PrivateKey_file] = SSL_CTX_use_PrivateKey_file :mrdocs: Load a private key from a file into an SSL context. == Synopsis Declared in `<openssl/ssl.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int SSL_CTX_use_PrivateKey_file( xref:SSL_CTX.adoc[SSL_CTX]* ctx, char const* file, int type); ---- == Return Value 1 on success, or 0 on failure. == Parameters [cols="1,4"] |=== | Name| Description | *ctx* | SSL context that receives the key. | *file* | Path to a PEM or DER private‐key file. | *type* | Encoding: SSL_FILETYPE_PEM or SSL_FILETYPE_ASN1. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#