GNURLOPT_PROXY_SSLCERT_BLOB(3)
π GNURLOPT_PROXY_SSLCERT_BLOB(3) π
okay bestie, welcome to the GNURLOPT_PROXY_SSLCERT_BLOB(3) page from the curl_easy_setopt options manual. this one is all about handing curl a proxy client certificate that lives in memory instead of on disk. no cap.
π NAME π
CURLOPT_PROXY_SSLCERT_BLOB β SSL proxy client certificate from memory blob. literally what it says on the tin, bestie.
β¨ SYNOPSIS β¨
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSLCERT_BLOB,
struct curl_blob *blob);
π¦ DESCRIPTION π¦
So you pass a pointer to a curl_blob structure, and that structure contains information β specifically the pointer and size β about a memory block with binary data of the certificate used to connect to the HTTPS proxy. very memory blob, very demure.
Now for the format tea:
- On Secure Transport or Schannel, the format must be
"P12". - On OpenSSL, the format must be
"P12"or"PEM".
The string "P12" or "PEM" must be specified with CURLOPT_PROXY_SSLCERTTYPE(3). do not skip that part, bestie.
If the blob is initialized with the flags member of struct curl_blob set to CURL_BLOB_COPY, the application does not have to keep the buffer around after setting this. iconic behavior, honestly.
This option is an alternative to CURLOPT_PROXY_SSLCERT(3) which instead expects a file name as input.
πΈ DEFAULT πΈ
NULL
π¦ PROTOCOLS π¦
All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
π₯ EXAMPLE π₯
CURL *curl = curl_easy_init();
if(curl) {
struct curl_blob blob;
blob.data = certificateData;
blob.len = filesize;
blob.flags = CURL_BLOB_COPY;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy");
curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "key.pem");
curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret");
curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT_BLOB, &blob);
ret = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
β AVAILABILITY β
Added in libcurl 7.71.0. This option is supported by the OpenSSL, Secure Transport and Schannel backends.
π RETURN VALUE π
Returns CURLE_OK if TLS enabled, CURLE_UNKNOWN_OPTION if not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space.
π«Ά SEE ALSO π«Ά
and thatβs the tea, bestie: this page is fromlibcurl 7.71.0, dated24 Jun 2020, with footer titleGNURLOPT_P...SLCERT_BLOB(3). mwah π
π¦ 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