GNURLOPT_PROXY_SSLKEYTYPE(3)

πŸ“¦ version 7.72.0, in nixos 26.05, nixpkgs unstable

πŸ’… GNURLOPT_PROXY_SSLKEYTYPE(3) πŸ’…

okay so bestie, welcome to the GNURLOPT_PROXY_SSLKEYTYPE(3) page β€” yes, it’s part of the curl_easy_setopt options manual, and we’re about to make proxy private-key types make sense. no cap.

πŸŽ€ NAME πŸŽ€

CURLOPT_PROXY_SSLKEYTYPE - set type of the proxy private key file. that’s the whole assignment, and it ate.

✨ SYNOPSIS ✨

#include <gnurl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSLKEYTYPE, char *type);

πŸ’– DESCRIPTION πŸ’–

This option is for connecting to an HTTPS proxy, not an HTTPS server. the way that distinction matters β€” do not mix them up, bestie.

Pass a pointer to a null-terminated string as parameter. The string should be the format of your private key. Supported formats are "PEM", "DER" and "ENG".

The application does not have to keep the string around after setting this option β€” set it and forget it, literally. πŸ™ˆ

HTTPS proxy, not HTTPS server β€” that’s the vibe check here, and this option passes.

🌈 PROTOCOLS 🌈

Used with HTTPS proxy. periodt.

πŸ“ EXAMPLE πŸ“

here’s the whole little setup, exactly as the page lays it out:

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_SSLKEY, "key.pem");
  curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEYTYPE, "PEM");
  curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret");
  ret = curl_easy_perform(curl);
  curl_easy_cleanup(curl);
}

πŸ¦‹ AVAILABILITY πŸ¦‹

Added in 7.52.0. iconic behavior since then, fr fr.

πŸ”₯ RETURN VALUE πŸ”₯

Returns CURLE_OK if TLS is supported, CURLE_UNKNOWN_OPTION if not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space. that’s the whole status report, bestie.

πŸ’œ SEE ALSO πŸ’œ

xoxo, your fav manpage bestie πŸ’– β€” this one’s from libcurl 7.52.0, dated 16 Nov 2016.

πŸ“¦ where this page comes from