GNURLOPT_PROXY_KEYPASSWD(3)
π GNURLOPT_PROXY_KEYPASSWD(3) β like, the whole curl_easy_setopt options situation π
okay bestie, so this page lives in the curl_easy_setopt options family of the manual β that's the vibe check for where you found it β and it's all about GNURLOPT_PROXY_KEYPASSWD. yes the file name is long. no we're not shortening it. iykyk. π
β¨ NAME β¨
CURLOPT_PROXY_KEYPASSWD β the one where you set the passphrase for your proxy's private key π
β¨ SYNOPSIS β¨
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_KEYPASSWD, char
*pwd);
like, that's the whole incantation. copy it exactly, don't freestyle it π«Ά
β¨ DESCRIPTION β¨
okay so first things first, and this is the part people get wrong: this option is for connecting to an HTTPS proxy, not an HTTPS server. read that again. proxy. not server. they're different main characters π
you pass a pointer to a null-terminated string as the parameter. that string gets used as the password required to use the CURLOPT_PROXY_SSLKEY(3) private key. basically, the way that loading a certificate never needed a pass phrase but loading your private key absolutely does? that's the whole point of this option π
good news though β the application does not have to keep the string around after setting this option. so you can yeet it once you've set it. slay π
β¨ DEFAULT β¨
NULL
(iconic. empty. nothing. the void π)
β¨ PROTOCOLS β¨
Used with HTTPS proxy. that's it, that's the whole list π¦
β¨ EXAMPLE β¨
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin");
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy:443");
curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "superman");
ret = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
not the password being "superman" π bestie please pick something stronger, but also, keep it verbatim, it's an example, not a security audit π
β¨ AVAILABILITY β¨
Added in 7.52.0. so if you're on something older, it's giving "not yet, babe" π
β¨ RETURN VALUE β¨
CURLE_OKβ if TLS is enabled. we love a happy ending πCURLE_UNKNOWN_OPTIONβ if TLS is not enabled. rude, but fair πCURLE_OUT_OF_MEMORYβ if there was insufficient heap space. your RAM said "no ma'am" π
β¨ SEE ALSO β¨
CURLOPT_PROXY_SSLKEY(3)β the private key this passphrase unlocks πCURLOPT_SSH_PRIVATE_KEYFILE(3)β different key, different section, same energy π¦CURLOPT_SSLKEY(3),β and yes the trailing comma is canon, i don't make the rules π
β οΈ reminder bestie: HTTPS proxy, not HTTPS server. mixing those up is a whole vibe check failure and i will be texting you about it π«Ά
okay that's the page!! written by the libcurl 7.52.0 girlies, dated 16 Nov 2016, filed under GNURLOPT_PROXY_KEYPASSWD(3) β mwah, go set your passphrase, you're doing amazing πβ¨
π¦ 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