Library:libcurl
| Vendor | Daniel Stenberg and contributors |
|---|---|
| Platforms | Windows, Linux, macOS, Android, many others |
| License | curl (MIT/X derivative) |
| Website | https://curl.se |
| On this wiki | Facts · Code · Notes · Topics |
The URL transfer library behind the curl tool (C, curl license, MIT-style): HTTP(S), FTP, SMTP, IMAP, MQTT, SFTP and about twenty other protocols, shipped as libcurl.so.4 / libcurl.dll or statically linked into a huge number of applications. curl_version() builds a single string that names libcurl and every backend library it was linked against.
Identification
- Version banner:
curl_version()returnslibcurl/<version>followed by space-separated backend versions, in this order: TLS backend (OpenSSL/3.x.y,LibreSSL/...,BoringSSL,AWS-LC/...,quictls/...,Schannel,mbedTLS/x.y.z,wolfSSL/...),zlib/...,brotli/...,zstd/...,c-ares/..., IDN (libidn2/...,WinIDN,AppleIDN),libpsl/..., SSH (libssh2/...,libssh/...),nghttp2/...,ngtcp2/...andnghttp3/...,libgsasl/..., GSS-API (mit-krb5,AppleGSS), LDAP. Shape:libcurl/8.x.y OpenSSL/3.x.y zlib/1.3.1 brotli/1.1.0 zstd/1.5.6 libidn2/2.3.7 nghttp2/1.64.0. Pieces are joined by single spaces in a 300-byte static buffer, but most parts are assembled with printf formats at run time, so only the prefixlibcurl/and the format strings (zlib/%s,c-ares/%s) are visible in a static binary; the full banner appears in memory or incurl -Vstyle output. The release number itself is the constant LIBCURL_VERSION (a literal like8.5.0). - Default User-Agent:
curl/<version>is sent when the application sets none (the header is only added if the app supplied no User-Agent), socurl/7.orcurl/8.in .rdata is a version clue. - Version constants:
LIBCURL_VERSION_NUMis 0xXXYYZZ (8.23.1 is 0x081701);curl_version_info()returns it inversion_num. - Shared library names: Linux
libcurl.so.4(soname number = VERSIONCHANGE - VERSIONDEL = 12 - 8 = 4 at the cited commit); Debian also shipslibcurl-gnutls.so.4. Windows builds are commonlylibcurl.dllorlibcurl-x64.dll(general knowledge, not from the commit). The exports are thecurl_easy_*,curl_multi_*,curl_share_*,curl_url*,curl_slist_*andcurl_global_initfamilies; an executable importingcurl_easy_init,curl_easy_setoptandcurl_easy_performis almost certainly this library. - Error text table:
curl_easy_strerrorstrings (Unsupported protocol,Failed initialization,Couldn't resolve host name,Couldn't connect to server) are in CURLcode order in lib/strerror.c, so a static copy contains them as a table of string pointers. - TLS backend: the banner's TLS part is
OSSL_PACKAGE "/" version, where OSSL_PACKAGE is LibreSSL, AWS-LC, BoringSSL, quictls or OpenSSL depending on compile-time macros. See Library:OpenSSL.
curl_easy_setopt option numbers
CURLOPT constants are base + id: LONG 0, OBJECTPOINT/STRINGPOINT 10000, FUNCTIONPOINT 20000, OFF_T 30000. Checked in include/curl/curl.h: CURLOPT_URL = 10002, CURLOPT_POSTFIELDS = 10015, CURLOPT_USERAGENT = 10018, CURLOPT_WRITEFUNCTION = 20011, CURLOPT_SSL_VERIFYPEER = 64, CURLOPT_SSL_VERIFYHOST = 81. An immediate 10002 passed as the second argument of curl_easy_setopt marks the URL call site; a SSL_VERIFYPEER value of 0 disables certificate validation.
Code & repositories
- https://github.com/curl/curl @
7ab9cad703d11b6d9f43e6b4290e6bce6d5ab5e4· license: curl (declared by the contributor; GitHub's detector did not recognize COPYING)
curl/libcurl upstream source (curl license): reference for version strings, option IDs and structures.
Tested on: source read, not run: source reading · checked 2026-10-18
Evidence & references
Read from the curl source at commit 7ab9cad703d11b6d9f43e6b4290e6bce6d5ab5e4 (master, 8.23.1-DEV): lib/version.c, lib/vtls/openssl.c, lib/vtls/mbedtls.c, lib/vtls/wolfssl.c, lib/vtls/schannel.c, lib/Makefile.soname, include/curl/curlver.h, include/curl/curl.h, lib/strerror.c, lib/http.c.