curl_version_info(3)
Okay bestie, this is curl_version_info(3) from the Library Functions Manual β aka the runtime vibe check for libcurl. π
β¨
π NAME π
curl_version_info β returns runtime libcurl version info
β¨ SYNOPSIS β¨
#include <curl/curl.h>
curl_version_info_data *curl_version_info(CURLversion age);
π¦ DESCRIPTION π¦
Returns a pointer to a filled-in static struct with info about various features in the running version of libcurl. Set age to the version of this functionality at the time you write your program. That way, libcurl always returns a proper struct that your program understands, while programs in the future might get a different struct. CURLVERSION_NOW is the most recent one for the library you have installed:
data = curl_version_info(CURLVERSION_NOW);
Applications should use this information to judge if things are possible to do or not, instead of using compile-time checks, as dynamic/DLL libraries can be changed independent of applications. π
β οΈ This function can alter the returned static data as long as curl_global_init(3) has not been called. It is therefore not thread-safe before libcurl initialization occurs. No cap.
The curl_version_info_data struct looks like this:
typedef struct {
CURLversion age; /* see description below */
const char *version; /* human readable string */
unsigned int version_num; /* numeric representation */
const char *host; /* human readable string */
int features; /* bitmask, see below */
char *ssl_version; /* human readable string */
long ssl_version_num; /* not used, always zero */
const char *libz_version; /* human readable string */
const char *const *protocols; /* protocols */
/* when 'age' is CURLVERSION_SECOND or higher, the members below exist */
const char *ares; /* human readable string */
int ares_num; /* number */
/* when 'age' is CURLVERSION_THIRD or higher, the members below exist */
const char *libidn; /* human readable string */
/* when 'age' is CURLVERSION_FOURTH or higher (>= 7.16.1), the members
below exist */
int iconv_ver_num; /* '_libiconv_version' if iconv support enabled */
const char *libssh_version; /* human readable string */
/* when 'age' is CURLVERSION_FIFTH or higher (>= 7.57.0), the members
below exist */
unsigned int brotli_ver_num; /* Numeric Brotli version
(MAJOR << 24) | (MINOR << 12) | PATCH */
const char *brotli_version; /* human readable string. */
/* when 'age' is CURLVERSION_SIXTH or higher (>= 7.66.0), the members
below exist */
unsigned int nghttp2_ver_num; /* Numeric nghttp2 version
(MAJOR << 16) | (MINOR << 8) | PATCH */
const char *nghttp2_version; /* human readable string. */
const char *quic_version; /* human readable quic (+ HTTP/3) library +
version or NULL */
/* when 'age' is CURLVERSION_SEVENTH or higher (>= 7.70.0), the members
below exist */
const char *cainfo; /* the built-in default CURLOPT_CAINFO, might
be NULL */
const char *capath; /* the built-in default CURLOPT_CAPATH, might
be NULL */
/* when 'age' is CURLVERSION_EIGHTH or higher (>= 7.71.0), the members
below exist */
unsigned int zstd_ver_num; /* Numeric Zstd version
(MAJOR << 24) | (MINOR << 12) | PATCH */
const char *zstd_version; /* human readable string. */
/* when 'age' is CURLVERSION_NINTH or higher (>= 7.75.0), the members
below exist */
const char *hyper_version; /* human readable string. */
/* when 'age' is CURLVERSION_TENTH or higher (>= 7.77.0), the members
below exist */
const char *gsasl_version; /* human readable string. */
/* when 'age' is CURLVERSION_ELEVENTH or higher (>= 7.87.0), the members
below exist */
const char *const *feature_names; /* Feature names. */
/* when 'age' is CURLVERSION_TWELFTH or higher (>= 8.8.0), the members
below exist */
const char *const *rtmp_version; /* human readable string */
} curl_version_info_data;
ageβ says what the age of this struct is. The number depends on how new the libcurl you are using is. You are however guaranteed to get a struct that you have a matching struct for in the header, because you tell libcurl your βageβ with the input argument. π«Άversionβ just an ASCII string for the libcurl version.version_numβ a 24-bit number made like this:<8 bits major number> | <8 bits minor number> | <8 bits patch number>. Version7.9.8is therefore returned as0x070908. πhostβ an ASCII string showing what host information this libcurl was built for. As discovered by aconfigurescript or set by the build environment.featuresβ a bit mask representing available features. It can have none, one or more bits set. The use of this field is deprecated: usefeature_namesinstead. The feature names description below lists the associated bits.feature_namesβ a pointer to an array of string pointers, containing the names of the features that libcurl supports. The array is terminated by aNULLentry. See the list of feature names below. πssl_versionβ an ASCII string for the TLS library name + version used. If libcurl has no SSL support, this isNULL. For example"Schannel","Secure Transport"or"OpenSSL/1.1.0g". For MultiSSL builds the string contains all SSL backend names and the inactive backend names are in parentheses. For example"(OpenSSL/3.0.8) Schannel"or"OpenSSL/3.0.8 (Schannel)".ssl_version_numβ always0.libz_versionβ an ASCII string (there is no numerical version). If libcurl has no libz support, this isNULL.protocolsβ a pointer to an array ofchar *pointers, containing the names of protocols that libcurl supports (using lowercase letters). The protocol names are the same as would be used in URLs. The array is terminated by aNULLentry. π
β¨ FEATURES β¨
Okay bestie, this is the fun part β this is where libcurl shows you literally everything it can do. Each feature has a name, its little features mask bit, and the tea on what it means. Some of these are just vibes, no mask bit at all (we'll get to those). Scroll slow, there's a lot π
alt-svcβ features mask bit:CURL_VERSION_ALTSVCHTTP Alt-Svc parsing and the associated options (Added in 7.64.1)AppleSecTrustβ features mask bit: non-existent libcurl was built with support for Apple's SecTrust service to verify server certificates (Added in 8.17.0).AsynchDNSβ features mask bit:CURL_VERSION_ASYNCHDNSlibcurl was built with support for asynchronous name lookups, which allows more exact timeouts (even on Windows) and less blocking when using the multi interface.brotliβ features mask bit:CURL_VERSION_BROTLIsupports HTTP Brotli content encoding usinglibbrotlidecasyn-rrβ features mask bit: non-existent libcurl was built to usec-aresfor EXPERIMENTAL HTTPS resource record resolves, but uses the threaded resolver for "normal" resolves (Added in 8.12.0)Debugβ features mask bit:CURL_VERSION_DEBUGlibcurl was built with debug capabilitiesECHβ features mask bit: non-existent libcurl was built with ECH support (experimental, added in 8.8.0)gsaslβ features mask bit:CURL_VERSION_GSASLlibcurl was built with libgsasl and thus with some extra SCRAM-SHA authentication methods. (added in 7.76.0)GSS-APIβ features mask bit:CURL_VERSION_GSSAPIlibcurl was built with support for GSS-API. This makes libcurl use provided functions for Kerberos and SPNEGO authentication. It also allows libcurl to use the current user credentials without the app having to pass them on.HSTSβ features mask bit:CURL_VERSION_HSTSlibcurl was built with support for HSTS (HTTP Strict Transport Security) (Added in 7.74.0)HTTP2β features mask bit:CURL_VERSION_HTTP2libcurl was built with support for HTTP2.HTTP3β features mask bit:CURL_VERSION_HTTP3HTTP/3 and QUIC support are built-in (Added in 7.66.0)HTTPS-proxyβ features mask bit:CURL_VERSION_HTTPS_PROXYlibcurl was built with support for HTTPS-proxy.HTTPSRRβ features mask bit: non-existent libcurl was built with EXPERIMENTAL support for HTTPS resource records (Added in 8.12.0)IDNβ features mask bit:CURL_VERSION_IDNlibcurl was built with support for IDNA, domain names with international letters.IPv6β features mask bit:CURL_VERSION_IPV6supports IPv6Kerberosβ features mask bit:CURL_VERSION_KERBEROS5supports Kerberos V5 authentication for FTP, IMAP, LDAP, POP3, SMTP and SOCKSv5 proxy.Largefileβ features mask bit:CURL_VERSION_LARGEFILElibcurl was built with support for large files.libzβ features mask bit:CURL_VERSION_LIBZsupports HTTP deflate using libzMultiSSLβ features mask bit:CURL_VERSION_MULTI_SSLlibcurl was built with multiple SSL backends. For details, seecurl_global_sslset(3).NTLMβ features mask bit:CURL_VERSION_NTLMsupports HTTP NTLMNTLM_WBβ features mask bit:CURL_VERSION_NTLM_WBlibcurl was built with support for NTLM delegation to a winbind helper. This feature was removed from curl in 8.8.0.PSLβ features mask bit:CURL_VERSION_PSLlibcurl was built with support for Mozilla's Public Suffix List. This makes libcurl ignore cookies with a domain that is on the list.SPNEGOβ features mask bit:CURL_VERSION_SPNEGOlibcurl was built with support for SPNEGO authentication (Simple and Protected GSS-API Negotiation Mechanism, defined in RFC 2478.)SSLβ features mask bit:CURL_VERSION_SSLsupports SSL (HTTPS/FTPS)SSLS-EXPORTβ features mask bit: non-existent libcurl was built with SSL session import/export support (experimental, added in 8.12.0)SSPIβ features mask bit:CURL_VERSION_SSPIlibcurl was built with support for SSPI. This is only available on Windows and makes libcurl use Windows-provided functions for Kerberos, NTLM, SPNEGO and Digest authentication. It also allows libcurl to use the current user credentials without the app having to pass them on.threadsafeβ features mask bit:CURL_VERSION_THREADSAFElibcurl was built with thread-safety support (Atomic or SRWLOCK) to protect curl initialization. (Added in 7.84.0) Seelibcurl-thread(3)TLS-SRPβ features mask bit:CURL_VERSION_TLSAUTH_SRPlibcurl was built with support for TLS-SRP (in one or more of the built-in TLS backends).TrackMemoryβ features mask bit:CURL_VERSION_CURLDEBUGlibcurl was built with memory tracking debug capabilities. This is mainly of interest for libcurl hackers.Unicodeβ features mask bit:CURL_VERSION_UNICODElibcurl was built with Unicode support on Windows. This makes non-ASCII characters work in filenames and options passed to libcurl. (Added in 7.72.0)UnixSocketsβ features mask bit:CURL_VERSION_UNIX_SOCKETSlibcurl was built with support for Unix domain sockets.zstdβ features mask bit:CURL_VERSION_ZSTDsupports HTTP zstd content encoding using zstd library (Added in 7.72.0)no nameβ features mask bit:CURL_VERSION_CONVlibcurl was built with support for character conversions provided by callbacks. Always 0 since 7.82.0. Deprecated.no nameβ features mask bit:CURL_VERSION_GSSNEGOTIATEsupports HTTP GSS-Negotiate. Deprecated.no nameβ features mask bit:CURL_VERSION_KERBEROS4supports Kerberos V4 (when using FTP). Legacy bit. Deprecated since 7.33.0.
Heads up bestie: those last three have literally no name, and the first two of those are deprecated, and one of them is always0since 7.82.0. AndCURL_VERSION_KERBEROS4is legacy and deprecated since 7.33.0 β she's a museum piece ποΈ
π¦ PROTOCOLS π¦
This functionality affects all supported protocols
πΈ EXAMPLE πΈ
okay so like a little taste test, here's you getting the version numbers out of that version_num field π
int main(void)
{
curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
printf("libcurl version %u.%u.%u\n",
(ver->version_num >> 16) & 0xff,
(ver->version_num >> 8) & 0xff,
ver->version_num & 0xff);
}
β AVAILABILITY β
Added in curl 7.10
π RETURN VALUE π
A pointer to a curl_version_info_data struct.
π₯ SEE ALSO π₯
and that's the whole page bestie, you ate that π
β¨ This glow-up came to you from the libcurl fam β page curl_version_info(3), dated 2026-10-12, no cap π«ΆπΈ
π¦ where this page comes from
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms