7
7
* | (__| |_| | _ <| |___
8
8
* \___|\___/|_| \_\_____|
9
9
*
10
- * Copyright (C) 1998 - 2020 , Daniel Stenberg, <daniel@haxx.se>, et al.
10
+ * Copyright (C) 1998 - 2021 , 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
25
25
/*
26
26
* If you have libcurl problems, all docs and details are found here:
27
27
* https://curl.se/libcurl/
28
- *
29
- * curl-library mailing list subscription and unsubscription web interface:
30
- * https://cool.haxx.se/mailman/listinfo/curl-library/
31
28
*/
32
29
33
30
#ifdef CURL_NO_OLDIES
74
71
#if defined(_AIX ) || defined(__NOVELL_LIBC__ ) || defined(__NetBSD__ ) || \
75
72
defined(__minix ) || defined(__SYMBIAN32__ ) || defined(__INTEGRITY ) || \
76
73
defined(ANDROID ) || defined(__ANDROID__ ) || defined(__OpenBSD__ ) || \
77
- defined(__CYGWIN__ ) || defined(AMIGA ) || \
78
- (defined(__FreeBSD_version ) && (__FreeBSD_version < 800000 ))
74
+ defined(__CYGWIN__ ) || defined(AMIGA ) || defined(__NuttX__ ) || \
75
+ (defined(__FreeBSD_version ) && (__FreeBSD_version < 800000 )) || \
76
+ defined(__VXWORKS__ )
79
77
#include <sys/select.h>
80
78
#endif
81
79
@@ -155,7 +153,8 @@ typedef enum {
155
153
CURLSSLBACKEND_AXTLS = 10 , /* never used since 7.63.0 */
156
154
CURLSSLBACKEND_MBEDTLS = 11 ,
157
155
CURLSSLBACKEND_MESALINK = 12 ,
158
- CURLSSLBACKEND_BEARSSL = 13
156
+ CURLSSLBACKEND_BEARSSL = 13 ,
157
+ CURLSSLBACKEND_RUSTLS = 14
159
158
} curl_sslbackend ;
160
159
161
160
/* aliases for library clones and renames */
@@ -540,7 +539,7 @@ typedef enum {
540
539
CURLE_OBSOLETE46 , /* 46 - NOT USED */
541
540
CURLE_TOO_MANY_REDIRECTS , /* 47 - catch endless re-direct loops */
542
541
CURLE_UNKNOWN_OPTION , /* 48 - User specified an unknown option */
543
- CURLE_TELNET_OPTION_SYNTAX , /* 49 - Malformed telnet option */
542
+ CURLE_SETOPT_OPTION_SYNTAX , /* 49 - Malformed setopt option */
544
543
CURLE_OBSOLETE50 , /* 50 - NOT USED */
545
544
CURLE_OBSOLETE51 , /* 51 - NOT USED */
546
545
CURLE_GOT_NOTHING , /* 52 - when this is a specific error */
@@ -611,6 +610,7 @@ typedef enum {
611
610
CURLE_HTTP3 , /* 95 - An HTTP/3 layer problem */
612
611
CURLE_QUIC_CONNECT_ERROR , /* 96 - QUIC connection error */
613
612
CURLE_PROXY , /* 97 - proxy handshake error */
613
+ CURLE_SSL_CLIENTCERT , /* 98 - client-side certificate required */
614
614
CURL_LAST /* never use! */
615
615
} CURLcode ;
616
616
@@ -634,6 +634,9 @@ typedef enum {
634
634
/* The following were added in 7.21.5, April 2011 */
635
635
#define CURLE_UNKNOWN_TELNET_OPTION CURLE_UNKNOWN_OPTION
636
636
637
+ /* Added for 7.78.0 */
638
+ #define CURLE_TELNET_OPTION_SYNTAX CURLE_SETOPT_OPTION_SYNTAX
639
+
637
640
/* The following were added in 7.17.1 */
638
641
/* These are scheduled to disappear by 2009 */
639
642
#define CURLE_SSL_PEER_CERTIFICATE CURLE_PEER_FAILED_VERIFICATION
@@ -787,6 +790,7 @@ typedef enum {
787
790
#define CURLAUTH_DIGEST_IE (((unsigned long)1)<<4)
788
791
#define CURLAUTH_NTLM_WB (((unsigned long)1)<<5)
789
792
#define CURLAUTH_BEARER (((unsigned long)1)<<6)
793
+ #define CURLAUTH_AWS_SIGV4 (((unsigned long)1)<<7)
790
794
#define CURLAUTH_ONLY (((unsigned long)1)<<31)
791
795
#define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE)
792
796
#define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE))
@@ -886,6 +890,10 @@ typedef enum {
886
890
operating system. Currently implemented under MS-Windows. */
887
891
#define CURLSSLOPT_NATIVE_CA (1<<4)
888
892
893
+ /* - CURLSSLOPT_AUTO_CLIENT_CERT tells libcurl to automatically locate and use
894
+ a client certificate for authentication. (Schannel) */
895
+ #define CURLSSLOPT_AUTO_CLIENT_CERT (1<<5)
896
+
889
897
/* The default connection attempt delay in milliseconds for happy eyeballs.
890
898
CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3 and happy-eyeballs-timeout-ms.d document
891
899
this value, keep them in sync. */
@@ -1015,6 +1023,7 @@ typedef CURLSTScode (*curl_hstswrite_callback)(CURL *easy,
1015
1023
#define CURLPROTO_SMB (1<<26)
1016
1024
#define CURLPROTO_SMBS (1<<27)
1017
1025
#define CURLPROTO_MQTT (1<<28)
1026
+ #define CURLPROTO_GOPHERS (1<<29)
1018
1027
#define CURLPROTO_ALL (~0) /* enable everything */
1019
1028
1020
1029
/* long may be 32 or 64 bits, but we should never depend on anything else
@@ -1458,8 +1467,8 @@ typedef enum {
1458
1467
#define CURLOPT_SERVER_RESPONSE_TIMEOUT CURLOPT_FTP_RESPONSE_TIMEOUT
1459
1468
1460
1469
/* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to
1461
- tell libcurl to resolve names to those IP versions only. This only has
1462
- affect on systems with support for more than one, i.e IPv4 _and_ IPv6. */
1470
+ tell libcurl to use those IP versions only. This only has effect on
1471
+ systems with support for more than one, i.e IPv4 _and_ IPv6. */
1463
1472
CURLOPT (CURLOPT_IPRESOLVE , CURLOPTTYPE_VALUES , 113 ),
1464
1473
1465
1474
/* Set this option to limit the size of a file that will be downloaded from
@@ -1614,7 +1623,7 @@ typedef enum {
1614
1623
CURLOPT (CURLOPT_NEW_FILE_PERMS , CURLOPTTYPE_LONG , 159 ),
1615
1624
CURLOPT (CURLOPT_NEW_DIRECTORY_PERMS , CURLOPTTYPE_LONG , 160 ),
1616
1625
1617
- /* Set the behaviour of POST when redirecting. Values must be set to one
1626
+ /* Set the behavior of POST when redirecting. Values must be set to one
1618
1627
of CURL_REDIR* defines below. This used to be called CURLOPT_POST301 */
1619
1628
CURLOPT (CURLOPT_POSTREDIR , CURLOPTTYPE_VALUES , 161 ),
1620
1629
@@ -2073,6 +2082,26 @@ typedef enum {
2073
2082
CURLOPT (CURLOPT_HSTSWRITEFUNCTION , CURLOPTTYPE_FUNCTIONPOINT , 303 ),
2074
2083
CURLOPT (CURLOPT_HSTSWRITEDATA , CURLOPTTYPE_CBPOINT , 304 ),
2075
2084
2085
+ /* Parameters for V4 signature */
2086
+ CURLOPT (CURLOPT_AWS_SIGV4 , CURLOPTTYPE_STRINGPOINT , 305 ),
2087
+
2088
+ /* Same as CURLOPT_SSL_VERIFYPEER but for DoH (DNS-over-HTTPS) servers. */
2089
+ CURLOPT (CURLOPT_DOH_SSL_VERIFYPEER , CURLOPTTYPE_LONG , 306 ),
2090
+
2091
+ /* Same as CURLOPT_SSL_VERIFYHOST but for DoH (DNS-over-HTTPS) servers. */
2092
+ CURLOPT (CURLOPT_DOH_SSL_VERIFYHOST , CURLOPTTYPE_LONG , 307 ),
2093
+
2094
+ /* Same as CURLOPT_SSL_VERIFYSTATUS but for DoH (DNS-over-HTTPS) servers. */
2095
+ CURLOPT (CURLOPT_DOH_SSL_VERIFYSTATUS , CURLOPTTYPE_LONG , 308 ),
2096
+
2097
+ /* The CA certificates as "blob" used to validate the peer certificate
2098
+ this option is used only if SSL_VERIFYPEER is true */
2099
+ CURLOPT (CURLOPT_CAINFO_BLOB , CURLOPTTYPE_BLOB , 309 ),
2100
+
2101
+ /* The CA certificates as "blob" used to validate the proxy certificate
2102
+ this option is used only if PROXY_SSL_VERIFYPEER is true */
2103
+ CURLOPT (CURLOPT_PROXY_CAINFO_BLOB , CURLOPTTYPE_BLOB , 310 ),
2104
+
2076
2105
CURLOPT_LASTENTRY /* the last unused */
2077
2106
} CURLoption ;
2078
2107
@@ -2107,10 +2136,10 @@ typedef enum {
2107
2136
/* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host
2108
2137
name resolves addresses using more than one IP protocol version, this
2109
2138
option might be handy to force libcurl to use a specific IP version. */
2110
- #define CURL_IPRESOLVE_WHATEVER 0 /* default, resolves addresses to all IP
2139
+ #define CURL_IPRESOLVE_WHATEVER 0 /* default, uses addresses to all IP
2111
2140
versions that your system allows */
2112
- #define CURL_IPRESOLVE_V4 1 /* resolve to IPv4 addresses */
2113
- #define CURL_IPRESOLVE_V6 2 /* resolve to IPv6 addresses */
2141
+ #define CURL_IPRESOLVE_V4 1 /* uses only IPv4 addresses/connections */
2142
+ #define CURL_IPRESOLVE_V6 2 /* uses only IPv6 addresses/connections */
2114
2143
2115
2144
/* three convenient "aliases" that follow the name scheme better */
2116
2145
#define CURLOPT_RTSPHEADER CURLOPT_HTTPHEADER
@@ -2746,8 +2775,9 @@ typedef enum {
2746
2775
CURLINFO_RETRY_AFTER = CURLINFO_OFF_T + 57 ,
2747
2776
CURLINFO_EFFECTIVE_METHOD = CURLINFO_STRING + 58 ,
2748
2777
CURLINFO_PROXY_ERROR = CURLINFO_LONG + 59 ,
2778
+ CURLINFO_REFERER = CURLINFO_STRING + 60 ,
2749
2779
2750
- CURLINFO_LASTONE = 59
2780
+ CURLINFO_LASTONE = 60
2751
2781
} CURLINFO ;
2752
2782
2753
2783
/* CURLINFO_RESPONSE_CODE is the new name for the option previously known as
@@ -2849,6 +2879,8 @@ typedef enum {
2849
2879
CURLVERSION_SIXTH ,
2850
2880
CURLVERSION_SEVENTH ,
2851
2881
CURLVERSION_EIGHTH ,
2882
+ CURLVERSION_NINTH ,
2883
+ CURLVERSION_TENTH ,
2852
2884
CURLVERSION_LAST /* never actually use this */
2853
2885
} CURLversion ;
2854
2886
@@ -2857,7 +2889,7 @@ typedef enum {
2857
2889
meant to be a built-in version number for what kind of struct the caller
2858
2890
expects. If the struct ever changes, we redefine the NOW to another enum
2859
2891
from above. */
2860
- #define CURLVERSION_NOW CURLVERSION_EIGHTH
2892
+ #define CURLVERSION_NOW CURLVERSION_TENTH
2861
2893
2862
2894
struct curl_version_info_data {
2863
2895
CURLversion age ; /* age of the returned struct */
@@ -2908,6 +2940,11 @@ struct curl_version_info_data {
2908
2940
(MAJOR << 24) | (MINOR << 12) | PATCH */
2909
2941
const char * zstd_version ; /* human readable string. */
2910
2942
2943
+ /* These fields were added in CURLVERSION_NINTH */
2944
+ const char * hyper_version ; /* human readable string. */
2945
+
2946
+ /* These fields were added in CURLVERSION_TENTH */
2947
+ const char * gsasl_version ; /* human readable string. */
2911
2948
};
2912
2949
typedef struct curl_version_info_data curl_version_info_data ;
2913
2950
@@ -2945,6 +2982,7 @@ typedef struct curl_version_info_data curl_version_info_data;
2945
2982
#define CURL_VERSION_ZSTD (1<<26) /* zstd features are present */
2946
2983
#define CURL_VERSION_UNICODE (1<<27) /* Unicode support on Windows */
2947
2984
#define CURL_VERSION_HSTS (1<<28) /* HSTS is supported */
2985
+ #define CURL_VERSION_GSASL (1<<29) /* libgsasl is supported */
2948
2986
2949
2987
/*
2950
2988
* NAME curl_version_info()
0 commit comments