GNURLOPT_SSL_VERIFYSTATUS(3)
okay so bestie, this is the GNURLOPT_SSL_VERIFYSTATUS(3) page from the curl_easy_setopt options crew β and it's here to explain how to make libcurl check the server cert's status. π
β¨
π NAME π
CURLOPT_SSL_VERIFYSTATUS β verify the certificate's status. π
β¨ SYNOPSIS β¨
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_VERIFYSTATUS, long
verify);
π DESCRIPTION π
You pass a long as the parameter: set it to 1 to enable this, or 0 to disable it. Simple. π«Ά
This option decides whether libcurl verifies the status of the server cert using the "Certificate Status Request" TLS extension (aka. OCSP stapling). It's giving security main character energy. π₯
β οΈ note: if this option is enabled but the server does not support the TLS extension, the verification will fail. no cap, it will not just shrug and move on. π
πΈ DEFAULT πΈ
0
π¦ PROTOCOLS π¦
All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc. β¨
π EXAMPLE π
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
/* ask for OCSP stapling! */
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYSTATUS, 1L);
ret = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
π AVAILABILITY π
Added in 7.41.0. This option is currently only supported by the OpenSSL, GnuTLS and NSS TLS backends. π§
π RETURN VALUE π
Returns CURLE_OK if OCSP stapling is supported by the SSL backend, otherwise returns CURLE_NOT_BUILT_IN. π
β SEE ALSO β
β that's the whole page, bestie. it's libcurl 7.40.0, dated 04 Dec 2014, and the manual page is GNURLOPT_SSL_VERIFYSTATUS(3). slay π
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2018, 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