|
7 | 7 | * | (__| |_| | _ <| |___ |
8 | 8 | * \___|\___/|_| \_\_____| |
9 | 9 | * |
10 | | - * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. |
| 10 | + * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. |
11 | 11 | * |
12 | 12 | * This software is licensed as described in the file COPYING, which |
13 | 13 | * you should have received as part of this distribution. The terms |
@@ -143,7 +143,7 @@ struct curl_httppost { |
143 | 143 | char *buffer; /* pointer to allocated buffer contents */ |
144 | 144 | long bufferlength; /* length of buffer field */ |
145 | 145 | char *contenttype; /* Content-Type */ |
146 | | - struct curl_slist* contentheader; /* list of extra headers for this form */ |
| 146 | + struct curl_slist *contentheader; /* list of extra headers for this form */ |
147 | 147 | struct curl_httppost *more; /* if one field name has more than one |
148 | 148 | file, this link should link to following |
149 | 149 | files */ |
@@ -193,6 +193,11 @@ typedef int (*curl_xferinfo_callback)(void *clientp, |
193 | 193 | curl_off_t ultotal, |
194 | 194 | curl_off_t ulnow); |
195 | 195 |
|
| 196 | +#ifndef CURL_MAX_READ_SIZE |
| 197 | + /* The maximum receive buffer size configurable via CURLOPT_BUFFERSIZE. */ |
| 198 | +#define CURL_MAX_READ_SIZE 524288 |
| 199 | +#endif |
| 200 | + |
196 | 201 | #ifndef CURL_MAX_WRITE_SIZE |
197 | 202 | /* Tests have proven that 20K is a very bad buffer size for uploads on |
198 | 203 | Windows, while 16K for some odd reason performed a lot better. |
@@ -270,7 +275,7 @@ struct curl_fileinfo { |
270 | 275 | unsigned int flags; |
271 | 276 |
|
272 | 277 | /* used internally */ |
273 | | - char * b_data; |
| 278 | + char *b_data; |
274 | 279 | size_t b_size; |
275 | 280 | size_t b_used; |
276 | 281 | }; |
@@ -479,7 +484,7 @@ typedef enum { |
479 | 484 | CURLE_LDAP_CANNOT_BIND, /* 38 */ |
480 | 485 | CURLE_LDAP_SEARCH_FAILED, /* 39 */ |
481 | 486 | CURLE_OBSOLETE40, /* 40 - NOT USED */ |
482 | | - CURLE_FUNCTION_NOT_FOUND, /* 41 */ |
| 487 | + CURLE_FUNCTION_NOT_FOUND, /* 41 - NOT USED starting with 7.53.0 */ |
483 | 488 | CURLE_ABORTED_BY_CALLBACK, /* 42 */ |
484 | 489 | CURLE_BAD_FUNCTION_ARGUMENT, /* 43 */ |
485 | 490 | CURLE_OBSOLETE44, /* 44 - NOT USED */ |
@@ -640,6 +645,7 @@ typedef enum { |
640 | 645 | CONNECT HTTP/1.1 */ |
641 | 646 | CURLPROXY_HTTP_1_0 = 1, /* added in 7.19.4, force to use CONNECT |
642 | 647 | HTTP/1.0 */ |
| 648 | + CURLPROXY_HTTPS = 2, /* added in 7.52.0 */ |
643 | 649 | CURLPROXY_SOCKS4 = 4, /* support added in 7.15.2, enum existed already |
644 | 650 | in 7.10 */ |
645 | 651 | CURLPROXY_SOCKS5 = 5, /* added in 7.10 */ |
@@ -1206,7 +1212,8 @@ typedef enum { |
1206 | 1212 | CINIT(SHARE, OBJECTPOINT, 100), |
1207 | 1213 |
|
1208 | 1214 | /* indicates type of proxy. accepted values are CURLPROXY_HTTP (default), |
1209 | | - CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and CURLPROXY_SOCKS5. */ |
| 1215 | + CURLPROXY_HTTPS, CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and |
| 1216 | + CURLPROXY_SOCKS5. */ |
1210 | 1217 | CINIT(PROXYTYPE, LONG, 101), |
1211 | 1218 |
|
1212 | 1219 | /* Set the Accept-Encoding string. Use this to tell a server you would like |
@@ -1704,6 +1711,73 @@ typedef enum { |
1704 | 1711 | * HTTP status code >= 300 */ |
1705 | 1712 | CINIT(KEEP_SENDING_ON_ERROR, LONG, 245), |
1706 | 1713 |
|
| 1714 | + /* The CApath or CAfile used to validate the proxy certificate |
| 1715 | + this option is used only if PROXY_SSL_VERIFYPEER is true */ |
| 1716 | + CINIT(PROXY_CAINFO, STRINGPOINT, 246), |
| 1717 | + |
| 1718 | + /* The CApath directory used to validate the proxy certificate |
| 1719 | + this option is used only if PROXY_SSL_VERIFYPEER is true */ |
| 1720 | + CINIT(PROXY_CAPATH, STRINGPOINT, 247), |
| 1721 | + |
| 1722 | + /* Set if we should verify the proxy in ssl handshake, |
| 1723 | + set 1 to verify. */ |
| 1724 | + CINIT(PROXY_SSL_VERIFYPEER, LONG, 248), |
| 1725 | + |
| 1726 | + /* Set if we should verify the Common name from the proxy certificate in ssl |
| 1727 | + * handshake, set 1 to check existence, 2 to ensure that it matches |
| 1728 | + * the provided hostname. */ |
| 1729 | + CINIT(PROXY_SSL_VERIFYHOST, LONG, 249), |
| 1730 | + |
| 1731 | + /* What version to specifically try to use for proxy. |
| 1732 | + See CURL_SSLVERSION defines below. */ |
| 1733 | + CINIT(PROXY_SSLVERSION, LONG, 250), |
| 1734 | + |
| 1735 | + /* Set a username for authenticated TLS for proxy */ |
| 1736 | + CINIT(PROXY_TLSAUTH_USERNAME, STRINGPOINT, 251), |
| 1737 | + |
| 1738 | + /* Set a password for authenticated TLS for proxy */ |
| 1739 | + CINIT(PROXY_TLSAUTH_PASSWORD, STRINGPOINT, 252), |
| 1740 | + |
| 1741 | + /* Set authentication type for authenticated TLS for proxy */ |
| 1742 | + CINIT(PROXY_TLSAUTH_TYPE, STRINGPOINT, 253), |
| 1743 | + |
| 1744 | + /* name of the file keeping your private SSL-certificate for proxy */ |
| 1745 | + CINIT(PROXY_SSLCERT, STRINGPOINT, 254), |
| 1746 | + |
| 1747 | + /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") for |
| 1748 | + proxy */ |
| 1749 | + CINIT(PROXY_SSLCERTTYPE, STRINGPOINT, 255), |
| 1750 | + |
| 1751 | + /* name of the file keeping your private SSL-key for proxy */ |
| 1752 | + CINIT(PROXY_SSLKEY, STRINGPOINT, 256), |
| 1753 | + |
| 1754 | + /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") for |
| 1755 | + proxy */ |
| 1756 | + CINIT(PROXY_SSLKEYTYPE, STRINGPOINT, 257), |
| 1757 | + |
| 1758 | + /* password for the SSL private key for proxy */ |
| 1759 | + CINIT(PROXY_KEYPASSWD, STRINGPOINT, 258), |
| 1760 | + |
| 1761 | + /* Specify which SSL ciphers to use for proxy */ |
| 1762 | + CINIT(PROXY_SSL_CIPHER_LIST, STRINGPOINT, 259), |
| 1763 | + |
| 1764 | + /* CRL file for proxy */ |
| 1765 | + CINIT(PROXY_CRLFILE, STRINGPOINT, 260), |
| 1766 | + |
| 1767 | + /* Enable/disable specific SSL features with a bitmask for proxy, see |
| 1768 | + CURLSSLOPT_* */ |
| 1769 | + CINIT(PROXY_SSL_OPTIONS, LONG, 261), |
| 1770 | + |
| 1771 | + /* Name of pre proxy to use. */ |
| 1772 | + CINIT(PRE_PROXY, STRINGPOINT, 262), |
| 1773 | + |
| 1774 | + /* The public key in DER form used to validate the proxy public key |
| 1775 | + this option is used only if PROXY_SSL_VERIFYPEER is true */ |
| 1776 | + CINIT(PROXY_PINNEDPUBLICKEY, STRINGPOINT, 263), |
| 1777 | + |
| 1778 | + /* Path to an abstract Unix domain socket */ |
| 1779 | + CINIT(ABSTRACT_UNIX_SOCKET, STRINGPOINT, 264), |
| 1780 | + |
1707 | 1781 | CURLOPT_LASTENTRY /* the last unused */ |
1708 | 1782 | } CURLoption; |
1709 | 1783 |
|
@@ -1805,6 +1879,7 @@ enum { |
1805 | 1879 | CURL_SSLVERSION_TLSv1_0, |
1806 | 1880 | CURL_SSLVERSION_TLSv1_1, |
1807 | 1881 | CURL_SSLVERSION_TLSv1_2, |
| 1882 | + CURL_SSLVERSION_TLSv1_3, |
1808 | 1883 |
|
1809 | 1884 | CURL_SSLVERSION_LAST /* never use, keep last */ |
1810 | 1885 | }; |
@@ -1839,7 +1914,10 @@ typedef enum { |
1839 | 1914 |
|
1840 | 1915 |
|
1841 | 1916 | /* curl_strequal() and curl_strnequal() are subject for removal in a future |
1842 | | - libcurl, see lib/README.curlx for details */ |
| 1917 | + libcurl, see lib/README.curlx for details |
| 1918 | +
|
| 1919 | + !checksrc! disable SPACEBEFOREPAREN 2 |
| 1920 | +*/ |
1843 | 1921 | CURL_EXTERN int (curl_strequal)(const char *s1, const char *s2); |
1844 | 1922 | CURL_EXTERN int (curl_strnequal)(const char *s1, const char *s2, size_t n); |
1845 | 1923 |
|
@@ -2209,9 +2287,12 @@ typedef enum { |
2209 | 2287 | CURLINFO_ACTIVESOCKET = CURLINFO_SOCKET + 44, |
2210 | 2288 | CURLINFO_TLS_SSL_PTR = CURLINFO_SLIST + 45, |
2211 | 2289 | CURLINFO_HTTP_VERSION = CURLINFO_LONG + 46, |
| 2290 | + CURLINFO_PROXY_SSL_VERIFYRESULT = CURLINFO_LONG + 47, |
| 2291 | + CURLINFO_PROTOCOL = CURLINFO_LONG + 48, |
| 2292 | + CURLINFO_SCHEME = CURLINFO_STRING + 49, |
2212 | 2293 | /* Fill in new entries below here! */ |
2213 | 2294 |
|
2214 | | - CURLINFO_LASTONE = 46 |
| 2295 | + CURLINFO_LASTONE = 49 |
2215 | 2296 | } CURLINFO; |
2216 | 2297 |
|
2217 | 2298 | /* CURLINFO_RESPONSE_CODE is the new name for the option previously known as |
@@ -2372,6 +2453,7 @@ typedef struct { |
2372 | 2453 | #define CURL_VERSION_UNIX_SOCKETS (1<<19) /* Unix domain sockets support */ |
2373 | 2454 | #define CURL_VERSION_PSL (1<<20) /* Mozilla's Public Suffix List, used |
2374 | 2455 | for cookie domain verification */ |
| 2456 | +#define CURL_VERSION_HTTPS_PROXY (1<<21) /* HTTPS-proxy support built-in */ |
2375 | 2457 |
|
2376 | 2458 | /* |
2377 | 2459 | * NAME curl_version_info() |
|
0 commit comments