GNURLINFO_...RIFYRESULT(3)

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

🌸 NAME 🌸

okay so bestie, this is GNURLINFO_...RIFYRESULT(3), part of the curl_easy_getinfo options family, and the actual star is CURLINFO_PROXY_SSL_VERIFYRESULT β€” literally β€œget the result of the proxy certificate verification”. No cap, that's the whole job. πŸ’…

✨ SYNOPSIS ✨

#include <gnurl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle,
CURLINFO_PROXY_SSL_VERIFYRESULT, long *result);

πŸ’– DESCRIPTION πŸ’–

You pass a pointer to a long, and it receives the result of the certificate verification that was requested using the CURLOPT_PROXY_SSL_VERIFYPEER(3) option. This is only used for HTTPS proxies. πŸ¦‹

🌈 PROTOCOLS 🌈

All β€” that's the whole vibe. πŸ’«

πŸ“ EXAMPLE πŸ“

Here's the code, bestie, copied exactly because we do not mess with the recipe:

CURL *curl = curl_easy_init();
if(curl) {
  CURLcode res;
  long verifyresult;
  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
  curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy:443");
  res = curl_easy_perform(curl);
  curl_easy_getinfo(curl, CURLINFO_PROXY_SSL_VERIFYRESULT, &verifyresult);
  printf("The peer verification said %s\n", verifyresult?
         "fine":"BAAAD");
  curl_easy_cleanup(curl);
}

🧚 AVAILABILITY 🧚

Added in 7.52.0. πŸŽ€

πŸ‘‘ RETURN VALUE πŸ‘‘

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. That's it, that's the tea. 😭

πŸ¦‹ SEE ALSO πŸ¦‹

mwah πŸ’‹ β€” this page is from libcurl 7.52.0, dated 16 Nov 2016, and it's GNURLINFO_...RIFYRESULT(3). byeee 🫢

πŸ“¦ where this page comes from