GNURLOPT_ISSUERCERT(3)
π GNURLOPT_ISSUERCERT(3) π
okay bestie, welcome to the curl_easy_setopt options manual page for GNURLOPT_ISSUERCERT(3) β yes, the name is a whole mouthful, but itβs giving βtrust but verify, specifically the issuerβ energy. π
β¨ NAME β¨
CURLOPT_ISSUERCERTβ issuer SSL certificate filename. slay.
πΈ SYNOPSIS πΈ
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ISSUERCERT, char *file);
π¦ DESCRIPTION π¦
You pass a char * to a null-terminated string naming a file holding a CA certificate in PEM format. π
If the option is set, an additional check against the peer certificate is performed to verify the issuer is indeed the one associated with the certificate provided by the option. This additional check is useful in multi-level PKI where you need to enforce that the peer certificate is from a specific branch of the tree. iykyk. π
This option makes sense only when used in combination with the CURLOPT_SSL_VERIFYPEER(3) option. Otherwise, the result of the check is not considered as failure. β οΈ
A specific error code, CURLE_SSL_ISSUER_ERROR, is defined with the option. It gets returned if the setup of the SSL/TLS session has failed due to a mismatch with the issuer of peer certificate β and yes, CURLOPT_SSL_VERIFYPEER(3) has to be set too for the check to fail. (Added in 7.19.0) π
The application does not have to keep the string around after setting this option. so you can let it go, no strings attached. π«Ά
π DEFAULT π
NULL
π§ PROTOCOLS π§
All TLS-based protocols. periodt.
β EXAMPLE β
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_ISSUERCERT, "/etc/certs/cacert.pem");
ret = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
π AVAILABILITY π
If built TLS enabled. π«
π₯ RETURN VALUE π₯
Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space. π
πΈ SEE ALSO πΈ
okay thatβs the whole vibe check, bestie. This page is from libcurl 7.37.0, dated 19 Jun 2014, and itβs literally the GNURLOPT_ISSUERCERT(3) manual page β go be iconic with your issuer checks. π
β¨
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2014, 2017, 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