GNURLOPT_P...SLCERTTYPE(3)
π GNURLOPT_P...SLCERTTYPE(3) β proxy cert type core π
Okay bestie, quick vibe check: this page lives in the curl_easy_setopt options manual, section 3, and the main character is GNURLOPT_P...SLCERTTYPE(3). It's giving βtell curl what format my proxy client cert is inβ energy, and honestly? We love a narrowly focused icon. π
πΈ NAME πΈ
CURLOPT_PROXY_SSLCERTTYPE β specify the type of the proxy client SSL certificate. Slay. β¨
π¦ SYNOPSIS π¦
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSLCERTTYPE, char *type);
π DESCRIPTION π
So you pass a pointer to a null-terminated string as the parameter, bestie. That string should be the format of your client certificate used when connecting to an HTTPS proxy. Literally that's the whole assignment. π
The supported formats are "PEM" and "DER", except with Secure Transport. OpenSSL (versions 0.9.3 and later) and Secure Transport (on iOS 5 or later, or OS X 10.7 or later) also support "P12" for PKCS#12-encoded files. Not me knowing the exact version lore β it's in the text, periodt. πβ¨
And good news: the application does not have to keep the string around after setting this option. Set it, forget it, live your life. π«Ά
π DEFAULT π
The default is "PEM" β iconic, classic, default behavior. π
π PROTOCOLS π
All β no protocol gatekeeping here. All of them. πβ¨
π₯ EXAMPLE π₯
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy");
curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT, "client.pem");
curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERTTYPE, "PEM");
curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "key.pem");
curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret");
ret = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
Obsessed with a complete little setup block. The way it just sets the URL, proxy, cert, cert type, key, key password, performs, and cleans up? Highkey tidy. β¨π§
β AVAILABILITY β
- Added in
7.52.0. β³ If built TLS enabled.β so yeah, TLS build check matters, bestie.
π RETURN VALUE π
- Returns
CURLE_OKif TLS is supported. - Returns
CURLE_UNKNOWN_OPTIONif not. - Returns
CURLE_OUT_OF_MEMORYif there was insufficient heap space. π
π SEE ALSO π
okay bestie, that's the whole page β this one's from libcurl 7.52.0, dated 16 Nov 2016, and it's filed under GNURLOPT_P...SLCERTTYPE(3). Bye, love u, go set your proxy cert type correctly πβ¨π
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms