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         /* when 'age' is CURLVERSION_NINTH or higher (>= 7.75.0), the members
82            below exist */
83         const char *hyper_version; /* human readable string. */
84         /* when 'age' is CURLVERSION_TENTH or higher (>= 7.77.0), the members
85            below exist */
86         const char *gsasl_version; /* human readable string. */
87       } curl_version_info_data;
88
89       age describes what the age of this struct is. The number depends on how
90       new the libcurl you're using is. You are however guaranteed  to  get  a
91       struct  that  you have a matching struct for in the header, as you tell
92       libcurl your "age" with the input argument.
93
94       version is just an ascii string for the libcurl version.
95
96       version_num is a 24 bit number created like this: <8 bits major number>
97       |  <8  bits  minor  number>  |  <8 bits patch number>. Version 7.9.8 is
98       therefore returned as 0x070908.
99
100       host is an ascii string showing what host information that this libcurl
101       was  built for. As discovered by a configure script or set by the build
102       environment.
103
104       features can have none, one or more bits set, and the currently defined
105       bits are:
106
107              CURL_VERSION_ALTSVC
108                     HTTP Alt-Svc parsing and the associated options (Added in
109                     7.64.1)
110
111              CURL_VERSION_ASYNCHDNS
112                     libcurl was built  with  support  for  asynchronous  name
113                     lookups,  which  allows more exact timeouts (even on Win‐
114                     dows) and less blocking when using the  multi  interface.
115                     (added in 7.10.7)
116
117              CURL_VERSION_BROTLI
118                     supports  HTTP Brotli content encoding using libbrotlidec
119                     (Added in 7.57.0)
120
121              CURL_VERSION_ZSTD
122                     supports HTTP zstd content encoding  using  zstd  library
123                     (Added in 7.72.0)
124
125              CURL_VERSION_CONV
126                     libcurl was built with support for character conversions,
127                     as provided by the CURLOPT_CONV_*  callbacks.  (Added  in
128                     7.15.4)
129
130              CURL_VERSION_CURLDEBUG
131                     libcurl  was  built  with memory tracking debug capabili‐
132                     ties. This is mainly of  interest  for  libcurl  hackers.
133                     (added in 7.19.6)
134
135              CURL_VERSION_DEBUG
136                     libcurl  was  built  with  debug  capabilities  (added in
137                     7.10.6)
138
139              CURL_VERSION_GSASL
140                     libcurl was built with libgsasl and thus with some  extra
141                     SCRAM-SHA authentication methods. (added in 7.76.0)
142
143              CURL_VERSION_GSSAPI
144                     libcurl  was  built  with support for GSS-API. This makes
145                     libcurl use provided functions for  Kerberos  and  SPNEGO
146                     authentication. It also allows libcurl to use the current
147                     user credentials without the app having to pass them  on.
148                     (Added in 7.38.0)
149
150              CURL_VERSION_GSSNEGOTIATE
151                     supports HTTP GSS-Negotiate (added in 7.10.6)
152
153              CURL_VERSION_HSTS
154                     libcurl  was  built  with  support  for HSTS (HTTP Strict
155                     Transport Security) (Added in 7.74.0)
156
157              CURL_VERSION_HTTPS_PROXY
158                     libcurl was built with support for  HTTPS-proxy.   (Added
159                     in 7.52.0)
160
161              CURL_VERSION_HTTP2
162                     libcurl  was  built  with  support  for HTTP2.  (Added in
163                     7.33.0)
164
165              CURL_VERSION_HTTP3
166                     HTTP/3 and QUIC support are built-in (Added in 7.66.0)
167
168              CURL_VERSION_IDN
169                     libcurl was built with support  for  IDNA,  domain  names
170                     with international letters. (Added in 7.12.0)
171
172              CURL_VERSION_IPV6
173                     supports IPv6
174
175              CURL_VERSION_KERBEROS4
176                     supports Kerberos V4 (when using FTP). Legacy bit. Depre‐
177                     cated since 7.33.0.
178
179              CURL_VERSION_KERBEROS5
180                     supports Kerberos V5 authentication for FTP, IMAP,  POP3,
181                     SMTP and SOCKSv5 proxy (Added in 7.40.0)
182
183              CURL_VERSION_LARGEFILE
184                     libcurl was built with support for large files. (Added in
185                     7.11.1)
186
187              CURL_VERSION_UNICODE
188                     libcurl was built with Unicode support on  Windows.  This
189                     makes  non-ASCII characters work in filenames and options
190                     passed to libcurl. (Added in 7.72.0)
191
192              CURL_VERSION_LIBZ
193                     supports HTTP deflate using libz (Added in 7.10)
194
195              CURL_VERSION_MULTI_SSL
196                     libcurl was built with multiple  SSL  backends.  For  de‐
197                     tails, see curl_global_sslset(3).  (Added in 7.56.0)
198
199              CURL_VERSION_NTLM
200                     supports HTTP NTLM (added in 7.10.6)
201
202              CURL_VERSION_NTLM_WB
203                     libcurl  was  built with support for NTLM delegation to a
204                     winbind helper.  (Added in 7.22.0)
205
206              CURL_VERSION_PSL
207                     libcurl was built with support for Mozilla's Public  Suf‐
208                     fix List. This makes libcurl ignore cookies with a domain
209                     that's on the list.  (Added in 7.47.0)
210
211              CURL_VERSION_SPNEGO
212                     libcurl was built with support for SPNEGO  authentication
213                     (Simple  and Protected GSS-API Negotiation Mechanism, de‐
214                     fined in RFC 2478.) (added in 7.10.8)
215
216              CURL_VERSION_SSL
217                     supports SSL (HTTPS/FTPS) (Added in 7.10)
218
219              CURL_VERSION_SSPI
220                     libcurl was built with support for  SSPI.  This  is  only
221                     available  on  Windows and makes libcurl use Windows-pro‐
222                     vided functions for Kerberos, NTLM, SPNEGO and Digest au‐
223                     thentication.  It  also allows libcurl to use the current
224                     user credentials without the app having to pass them  on.
225                     (Added in 7.13.2)
226
227              CURL_VERSION_TLSAUTH_SRP
228                     libcurl  was  built  with  support for TLS-SRP (in one or
229                     more of the built-in TLS backends). (Added in 7.21.4)
230
231              CURL_VERSION_UNIX_SOCKETS
232                     libcurl was built with support for Unix  domain  sockets.
233                     (Added in 7.40.0)
234       ssl_version is an ASCII string for the TLS library name + version used.
235       If libcurl has no SSL support, this is NULL.  For  example  "Schannel",
236       "SecureTransport" or "OpenSSL/1.1.0g".
237
238       ssl_version_num is always 0.
239
240       libz_version  is  an  ASCII  string (there is no numerical version). If
241       libcurl has no libz support, this is NULL.
242
243       protocols is a pointer to an array of char * pointers,  containing  the
244       names  protocols  that  libcurl supports (using lowercase letters). The
245       protocol names are the same as would be used in URLs. The array is ter‐
246       minated by a NULL entry.
247

RETURN VALUE

249       A pointer to a curl_version_info_data struct.
250

SEE ALSO

252       curl_version(3)
253
254
255
256libcurl 7.79.1                  April 03, 2021            curl_version_info(3)
Impressum