|
30 | 30 | * https://cool.haxx.se/mailman/listinfo/curl-library/ |
31 | 31 | */ |
32 | 32 |
|
| 33 | +#ifdef CURL_NO_OLDIES |
| 34 | +#define CURL_STRICTER |
| 35 | +#endif |
| 36 | + |
33 | 37 | #include "curlver.h" /* libcurl version defines */ |
34 | 38 | #include "curlbuild.h" /* libcurl build definitions */ |
35 | 39 | #include "curlrules.h" /* libcurl rules enforcement */ |
|
91 | 95 | extern "C" { |
92 | 96 | #endif |
93 | 97 |
|
| 98 | +#if defined(BUILDING_LIBCURL) || defined(CURL_STRICTER) |
94 | 99 | typedef struct Curl_easy CURL; |
| 100 | +typedef struct Curl_share CURLSH; |
| 101 | +#else |
| 102 | +typedef void CURL; |
| 103 | +typedef void CURLSH; |
| 104 | +#endif |
95 | 105 |
|
96 | 106 | /* |
97 | 107 | * libcurl external API function linkage decorations. |
@@ -133,7 +143,7 @@ struct curl_httppost { |
133 | 143 | char *buffer; /* pointer to allocated buffer contents */ |
134 | 144 | long bufferlength; /* length of buffer field */ |
135 | 145 | char *contenttype; /* Content-Type */ |
136 | | - struct curl_slist* contentheader; /* list of extra headers for this form */ |
| 146 | + struct curl_slist *contentheader; /* list of extra headers for this form */ |
137 | 147 | struct curl_httppost *more; /* if one field name has more than one |
138 | 148 | file, this link should link to following |
139 | 149 | files */ |
@@ -260,7 +270,7 @@ struct curl_fileinfo { |
260 | 270 | unsigned int flags; |
261 | 271 |
|
262 | 272 | /* used internally */ |
263 | | - char * b_data; |
| 273 | + char *b_data; |
264 | 274 | size_t b_size; |
265 | 275 | size_t b_used; |
266 | 276 | }; |
@@ -425,7 +435,7 @@ typedef enum { |
425 | 435 | CURLE_COULDNT_RESOLVE_PROXY, /* 5 */ |
426 | 436 | CURLE_COULDNT_RESOLVE_HOST, /* 6 */ |
427 | 437 | CURLE_COULDNT_CONNECT, /* 7 */ |
428 | | - CURLE_FTP_WEIRD_SERVER_REPLY, /* 8 */ |
| 438 | + CURLE_WEIRD_SERVER_REPLY, /* 8 */ |
429 | 439 | CURLE_REMOTE_ACCESS_DENIED, /* 9 a service was denied by the server |
430 | 440 | due to lack of access - when login fails |
431 | 441 | this is not returned. */ |
@@ -556,6 +566,7 @@ typedef enum { |
556 | 566 |
|
557 | 567 | /* compatibility with older names */ |
558 | 568 | #define CURLOPT_ENCODING CURLOPT_ACCEPT_ENCODING |
| 569 | +#define CURLE_FTP_WEIRD_SERVER_REPLY CURLE_WEIRD_SERVER_REPLY |
559 | 570 |
|
560 | 571 | /* The following were added in 7.21.5, April 2011 */ |
561 | 572 | #define CURLE_UNKNOWN_TELNET_OPTION CURLE_UNKNOWN_OPTION |
@@ -629,6 +640,7 @@ typedef enum { |
629 | 640 | CONNECT HTTP/1.1 */ |
630 | 641 | CURLPROXY_HTTP_1_0 = 1, /* added in 7.19.4, force to use CONNECT |
631 | 642 | HTTP/1.0 */ |
| 643 | + CURLPROXY_HTTPS = 2, /* added in 7.52.0 */ |
632 | 644 | CURLPROXY_SOCKS4 = 4, /* support added in 7.15.2, enum existed already |
633 | 645 | in 7.10 */ |
634 | 646 | CURLPROXY_SOCKS5 = 5, /* added in 7.10 */ |
@@ -1195,7 +1207,8 @@ typedef enum { |
1195 | 1207 | CINIT(SHARE, OBJECTPOINT, 100), |
1196 | 1208 |
|
1197 | 1209 | /* indicates type of proxy. accepted values are CURLPROXY_HTTP (default), |
1198 | | - CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and CURLPROXY_SOCKS5. */ |
| 1210 | + CURLPROXY_HTTPS, CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and |
| 1211 | + CURLPROXY_SOCKS5. */ |
1199 | 1212 | CINIT(PROXYTYPE, LONG, 101), |
1200 | 1213 |
|
1201 | 1214 | /* Set the Accept-Encoding string. Use this to tell a server you would like |
@@ -1689,6 +1702,74 @@ typedef enum { |
1689 | 1702 | /* Set TCP Fast Open */ |
1690 | 1703 | CINIT(TCP_FASTOPEN, LONG, 244), |
1691 | 1704 |
|
| 1705 | + /* Continue to send data if the server responds early with an |
| 1706 | + * HTTP status code >= 300 */ |
| 1707 | + CINIT(KEEP_SENDING_ON_ERROR, LONG, 245), |
| 1708 | + |
| 1709 | + /* The CApath or CAfile used to validate the proxy certificate |
| 1710 | + this option is used only if PROXY_SSL_VERIFYPEER is true */ |
| 1711 | + CINIT(PROXY_CAINFO, STRINGPOINT, 246), |
| 1712 | + |
| 1713 | + /* The CApath directory used to validate the proxy certificate |
| 1714 | + this option is used only if PROXY_SSL_VERIFYPEER is true */ |
| 1715 | + CINIT(PROXY_CAPATH, STRINGPOINT, 247), |
| 1716 | + |
| 1717 | + /* Set if we should verify the proxy in ssl handshake, |
| 1718 | + set 1 to verify. */ |
| 1719 | + CINIT(PROXY_SSL_VERIFYPEER, LONG, 248), |
| 1720 | + |
| 1721 | + /* Set if we should verify the Common name from the proxy certificate in ssl |
| 1722 | + * handshake, set 1 to check existence, 2 to ensure that it matches |
| 1723 | + * the provided hostname. */ |
| 1724 | + CINIT(PROXY_SSL_VERIFYHOST, LONG, 249), |
| 1725 | + |
| 1726 | + /* What version to specifically try to use for proxy. |
| 1727 | + See CURL_SSLVERSION defines below. */ |
| 1728 | + CINIT(PROXY_SSLVERSION, LONG, 250), |
| 1729 | + |
| 1730 | + /* Set a username for authenticated TLS for proxy */ |
| 1731 | + CINIT(PROXY_TLSAUTH_USERNAME, STRINGPOINT, 251), |
| 1732 | + |
| 1733 | + /* Set a password for authenticated TLS for proxy */ |
| 1734 | + CINIT(PROXY_TLSAUTH_PASSWORD, STRINGPOINT, 252), |
| 1735 | + |
| 1736 | + /* Set authentication type for authenticated TLS for proxy */ |
| 1737 | + CINIT(PROXY_TLSAUTH_TYPE, STRINGPOINT, 253), |
| 1738 | + |
| 1739 | + /* name of the file keeping your private SSL-certificate for proxy */ |
| 1740 | + CINIT(PROXY_SSLCERT, STRINGPOINT, 254), |
| 1741 | + |
| 1742 | + /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") for |
| 1743 | + proxy */ |
| 1744 | + CINIT(PROXY_SSLCERTTYPE, STRINGPOINT, 255), |
| 1745 | + |
| 1746 | + /* name of the file keeping your private SSL-key for proxy */ |
| 1747 | + CINIT(PROXY_SSLKEY, STRINGPOINT, 256), |
| 1748 | + |
| 1749 | + /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") for |
| 1750 | + proxy */ |
| 1751 | + CINIT(PROXY_SSLKEYTYPE, STRINGPOINT, 257), |
| 1752 | + |
| 1753 | + /* password for the SSL private key for proxy */ |
| 1754 | + CINIT(PROXY_KEYPASSWD, STRINGPOINT, 258), |
| 1755 | + |
| 1756 | + /* Specify which SSL ciphers to use for proxy */ |
| 1757 | + CINIT(PROXY_SSL_CIPHER_LIST, STRINGPOINT, 259), |
| 1758 | + |
| 1759 | + /* CRL file for proxy */ |
| 1760 | + CINIT(PROXY_CRLFILE, STRINGPOINT, 260), |
| 1761 | + |
| 1762 | + /* Enable/disable specific SSL features with a bitmask for proxy, see |
| 1763 | + CURLSSLOPT_* */ |
| 1764 | + CINIT(PROXY_SSL_OPTIONS, LONG, 261), |
| 1765 | + |
| 1766 | + /* Name of pre proxy to use. */ |
| 1767 | + CINIT(PRE_PROXY, STRINGPOINT, 262), |
| 1768 | + |
| 1769 | + /* The public key in DER form used to validate the proxy public key |
| 1770 | + this option is used only if PROXY_SSL_VERIFYPEER is true */ |
| 1771 | + CINIT(PROXY_PINNEDPUBLICKEY, STRINGPOINT, 263), |
| 1772 | + |
1692 | 1773 | CURLOPT_LASTENTRY /* the last unused */ |
1693 | 1774 | } CURLoption; |
1694 | 1775 |
|
@@ -1790,6 +1871,7 @@ enum { |
1790 | 1871 | CURL_SSLVERSION_TLSv1_0, |
1791 | 1872 | CURL_SSLVERSION_TLSv1_1, |
1792 | 1873 | CURL_SSLVERSION_TLSv1_2, |
| 1874 | + CURL_SSLVERSION_TLSv1_3, |
1793 | 1875 |
|
1794 | 1876 | CURL_SSLVERSION_LAST /* never use, keep last */ |
1795 | 1877 | }; |
@@ -1824,7 +1906,10 @@ typedef enum { |
1824 | 1906 |
|
1825 | 1907 |
|
1826 | 1908 | /* curl_strequal() and curl_strnequal() are subject for removal in a future |
1827 | | - libcurl, see lib/README.curlx for details */ |
| 1909 | + libcurl, see lib/README.curlx for details |
| 1910 | +
|
| 1911 | + !checksrc! disable SPACEBEFOREPAREN 2 |
| 1912 | +*/ |
1828 | 1913 | CURL_EXTERN int (curl_strequal)(const char *s1, const char *s2); |
1829 | 1914 | CURL_EXTERN int (curl_strnequal)(const char *s1, const char *s2, size_t n); |
1830 | 1915 |
|
@@ -2194,9 +2279,12 @@ typedef enum { |
2194 | 2279 | CURLINFO_ACTIVESOCKET = CURLINFO_SOCKET + 44, |
2195 | 2280 | CURLINFO_TLS_SSL_PTR = CURLINFO_SLIST + 45, |
2196 | 2281 | CURLINFO_HTTP_VERSION = CURLINFO_LONG + 46, |
| 2282 | + CURLINFO_PROXY_SSL_VERIFYRESULT = CURLINFO_LONG + 47, |
| 2283 | + CURLINFO_PROTOCOL = CURLINFO_LONG + 48, |
| 2284 | + CURLINFO_SCHEME = CURLINFO_STRING + 49, |
2197 | 2285 | /* Fill in new entries below here! */ |
2198 | 2286 |
|
2199 | | - CURLINFO_LASTONE = 46 |
| 2287 | + CURLINFO_LASTONE = 49 |
2200 | 2288 | } CURLINFO; |
2201 | 2289 |
|
2202 | 2290 | /* CURLINFO_RESPONSE_CODE is the new name for the option previously known as |
@@ -2258,7 +2346,6 @@ typedef void (*curl_unlock_function)(CURL *handle, |
2258 | 2346 | curl_lock_data data, |
2259 | 2347 | void *userptr); |
2260 | 2348 |
|
2261 | | -typedef struct Curl_share CURLSH; |
2262 | 2349 |
|
2263 | 2350 | typedef enum { |
2264 | 2351 | CURLSHE_OK, /* all is fine */ |
@@ -2358,6 +2445,7 @@ typedef struct { |
2358 | 2445 | #define CURL_VERSION_UNIX_SOCKETS (1<<19) /* Unix domain sockets support */ |
2359 | 2446 | #define CURL_VERSION_PSL (1<<20) /* Mozilla's Public Suffix List, used |
2360 | 2447 | for cookie domain verification */ |
| 2448 | +#define CURL_VERSION_HTTPS_PROXY (1<<21) /* HTTPS-proxy support built-in */ |
2361 | 2449 |
|
2362 | 2450 | /* |
2363 | 2451 | * NAME curl_version_info() |
|
0 commit comments