1--- 2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 3SPDX-License-Identifier: curl 4Title: CURLOPT_SSL_VERIFYSTATUS 5Section: 3 6Source: libcurl 7See-also: 8 - CURLOPT_CAINFO (3) 9 - CURLOPT_SSL_VERIFYHOST (3) 10 - CURLOPT_SSL_VERIFYPEER (3) 11Protocol: 12 - TLS 13TLS-backend: 14 - OpenSSL 15 - GnuTLS 16Added-in: 7.41.0 17--- 18 19# NAME 20 21CURLOPT_SSL_VERIFYSTATUS - verify the certificate's status 22 23# SYNOPSIS 24 25~~~c 26#include <curl/curl.h> 27 28CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_VERIFYSTATUS, long verify); 29~~~ 30 31# DESCRIPTION 32 33Pass a long as parameter set to 1 to enable or 0 to disable. 34 35This option determines whether libcurl verifies the status of the server cert 36using the "Certificate Status Request" TLS extension (aka. OCSP stapling). 37 38Note that if this option is enabled but the server does not support the TLS 39extension, the verification fails. 40 41# DEFAULT 42 430 44 45# %PROTOCOLS% 46 47# EXAMPLE 48 49~~~c 50int main(void) 51{ 52 CURL *curl = curl_easy_init(); 53 if(curl) { 54 CURLcode res; 55 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); 56 /* ask for OCSP stapling */ 57 curl_easy_setopt(curl, CURLOPT_SSL_VERIFYSTATUS, 1L); 58 res = curl_easy_perform(curl); 59 curl_easy_cleanup(curl); 60 } 61} 62~~~ 63 64# %AVAILABILITY% 65 66# RETURN VALUE 67 68Returns CURLE_OK if OCSP stapling is supported by the SSL backend, otherwise 69returns CURLE_NOT_BUILT_IN. 70