1curl_version_info(3)            libcurl Manual            curl_version_info(3)
2
3
4

NAME

6       curl_version_info - returns run-time libcurl version info
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       curl_version_info_data *curl_version_info( CURLversion age);
12

DESCRIPTION

14       Returns  a  pointer to a filled in static struct with information about
15       various features in the running version of libcurl. age should  be  set
16       to  the  version  of this functionality by the time you write your pro‐
17       gram. This way, libcurl will always return a proper  struct  that  your
18       program understands, while programs in the future might get a different
19       struct. CURLVERSION_NOW will be the most recent one for the library you
20       have installed:
21
22               data = curl_version_info(CURLVERSION_NOW);
23
24       Applications  should use this information to judge if things are possi‐
25       ble to do or not, instead of using compile-time checks, as  dynamic/DLL
26       libraries can be changed independent of applications.
27
28       The curl_version_info_data struct looks like this
29
30       typedef struct {
31         CURLversion age;          /* see description below */
32
33         const char *version;      /* human readable string */
34         unsigned int version_num; /* numeric representation */
35         const char *host;         /* human readable string */
36         int features;             /* bitmask, see below */
37         char *ssl_version;        /* human readable string */
38         long ssl_version_num;     /* not used, always zero */
39         const char *libz_version; /* human readable string */
40         const char * const *protocols; /* protocols */
41
42         /* when 'age' is CURLVERSION_SECOND or higher, the members below exist */
43         const char *ares;         /* human readable string */
44         int ares_num;             /* number */
45
46         /* when 'age' is CURLVERSION_THIRD or higher, the members below exist */
47         const char *libidn;       /* human readable string */
48
49         /* when 'age' is CURLVERSION_FOURTH or higher (>= 7.16.1), the members
50            below exist */
51         int iconv_ver_num;       /* '_libiconv_version' if iconv support enabled */
52
53         const char *libssh_version; /* human readable string */
54
55         /* when 'age' is CURLVERSION_FIFTH or higher (>= 7.57.0), the members
56            below exist */
57         unsigned int brotli_ver_num; /* Numeric Brotli version
58                                         (MAJOR << 24) | (MINOR << 12) | PATCH */
59         const char *brotli_version; /* human readable string. */
60
61         /* when 'age' is CURLVERSION_SIXTH or higher (>= 7.66.0), the members
62            below exist */
63         unsigned int nghttp2_ver_num; /* Numeric nghttp2 version
64                                          (MAJOR << 16) | (MINOR << 8) | PATCH */
65         const char *nghttp2_version; /* human readable string. */
66
67         const char *quic_version;    /* human readable quic (+ HTTP/3) library +
68                                         version or NULL */
69
70         /* when 'age' is CURLVERSION_SEVENTH or higher (>= 7.70.0), the members
71            below exist */
72         const char *cainfo;          /* the built-in default CURLOPT_CAINFO, might
73                                         be NULL */
74         const char *capath;          /* the built-in default CURLOPT_CAPATH, might
75                                         be NULL */
76         /* when 'age' is CURLVERSION_EIGHTH or higher (>= 7.71.0), the members
77            below exist */
78         unsigned int zstd_ver_num; /* Numeric Zstd version
79                                         (MAJOR << 24) | (MINOR << 12) | PATCH */
80         const char *zstd_version; /* human readable string. */
81       } curl_version_info_data;
82
83       age describes what the age of this struct is. The number depends on how
84       new the libcurl you're using is. You are however guaranteed  to  get  a
85       struct  that  you have a matching struct for in the header, as you tell
86       libcurl your "age" with the input argument.
87
88       version is just an ascii string for the libcurl version.
89
90       version_num is a 24 bit number created like this: <8 bits major number>
91       |  <8  bits  minor  number>  |  <8 bits patch number>. Version 7.9.8 is
92       therefore returned as 0x070908.
93
94       host is an ascii string showing what host information that this libcurl
95       was  built for. As discovered by a configure script or set by the build
96       environment.
97
98       features can have none, one or more bits set, and the currently defined
99       bits are:
100
101              CURL_VERSION_ALTSVC
102                     HTTP Alt-Svc parsing and the associated options (Added in
103                     7.64.1)
104
105              CURL_VERSION_ASYNCHDNS
106                     libcurl was built  with  support  for  asynchronous  name
107                     lookups,  which  allows more exact timeouts (even on Win‐
108                     dows) and less blocking when using the  multi  interface.
109                     (added in 7.10.7)
110
111              CURL_VERSION_BROTLI
112                     supports  HTTP Brotli content encoding using libbrotlidec
113                     (Added in 7.57.0)
114
115              CURL_VERSION_ZSTD
116                     supports HTTP zstd content encoding  using  zstd  library
117                     (Added in 7.72.0)
118
119              CURL_VERSION_CONV
120                     libcurl was built with support for character conversions,
121                     as provided by the CURLOPT_CONV_*  callbacks.  (Added  in
122                     7.15.4)
123
124              CURL_VERSION_CURLDEBUG
125                     libcurl  was  built  with memory tracking debug capabili‐
126                     ties. This is mainly of  interest  for  libcurl  hackers.
127                     (added in 7.19.6)
128
129              CURL_VERSION_DEBUG
130                     libcurl  was  built  with  debug  capabilities  (added in
131                     7.10.6)
132
133              CURL_VERSION_GSASL
134                     libcurl was built with libgsasl and thus with some  extra
135                     SCRAM-SHA authentication methods. (added in 7.76.0)
136
137              CURL_VERSION_GSSAPI
138                     libcurl  was  built  with support for GSS-API. This makes
139                     libcurl use provided functions for  Kerberos  and  SPNEGO
140                     authentication. It also allows libcurl to use the current
141                     user credentials without the app having to pass them  on.
142                     (Added in 7.38.0)
143
144              CURL_VERSION_GSSNEGOTIATE
145                     supports HTTP GSS-Negotiate (added in 7.10.6)
146
147              CURL_VERSION_HSTS
148                     libcurl  was  built  with  support  for HSTS (HTTP Strict
149                     Transport Security) (Added in 7.74.0)
150
151              CURL_VERSION_HTTPS_PROXY
152                     libcurl was built with support for  HTTPS-proxy.   (Added
153                     in 7.52.0)
154
155              CURL_VERSION_HTTP2
156                     libcurl  was  built  with  support  for HTTP2.  (Added in
157                     7.33.0)
158
159              CURL_VERSION_HTTP3
160                     HTTP/3 and QUIC support are built-in (Added in 7.66.0)
161
162              CURL_VERSION_IDN
163                     libcurl was built with support  for  IDNA,  domain  names
164                     with international letters. (Added in 7.12.0)
165
166              CURL_VERSION_IPV6
167                     supports IPv6
168
169              CURL_VERSION_KERBEROS4
170                     supports Kerberos V4 (when using FTP). Legacy bit. Depre‐
171                     cated since 7.33.0.
172
173              CURL_VERSION_KERBEROS5
174                     supports Kerberos V5 authentication for FTP, IMAP,  POP3,
175                     SMTP and SOCKSv5 proxy (Added in 7.40.0)
176
177              CURL_VERSION_LARGEFILE
178                     libcurl was built with support for large files. (Added in
179                     7.11.1)
180
181              CURL_VERSION_UNICODE
182                     libcurl was built with Unicode support on  Windows.  This
183                     makes  non-ASCII characters work in filenames and options
184                     passed to libcurl. (Added in 7.72.0)
185
186              CURL_VERSION_LIBZ
187                     supports HTTP deflate using libz (Added in 7.10)
188
189              CURL_VERSION_MULTI_SSL
190                     libcurl was built with multiple  SSL  backends.  For  de‐
191                     tails, see curl_global_sslset(3).  (Added in 7.56.0)
192
193              CURL_VERSION_NTLM
194                     supports HTTP NTLM (added in 7.10.6)
195
196              CURL_VERSION_NTLM_WB
197                     libcurl  was  built with support for NTLM delegation to a
198                     winbind helper.  (Added in 7.22.0)
199
200              CURL_VERSION_PSL
201                     libcurl was built with support for Mozilla's Public  Suf‐
202                     fix List. This makes libcurl ignore cookies with a domain
203                     that's on the list.  (Added in 7.47.0)
204
205              CURL_VERSION_SPNEGO
206                     libcurl was built with support for SPNEGO  authentication
207                     (Simple  and Protected GSS-API Negotiation Mechanism, de‐
208                     fined in RFC 2478.) (added in 7.10.8)
209
210              CURL_VERSION_SSL
211                     supports SSL (HTTPS/FTPS) (Added in 7.10)
212
213              CURL_VERSION_SSPI
214                     libcurl was built with support for  SSPI.  This  is  only
215                     available  on  Windows and makes libcurl use Windows-pro‐
216                     vided functions for Kerberos, NTLM, SPNEGO and Digest au‐
217                     thentication.  It  also allows libcurl to use the current
218                     user credentials without the app having to pass them  on.
219                     (Added in 7.13.2)
220
221              CURL_VERSION_TLSAUTH_SRP
222                     libcurl  was  built  with  support for TLS-SRP (in one or
223                     more of the built-in TLS backends). (Added in 7.21.4)
224
225              CURL_VERSION_UNIX_SOCKETS
226                     libcurl was built with support for Unix  domain  sockets.
227                     (Added in 7.40.0)
228       ssl_version is an ASCII string for the TLS library name + version used.
229       If libcurl has no SSL support, this is NULL.  For  example  "Schannel",
230       "SecureTransport" or "OpenSSL/1.1.0g".
231
232       ssl_version_num is always 0.
233
234       libz_version  is  an  ASCII  string (there is no numerical version). If
235       libcurl has no libz support, this is NULL.
236
237       protocols is a pointer to an array of char * pointers,  containing  the
238       names  protocols  that  libcurl supports (using lowercase letters). The
239       protocol names are the same as would be used in URLs. The array is ter‐
240       minated by a NULL entry.
241

RETURN VALUE

243       A pointer to a curl_version_info_data struct.
244

SEE ALSO

246       curl_version(3)
247
248
249
250libcurl 7.76.1                 February 11, 2021          curl_version_info(3)
Impressum