CURLOPT_PROXY_SSLKEYTYPE(3)
π
CURLOPT_PROXY_SSLKEYTYPE(3) β type of the proxy private key file
okay so bestie, welcome to the Library Functions Manual β this is the CURLOPT_PROXY_SSLKEYTYPE(3) page, and itβs literally about telling curl what format your proxy private key file is in. no cap, itβs a tiny page but it has main character energy. β¨π
πΈ NAME πΈ
CURLOPT_PROXY_SSLKEYTYPEβ type of the proxy private key file
β¨ SYNOPSIS β¨
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSLKEYTYPE, char *type);
π¦ DESCRIPTION π¦
quick vibe check: this option is for connecting to an HTTPS proxy, not an HTTPS server. periodt. π
you pass a pointer to a null-terminated string as the parameter. that string should be the format of your private key. the supported formats are "PEM", "DER", "ENG" and "PROV" (the last one was added in curl 8.12.0). π
good news: your application does not have to keep the string around after setting this option. π«Ά
also, if you use this option multiple times, the last set string overrides the previous ones. set it to NULL to disable its use again. π
π PROTOCOLS π
this functionality affects all TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc. β itβs giving βall the TLS girlies.β β¨
vibe check on backends: this option works only with the following TLS backends: OpenSSL and wolfSSL.
π₯ EXAMPLE π₯
int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example");
curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT, "client.pem");
curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "key.pem");
curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEYTYPE, "PEM");
curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret");
result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
π AVAILABILITY π
added in curl 7.52.0 β iconic. π
β RETURN VALUE β
curl_easy_setopt(3) returns a CURLcode indicating success or error. π
CURLE_OK (0) means everything was OK; non-zero means an error occurred, so go see libcurl-errors(3). π
π«Ά SEE ALSO π«Ά
mwah π thatβs the whole CURLOPT_PROXY_SSLKEYTYPE(3) page from the libcurl manual, dated 2026-10-12 β slay, bestie, and happy proxying! β¨π
π¦ where this page comes from
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms