CURLOPT_SSL_VERIFYSTATUS(3)

✨ CURLOPT_SSL_VERIFYSTATUS(3) ✨

okay so welcome to the Library Functions Manual page for CURLOPT_SSL_VERIFYSTATUS(3), bestie. We're doing a cert-status vibe check today, and yes, it's giving OCSP stapling realness. slay.

πŸŽ€ NAME πŸŽ€

CURLOPT_SSL_VERIFYSTATUS β€” verify the certificate's status.

πŸ¦‹ SYNOPSIS πŸ¦‹

#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_VERIFYSTATUS, long verify);

🌸 DESCRIPTION 🌸

Pass a long as parameter set to 1 to enable or 0 to disable.

This option determines whether libcurl verifies the status of the server cert using the "Certificate Status Request" TLS extension (aka. OCSP stapling, iykyk).

⚠️ real talk, bestie: not me enabling this against a server that does not support the TLS extension β€” because then the verification fails. no cap.

πŸ’… DEFAULT πŸ’…

0

lowkey off by default, fr fr.

🌈 PROTOCOLS 🌈

  • This functionality affects all TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
  • ngl, this option works only with the following TLS backends: GnuTLS and OpenSSL.

πŸ”₯ EXAMPLE πŸ”₯

this example is literally main character energy:

int main(void)
{
  CURL *curl = curl_easy_init();
  if(curl) {
    CURLcode result;
    curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
    /* ask for OCSP stapling */
    curl_easy_setopt(curl, CURLOPT_SSL_VERIFYSTATUS, 1L);
    result = curl_easy_perform(curl);
    curl_easy_cleanup(curl);
  }
}

🧚 AVAILABILITY 🧚

Added in curl 7.41.0 β€” iconic since day one. πŸ’–

πŸ’œ RETURN VALUE πŸ’œ

curl_easy_setopt(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see libcurl-errors(3). fr fr.

πŸ‘‘ SEE ALSO πŸ‘‘


mwah πŸ’– that's the whole page, signed off by libcurl, dated 2026-10-12 β€” CURLOPT_SSL_VERIFYSTATUS(3) forever, periodt.

πŸ“¦ where this page comes from