freerasp-react-native 6.0.0 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/ios/FreeraspReactNative.swift +11 -4
  3. package/ios/TalsecRuntime.xcframework/_CodeSignature/CodeDirectory +0 -0
  4. package/ios/TalsecRuntime.xcframework/_CodeSignature/CodeResources +88 -88
  5. package/ios/TalsecRuntime.xcframework/_CodeSignature/CodeSignature +0 -0
  6. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/CurlWrapper.h +1 -1
  7. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +2 -2
  8. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/curl.h +292 -265
  9. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/curlver.h +10 -11
  10. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/easy.h +4 -6
  11. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/header.h +9 -9
  12. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/multi.h +147 -112
  13. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/options.h +1 -1
  14. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/system.h +14 -23
  15. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/typecheck-gcc.h +420 -403
  16. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/urlapi.h +29 -28
  17. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/websockets.h +10 -10
  18. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Info.plist +0 -0
  19. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.abi.json +563 -312
  20. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.private.swiftinterface +10 -3
  21. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  22. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftinterface +10 -3
  23. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/TalsecRuntime +0 -0
  24. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/_CodeSignature/CodeResources +35 -35
  25. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/cacert.pem +483 -1088
  26. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/CurlWrapper.h +1 -1
  27. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +4 -4
  28. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curl.h +292 -265
  29. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curlver.h +10 -11
  30. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/easy.h +4 -6
  31. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/header.h +9 -9
  32. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/multi.h +147 -112
  33. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/options.h +1 -1
  34. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/system.h +14 -23
  35. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/typecheck-gcc.h +420 -403
  36. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/urlapi.h +29 -28
  37. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/websockets.h +10 -10
  38. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Info.plist +0 -0
  39. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.abi.json +548 -297
  40. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +10 -3
  41. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  42. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftinterface +10 -3
  43. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.abi.json +548 -297
  44. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +10 -3
  45. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  46. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +10 -3
  47. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/TalsecRuntime +0 -0
  48. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/_CodeSignature/CodeResources +43 -43
  49. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/cacert.pem +483 -1088
  50. package/ios/TalsecRuntimePackage/Package.swift +2 -2
  51. package/ios/dispatchers/ExecutionStateDispatcher.swift +4 -3
  52. package/ios/models/RaspExecutionStates.swift +8 -1
  53. package/ios/utils/EventIdentifiers.swift +2 -2
  54. package/lib/commonjs/models/raspExecutionState.js +1 -2
  55. package/lib/commonjs/models/raspExecutionState.js.map +1 -1
  56. package/lib/module/models/raspExecutionState.js +1 -2
  57. package/lib/module/models/raspExecutionState.js.map +1 -1
  58. package/lib/typescript/src/models/raspExecutionState.d.ts.map +1 -1
  59. package/lib/typescript/src/types/types.d.ts +5 -7
  60. package/lib/typescript/src/types/types.d.ts.map +1 -1
  61. package/package.json +1 -1
  62. package/src/models/raspExecutionState.ts +5 -9
  63. package/src/types/types.ts +5 -7
@@ -59,7 +59,7 @@
59
59
  #define CURL_IGNORE_DEPRECATION(statements) statements
60
60
  #endif
61
61
 
62
- #include "curlver.h" /* libcurl version defines */
62
+ #include "curlver.h" /* libcurl version defines */
63
63
  #include "system.h" /* determine things runtime */
64
64
 
65
65
  #include <stdio.h>
@@ -93,7 +93,9 @@
93
93
  defined(__CYGWIN__) || defined(AMIGA) || defined(__NuttX__) || \
94
94
  (defined(__FreeBSD_version) && (__FreeBSD_version < 800000)) || \
95
95
  (defined(__MidnightBSD_version) && (__MidnightBSD_version < 100000)) || \
96
- defined(__sun__) || defined(__serenity__) || defined(__vxworks__)
96
+ defined(__sun__) || defined(__serenity__) || defined(__vxworks__) || \
97
+ (defined(__linux__) && defined(_POSIX_C_SOURCE) && \
98
+ _POSIX_C_SOURCE >= 200112L)
97
99
  #include <sys/select.h>
98
100
  #endif
99
101
 
@@ -142,7 +144,7 @@ typedef SOCKET curl_socket_t;
142
144
  #define CURL_SOCKET_BAD INVALID_SOCKET
143
145
  #else
144
146
  typedef int curl_socket_t;
145
- #define CURL_SOCKET_BAD -1
147
+ #define CURL_SOCKET_BAD (-1)
146
148
  #endif
147
149
  #define curl_socket_typedef
148
150
  #endif /* curl_socket_typedef */
@@ -202,26 +204,26 @@ struct curl_httppost {
202
204
  long flags; /* as defined below */
203
205
 
204
206
  /* specified content is a filename */
205
- #define CURL_HTTPPOST_FILENAME (1<<0)
207
+ #define CURL_HTTPPOST_FILENAME (1 << 0)
206
208
  /* specified content is a filename */
207
- #define CURL_HTTPPOST_READFILE (1<<1)
209
+ #define CURL_HTTPPOST_READFILE (1 << 1)
208
210
  /* name is only stored pointer do not free in formfree */
209
- #define CURL_HTTPPOST_PTRNAME (1<<2)
211
+ #define CURL_HTTPPOST_PTRNAME (1 << 2)
210
212
  /* contents is only stored pointer do not free in formfree */
211
- #define CURL_HTTPPOST_PTRCONTENTS (1<<3)
213
+ #define CURL_HTTPPOST_PTRCONTENTS (1 << 3)
212
214
  /* upload file from buffer */
213
- #define CURL_HTTPPOST_BUFFER (1<<4)
215
+ #define CURL_HTTPPOST_BUFFER (1 << 4)
214
216
  /* upload file from pointer contents */
215
- #define CURL_HTTPPOST_PTRBUFFER (1<<5)
217
+ #define CURL_HTTPPOST_PTRBUFFER (1 << 5)
216
218
  /* upload file contents by using the regular read callback to get the data and
217
219
  pass the given pointer as custom pointer */
218
- #define CURL_HTTPPOST_CALLBACK (1<<6)
220
+ #define CURL_HTTPPOST_CALLBACK (1 << 6)
219
221
  /* use size in 'contentlen', added in 7.46.0 */
220
- #define CURL_HTTPPOST_LARGE (1<<7)
222
+ #define CURL_HTTPPOST_LARGE (1 << 7)
221
223
 
222
224
  char *showfilename; /* The filename to show. If not set, the
223
- actual filename will be used (if this
224
- is a file part) */
225
+ actual filename is used (if this is
226
+ a file part) */
225
227
  void *userp; /* custom pointer used for
226
228
  HTTPPOST_CALLBACK posts */
227
229
  curl_off_t contentlen; /* alternative length of contents
@@ -229,9 +231,8 @@ struct curl_httppost {
229
231
  set. Added in 7.46.0 */
230
232
  };
231
233
 
232
-
233
- /* This is a return code for the progress callback that, when returned, will
234
- signal libcurl to continue executing the default progress function */
234
+ /* This is a return code for the progress callback that, when returned,
235
+ signals libcurl to continue executing the default progress function */
235
236
  #define CURL_PROGRESSFUNC_CONTINUE 0x10000001
236
237
 
237
238
  /* This is the CURLOPT_PROGRESSFUNCTION callback prototype. It is now
@@ -253,7 +254,7 @@ typedef int (*curl_xferinfo_callback)(void *clientp,
253
254
 
254
255
  #ifndef CURL_MAX_READ_SIZE
255
256
  /* The maximum receive buffer size configurable via CURLOPT_BUFFERSIZE. */
256
- #define CURL_MAX_READ_SIZE (10*1024*1024)
257
+ #define CURL_MAX_READ_SIZE (10 * 1024 * 1024)
257
258
  #endif
258
259
 
259
260
  #ifndef CURL_MAX_WRITE_SIZE
@@ -268,17 +269,17 @@ typedef int (*curl_xferinfo_callback)(void *clientp,
268
269
 
269
270
  #ifndef CURL_MAX_HTTP_HEADER
270
271
  /* The only reason to have a max limit for this is to avoid the risk of a bad
271
- server feeding libcurl with a never-ending header that will cause reallocs
272
+ server feeding libcurl with a never-ending header that causes reallocs
272
273
  infinitely */
273
- #define CURL_MAX_HTTP_HEADER (100*1024)
274
+ #define CURL_MAX_HTTP_HEADER (100 * 1024)
274
275
  #endif
275
276
 
276
277
  /* This is a magic return code for the write callback that, when returned,
277
- will signal libcurl to pause receiving on the current transfer. */
278
+ signals libcurl to pause receiving on the current transfer. */
278
279
  #define CURL_WRITEFUNC_PAUSE 0x10000001
279
280
 
280
281
  /* This is a magic return code for the write callback that, when returned,
281
- will signal an error from the callback. */
282
+ signals an error from the callback. */
282
283
  #define CURL_WRITEFUNC_ERROR 0xFFFFFFFF
283
284
 
284
285
  typedef size_t (*curl_write_callback)(char *buffer,
@@ -286,7 +287,7 @@ typedef size_t (*curl_write_callback)(char *buffer,
286
287
  size_t nitems,
287
288
  void *outstream);
288
289
 
289
- /* This callback will be called when a new resolver request is made */
290
+ /* This callback is called when a new resolver request is made */
290
291
  typedef int (*curl_resolver_start_callback)(void *resolver_state,
291
292
  void *reserved, void *userdata);
292
293
 
@@ -304,14 +305,14 @@ typedef enum {
304
305
  CURLFILETYPE_UNKNOWN /* should never occur */
305
306
  } curlfiletype;
306
307
 
307
- #define CURLFINFOFLAG_KNOWN_FILENAME (1<<0)
308
- #define CURLFINFOFLAG_KNOWN_FILETYPE (1<<1)
309
- #define CURLFINFOFLAG_KNOWN_TIME (1<<2)
310
- #define CURLFINFOFLAG_KNOWN_PERM (1<<3)
311
- #define CURLFINFOFLAG_KNOWN_UID (1<<4)
312
- #define CURLFINFOFLAG_KNOWN_GID (1<<5)
313
- #define CURLFINFOFLAG_KNOWN_SIZE (1<<6)
314
- #define CURLFINFOFLAG_KNOWN_HLINKCOUNT (1<<7)
308
+ #define CURLFINFOFLAG_KNOWN_FILENAME (1 << 0)
309
+ #define CURLFINFOFLAG_KNOWN_FILETYPE (1 << 1)
310
+ #define CURLFINFOFLAG_KNOWN_TIME (1 << 2)
311
+ #define CURLFINFOFLAG_KNOWN_PERM (1 << 3)
312
+ #define CURLFINFOFLAG_KNOWN_UID (1 << 4)
313
+ #define CURLFINFOFLAG_KNOWN_GID (1 << 5)
314
+ #define CURLFINFOFLAG_KNOWN_SIZE (1 << 6)
315
+ #define CURLFINFOFLAG_KNOWN_HLINKCOUNT (1 << 7)
315
316
 
316
317
  /* Information about a single file, used when doing FTP wildcard matching */
317
318
  struct curl_fileinfo {
@@ -386,11 +387,11 @@ typedef int (*curl_seek_callback)(void *instream,
386
387
  curl_off_t offset,
387
388
  int origin); /* 'whence' */
388
389
 
389
- /* This is a return code for the read callback that, when returned, will
390
- signal libcurl to immediately abort the current transfer. */
390
+ /* This is a return code for the read callback that, when returned,
391
+ signals libcurl to immediately abort the current transfer. */
391
392
  #define CURL_READFUNC_ABORT 0x10000000
392
- /* This is a return code for the read callback that, when returned, will
393
- signal libcurl to pause sending data on the current transfer. */
393
+ /* This is a return code for the read callback that, when returned,
394
+ signals libcurl to pause sending data on the current transfer. */
394
395
  #define CURL_READFUNC_PAUSE 0x10000001
395
396
 
396
397
  /* Return code for when the trailing headers' callback has terminated
@@ -401,12 +402,12 @@ typedef int (*curl_seek_callback)(void *instream,
401
402
  #define CURL_TRAILERFUNC_ABORT 1
402
403
 
403
404
  typedef size_t (*curl_read_callback)(char *buffer,
404
- size_t size,
405
- size_t nitems,
406
- void *instream);
405
+ size_t size,
406
+ size_t nitems,
407
+ void *instream);
407
408
 
408
409
  typedef int (*curl_trailer_callback)(struct curl_slist **list,
409
- void *userdata);
410
+ void *userdata);
410
411
 
411
412
  typedef enum {
412
413
  CURLSOCKTYPE_IPCXN, /* socket created for a specific IP connection */
@@ -594,7 +595,7 @@ typedef enum {
594
595
  CURLE_USE_SSL_FAILED, /* 64 - Requested FTP SSL level failed */
595
596
  CURLE_SEND_FAIL_REWIND, /* 65 - Sending the data requires a rewind
596
597
  that failed */
597
- CURLE_SSL_ENGINE_INITFAILED, /* 66 - failed to initialise ENGINE */
598
+ CURLE_SSL_ENGINE_INITFAILED, /* 66 - failed to initialize ENGINE */
598
599
  CURLE_LOGIN_DENIED, /* 67 - user, password or similar was not
599
600
  accepted and we failed to login */
600
601
  CURLE_TFTP_NOTFOUND, /* 68 - file not found on server */
@@ -610,7 +611,7 @@ typedef enum {
610
611
  or wrong format */
611
612
  CURLE_REMOTE_FILE_NOT_FOUND, /* 78 - remote file not found */
612
613
  CURLE_SSH, /* 79 - error from the SSH layer, somewhat
613
- generic so the error message will be of
614
+ generic so the error message is of
614
615
  interest when this has happened */
615
616
 
616
617
  CURLE_SSL_SHUTDOWN_FAILED, /* 80 - Failed to shut down the SSL
@@ -628,12 +629,12 @@ typedef enum {
628
629
  CURLE_FTP_BAD_FILE_LIST, /* 87 - unable to parse FTP file list */
629
630
  CURLE_CHUNK_FAILED, /* 88 - chunk callback reported error */
630
631
  CURLE_NO_CONNECTION_AVAILABLE, /* 89 - No connection available, the
631
- session will be queued */
632
+ session is queued */
632
633
  CURLE_SSL_PINNEDPUBKEYNOTMATCH, /* 90 - specified pinned public key did not
633
634
  match */
634
635
  CURLE_SSL_INVALIDCERTSTATUS, /* 91 - invalid certificate status */
635
636
  CURLE_HTTP2_STREAM, /* 92 - stream error in HTTP/2 framing layer
636
- */
637
+ */
637
638
  CURLE_RECURSIVE_API_CALL, /* 93 - an api function was called from
638
639
  inside a callback */
639
640
  CURLE_AUTH_ERROR, /* 94 - an authentication function returned an
@@ -803,9 +804,11 @@ typedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl, /* easy handle */
803
804
  #define CURLPROXY_SOCKS5_HOSTNAME 7L /* Use the SOCKS5 protocol but pass along
804
805
  the hostname rather than the IP
805
806
  address. added in 7.18.0 */
807
+ #define CURLPROXY_HTTPS3 8L /* HTTPS and attempt HTTP/3
808
+ added in 8.21.0 */
806
809
 
807
810
  typedef enum {
808
- CURLPROXY_LAST = 8 /* never use */
811
+ CURLPROXY_LAST = 9 /* never use */
809
812
  } curl_proxytype; /* this enum was added in 7.10 */
810
813
 
811
814
  /*
@@ -817,44 +820,55 @@ typedef enum {
817
820
  * CURLAUTH_NEGOTIATE - HTTP Negotiate (SPNEGO) authentication
818
821
  * CURLAUTH_GSSNEGOTIATE - Alias for CURLAUTH_NEGOTIATE (deprecated)
819
822
  * CURLAUTH_NTLM - HTTP NTLM authentication
820
- * CURLAUTH_DIGEST_IE - HTTP Digest authentication with IE flavour
823
+ * CURLAUTH_DIGEST_IE - HTTP Digest authentication with IE flavor
821
824
  * CURLAUTH_NTLM_WB - HTTP NTLM authentication delegated to winbind helper
822
825
  * CURLAUTH_BEARER - HTTP Bearer token authentication
823
826
  * CURLAUTH_ONLY - Use together with a single other type to force no
824
- * authentication or just that single type
827
+ * authentication or that single type
825
828
  * CURLAUTH_ANY - All fine types set
826
829
  * CURLAUTH_ANYSAFE - All fine types except Basic
827
830
  */
828
831
 
829
832
  #define CURLAUTH_NONE ((unsigned long)0)
830
- #define CURLAUTH_BASIC (((unsigned long)1)<<0)
831
- #define CURLAUTH_DIGEST (((unsigned long)1)<<1)
832
- #define CURLAUTH_NEGOTIATE (((unsigned long)1)<<2)
833
+ #define CURLAUTH_BASIC (((unsigned long)1) << 0)
834
+ #define CURLAUTH_DIGEST (((unsigned long)1) << 1)
835
+ #define CURLAUTH_NEGOTIATE (((unsigned long)1) << 2)
833
836
  /* Deprecated since the advent of CURLAUTH_NEGOTIATE */
834
837
  #define CURLAUTH_GSSNEGOTIATE CURLAUTH_NEGOTIATE
835
838
  /* Used for CURLOPT_SOCKS5_AUTH to stay terminologically correct */
836
839
  #define CURLAUTH_GSSAPI CURLAUTH_NEGOTIATE
837
- #define CURLAUTH_NTLM (((unsigned long)1)<<3)
838
- #define CURLAUTH_DIGEST_IE (((unsigned long)1)<<4)
840
+ #define CURLAUTH_NTLM (((unsigned long)1) << 3)
841
+ #define CURLAUTH_DIGEST_IE (((unsigned long)1) << 4)
839
842
  #ifndef CURL_NO_OLDIES
840
843
  /* functionality removed since 8.8.0 */
841
- #define CURLAUTH_NTLM_WB (((unsigned long)1)<<5)
844
+ #define CURLAUTH_NTLM_WB (((unsigned long)1) << 5)
842
845
  #endif
843
- #define CURLAUTH_BEARER (((unsigned long)1)<<6)
844
- #define CURLAUTH_AWS_SIGV4 (((unsigned long)1)<<7)
845
- #define CURLAUTH_ONLY (((unsigned long)1)<<31)
846
- #define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE)
847
- #define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE))
848
-
849
- #define CURLSSH_AUTH_ANY ~0L /* all types supported by the server */
850
- #define CURLSSH_AUTH_NONE 0L /* none allowed, silly but complete */
851
- #define CURLSSH_AUTH_PUBLICKEY (1L<<0) /* public/private key files */
852
- #define CURLSSH_AUTH_PASSWORD (1L<<1) /* password */
853
- #define CURLSSH_AUTH_HOST (1L<<2) /* host key files */
854
- #define CURLSSH_AUTH_KEYBOARD (1L<<3) /* keyboard interactive */
855
- #define CURLSSH_AUTH_AGENT (1L<<4) /* agent (ssh-agent, pageant...) */
856
- #define CURLSSH_AUTH_GSSAPI (1L<<5) /* gssapi (kerberos, ...) */
857
- #define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY
846
+ #define CURLAUTH_BEARER (((unsigned long)1) << 6)
847
+ #define CURLAUTH_AWS_SIGV4 (((unsigned long)1) << 7)
848
+ #define CURLAUTH_HTTPSIG (((unsigned long)1) << 8)
849
+ #define CURLAUTH_ONLY (((unsigned long)1) << 31)
850
+ #define CURLAUTH_ANY ((~(CURLAUTH_DIGEST_IE | \
851
+ CURLAUTH_HTTPSIG)) & \
852
+ ((unsigned long)0xffffffff))
853
+ #define CURLAUTH_ANYSAFE ((~(CURLAUTH_BASIC | CURLAUTH_DIGEST_IE | \
854
+ CURLAUTH_HTTPSIG)) & \
855
+ ((unsigned long)0xffffffff))
856
+
857
+ /* constants for CURLOPT_HTTPSIG_ALGORITHM */
858
+ #define CURLHTTPSIG_NONE 0L
859
+ #define CURLHTTPSIG_ED25519 1L
860
+ #define CURLHTTPSIG_HMAC_SHA256 2L
861
+
862
+ /* all types supported by server */
863
+ #define CURLSSH_AUTH_ANY ((unsigned long)0xffffffff)
864
+ #define CURLSSH_AUTH_NONE 0L /* none allowed, silly but complete */
865
+ #define CURLSSH_AUTH_PUBLICKEY (1L << 0) /* public/private key files */
866
+ #define CURLSSH_AUTH_PASSWORD (1L << 1) /* password */
867
+ #define CURLSSH_AUTH_HOST (1L << 2) /* host key files */
868
+ #define CURLSSH_AUTH_KEYBOARD (1L << 3) /* keyboard interactive */
869
+ #define CURLSSH_AUTH_AGENT (1L << 4) /* agent (ssh-agent, pageant...) */
870
+ #define CURLSSH_AUTH_GSSAPI (1L << 5) /* gssapi (kerberos, ...) */
871
+ #define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY
858
872
 
859
873
  #define CURLGSSAPI_DELEGATION_NONE 0L /* no delegation (default) */
860
874
  #define CURLGSSAPI_DELEGATION_POLICY_FLAG (1L<<0) /* if permitted by policy */
@@ -886,7 +900,7 @@ enum curl_khstat {
886
900
  CURLKHSTAT_REJECT, /* reject the connection, return an error */
887
901
  CURLKHSTAT_DEFER, /* do not accept it, but we cannot answer right now.
888
902
  Causes a CURLE_PEER_FAILED_VERIFICATION error but the
889
- connection will be left intact etc */
903
+ connection is left intact etc */
890
904
  CURLKHSTAT_FINE_REPLACE, /* accept and replace the wrong key */
891
905
  CURLKHSTAT_LAST /* not for use, only a marker for last-in-list */
892
906
  };
@@ -900,23 +914,22 @@ enum curl_khmatch {
900
914
  };
901
915
 
902
916
  typedef int
903
- (*curl_sshkeycallback) (CURL *easy, /* easy handle */
904
- const struct curl_khkey *knownkey, /* known */
905
- const struct curl_khkey *foundkey, /* found */
906
- enum curl_khmatch, /* libcurl's view on the keys */
907
- void *clientp); /* custom pointer passed with */
908
- /* CURLOPT_SSH_KEYDATA */
917
+ (*curl_sshkeycallback)(CURL *easy, /* easy handle */
918
+ const struct curl_khkey *knownkey, /* known */
919
+ const struct curl_khkey *foundkey, /* found */
920
+ enum curl_khmatch, /* libcurl's view on the keys */
921
+ void *clientp); /* custom pointer passed with */
922
+ /* CURLOPT_SSH_KEYDATA */
909
923
 
910
924
  typedef int
911
- (*curl_sshhostkeycallback) (void *clientp,/* custom pointer passed */
912
- /* with CURLOPT_SSH_HOSTKEYDATA */
925
+ (*curl_sshhostkeycallback)(void *clientp,/* custom pointer passed */
926
+ /* with CURLOPT_SSH_HOSTKEYDATA */
913
927
  int keytype, /* CURLKHTYPE */
914
928
  const char *key, /* hostkey to check */
915
929
  size_t keylen); /* length of the key */
916
930
  /* return CURLE_OK to accept */
917
931
  /* or something else to refuse */
918
932
 
919
-
920
933
  /* parameter for the CURLOPT_USE_SSL option */
921
934
  #define CURLUSESSL_NONE 0L /* do not attempt to use SSL */
922
935
  #define CURLUSESSL_TRY 1L /* try using SSL, proceed anyway otherwise */
@@ -931,34 +944,34 @@ typedef enum {
931
944
 
932
945
  /* - ALLOW_BEAST tells libcurl to allow the BEAST SSL vulnerability in the
933
946
  name of improving interoperability with older servers. Some SSL libraries
934
- have introduced work-arounds for this flaw but those work-arounds sometimes
947
+ have introduced workarounds for this flaw but those workarounds sometimes
935
948
  make the SSL communication fail. To regain functionality with those broken
936
949
  servers, a user can this way allow the vulnerability back. */
937
- #define CURLSSLOPT_ALLOW_BEAST (1L<<0)
950
+ #define CURLSSLOPT_ALLOW_BEAST (1L << 0)
938
951
 
939
952
  /* - NO_REVOKE tells libcurl to disable certificate revocation checks for those
940
953
  SSL backends where such behavior is present. */
941
- #define CURLSSLOPT_NO_REVOKE (1L<<1)
954
+ #define CURLSSLOPT_NO_REVOKE (1L << 1)
942
955
 
943
956
  /* - NO_PARTIALCHAIN tells libcurl to *NOT* accept a partial certificate chain
944
957
  if possible. The OpenSSL backend has this ability. */
945
- #define CURLSSLOPT_NO_PARTIALCHAIN (1L<<2)
958
+ #define CURLSSLOPT_NO_PARTIALCHAIN (1L << 2)
946
959
 
947
960
  /* - REVOKE_BEST_EFFORT tells libcurl to ignore certificate revocation offline
948
961
  checks and ignore missing revocation list for those SSL backends where such
949
962
  behavior is present. */
950
- #define CURLSSLOPT_REVOKE_BEST_EFFORT (1L<<3)
963
+ #define CURLSSLOPT_REVOKE_BEST_EFFORT (1L << 3)
951
964
 
952
965
  /* - CURLSSLOPT_NATIVE_CA tells libcurl to use standard certificate store of
953
966
  operating system. Currently implemented under MS-Windows. */
954
- #define CURLSSLOPT_NATIVE_CA (1L<<4)
967
+ #define CURLSSLOPT_NATIVE_CA (1L << 4)
955
968
 
956
969
  /* - CURLSSLOPT_AUTO_CLIENT_CERT tells libcurl to automatically locate and use
957
970
  a client certificate for authentication. (Schannel) */
958
- #define CURLSSLOPT_AUTO_CLIENT_CERT (1L<<5)
971
+ #define CURLSSLOPT_AUTO_CLIENT_CERT (1L << 5)
959
972
 
960
973
  /* If possible, send data using TLS 1.3 early data */
961
- #define CURLSSLOPT_EARLYDATA (1L<<6)
974
+ #define CURLSSLOPT_EARLYDATA (1L << 6)
962
975
 
963
976
  /* The default connection attempt delay in milliseconds for happy eyeballs.
964
977
  CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3 and happy-eyeballs-timeout-ms.d document
@@ -1025,20 +1038,20 @@ typedef enum {
1025
1038
 
1026
1039
  /* bitmask defines for CURLOPT_HEADEROPT */
1027
1040
  #define CURLHEADER_UNIFIED 0L
1028
- #define CURLHEADER_SEPARATE (1L<<0)
1041
+ #define CURLHEADER_SEPARATE (1L << 0)
1029
1042
 
1030
1043
  /* CURLALTSVC_* are bits for the CURLOPT_ALTSVC_CTRL option */
1031
- #define CURLALTSVC_READONLYFILE (1L<<2)
1032
- #define CURLALTSVC_H1 (1L<<3)
1033
- #define CURLALTSVC_H2 (1L<<4)
1034
- #define CURLALTSVC_H3 (1L<<5)
1044
+ #define CURLALTSVC_READONLYFILE (1L << 2)
1045
+ #define CURLALTSVC_H1 (1L << 3)
1046
+ #define CURLALTSVC_H2 (1L << 4)
1047
+ #define CURLALTSVC_H3 (1L << 5)
1035
1048
 
1036
1049
  /* bitmask values for CURLOPT_UPLOAD_FLAGS */
1037
- #define CURLULFLAG_ANSWERED (1L<<0)
1038
- #define CURLULFLAG_DELETED (1L<<1)
1039
- #define CURLULFLAG_DRAFT (1L<<2)
1040
- #define CURLULFLAG_FLAGGED (1L<<3)
1041
- #define CURLULFLAG_SEEN (1L<<4)
1050
+ #define CURLULFLAG_ANSWERED (1L << 0)
1051
+ #define CURLULFLAG_DELETED (1L << 1)
1052
+ #define CURLULFLAG_DRAFT (1L << 2)
1053
+ #define CURLULFLAG_FLAGGED (1L << 3)
1054
+ #define CURLULFLAG_SEEN (1L << 4)
1042
1055
 
1043
1056
  struct curl_hstsentry {
1044
1057
  char *name;
@@ -1067,42 +1080,43 @@ typedef CURLSTScode (*curl_hstswrite_callback)(CURL *easy,
1067
1080
  void *userp);
1068
1081
 
1069
1082
  /* CURLHSTS_* are bits for the CURLOPT_HSTS option */
1070
- #define CURLHSTS_ENABLE (1L<<0)
1071
- #define CURLHSTS_READONLYFILE (1L<<1)
1083
+ #define CURLHSTS_ENABLE (1L << 0)
1084
+ #define CURLHSTS_READONLYFILE (1L << 1)
1072
1085
 
1073
1086
  /* The CURLPROTO_ defines below are for the **deprecated** CURLOPT_*PROTOCOLS
1074
1087
  options. Do not use. */
1075
- #define CURLPROTO_HTTP (1L<<0)
1076
- #define CURLPROTO_HTTPS (1L<<1)
1077
- #define CURLPROTO_FTP (1L<<2)
1078
- #define CURLPROTO_FTPS (1L<<3)
1079
- #define CURLPROTO_SCP (1L<<4)
1080
- #define CURLPROTO_SFTP (1L<<5)
1081
- #define CURLPROTO_TELNET (1L<<6)
1082
- #define CURLPROTO_LDAP (1L<<7)
1083
- #define CURLPROTO_LDAPS (1L<<8)
1084
- #define CURLPROTO_DICT (1L<<9)
1085
- #define CURLPROTO_FILE (1L<<10)
1086
- #define CURLPROTO_TFTP (1L<<11)
1087
- #define CURLPROTO_IMAP (1L<<12)
1088
- #define CURLPROTO_IMAPS (1L<<13)
1089
- #define CURLPROTO_POP3 (1L<<14)
1090
- #define CURLPROTO_POP3S (1L<<15)
1091
- #define CURLPROTO_SMTP (1L<<16)
1092
- #define CURLPROTO_SMTPS (1L<<17)
1093
- #define CURLPROTO_RTSP (1L<<18)
1094
- #define CURLPROTO_RTMP (1L<<19)
1095
- #define CURLPROTO_RTMPT (1L<<20)
1096
- #define CURLPROTO_RTMPE (1L<<21)
1097
- #define CURLPROTO_RTMPTE (1L<<22)
1098
- #define CURLPROTO_RTMPS (1L<<23)
1099
- #define CURLPROTO_RTMPTS (1L<<24)
1100
- #define CURLPROTO_GOPHER (1L<<25)
1101
- #define CURLPROTO_SMB (1L<<26)
1102
- #define CURLPROTO_SMBS (1L<<27)
1103
- #define CURLPROTO_MQTT (1L<<28)
1104
- #define CURLPROTO_GOPHERS (1L<<29)
1105
- #define CURLPROTO_ALL (~0L) /* enable everything */
1088
+ #define CURLPROTO_HTTP (1L << 0)
1089
+ #define CURLPROTO_HTTPS (1L << 1)
1090
+ #define CURLPROTO_FTP (1L << 2)
1091
+ #define CURLPROTO_FTPS (1L << 3)
1092
+ #define CURLPROTO_SCP (1L << 4)
1093
+ #define CURLPROTO_SFTP (1L << 5)
1094
+ #define CURLPROTO_TELNET (1L << 6)
1095
+ #define CURLPROTO_LDAP (1L << 7)
1096
+ #define CURLPROTO_LDAPS (1L << 8)
1097
+ #define CURLPROTO_DICT (1L << 9)
1098
+ #define CURLPROTO_FILE (1L << 10)
1099
+ #define CURLPROTO_TFTP (1L << 11)
1100
+ #define CURLPROTO_IMAP (1L << 12)
1101
+ #define CURLPROTO_IMAPS (1L << 13)
1102
+ #define CURLPROTO_POP3 (1L << 14)
1103
+ #define CURLPROTO_POP3S (1L << 15)
1104
+ #define CURLPROTO_SMTP (1L << 16)
1105
+ #define CURLPROTO_SMTPS (1L << 17)
1106
+ #define CURLPROTO_RTSP (1L << 18)
1107
+ #define CURLPROTO_RTMP (1L << 19)
1108
+ #define CURLPROTO_RTMPT (1L << 20)
1109
+ #define CURLPROTO_RTMPE (1L << 21)
1110
+ #define CURLPROTO_RTMPTE (1L << 22)
1111
+ #define CURLPROTO_RTMPS (1L << 23)
1112
+ #define CURLPROTO_RTMPTS (1L << 24)
1113
+ #define CURLPROTO_GOPHER (1L << 25)
1114
+ #define CURLPROTO_SMB (1L << 26)
1115
+ #define CURLPROTO_SMBS (1L << 27)
1116
+ #define CURLPROTO_MQTT (1L << 28)
1117
+ #define CURLPROTO_GOPHERS (1L << 29)
1118
+ #define CURLPROTO_ALL ((unsigned long)0xffffffff) /* old-style enable
1119
+ "everything" */
1106
1120
 
1107
1121
  /* long may be 32 or 64 bits, but we should never depend on anything else
1108
1122
  but 32 */
@@ -1115,9 +1129,9 @@ typedef CURLSTScode (*curl_hstswrite_callback)(CURL *easy,
1115
1129
  /* *STRINGPOINT is an alias for OBJECTPOINT to allow tools to extract the
1116
1130
  string options from the header file */
1117
1131
 
1118
-
1119
- #define CURLOPT(na,t,nu) na = t + nu
1120
- #define CURLOPTDEPRECATED(na,t,nu,v,m) na CURL_DEPRECATED(v,m) = t + nu
1132
+ #define CURLOPT(na, t, nu) na = ((t) + (nu))
1133
+ #define CURLOPTDEPRECATED(na, t, nu, v, m) na CURL_DEPRECATED(v, m) \
1134
+ = ((t) + (nu))
1121
1135
 
1122
1136
  /* CURLOPT aliases that make no runtime difference */
1123
1137
 
@@ -1168,12 +1182,12 @@ typedef enum {
1168
1182
  * bytes big. */
1169
1183
  CURLOPT(CURLOPT_ERRORBUFFER, CURLOPTTYPE_OBJECTPOINT, 10),
1170
1184
 
1171
- /* Function that will be called to store the output (instead of fwrite). The
1172
- * parameters will use fwrite() syntax, make sure to follow them. */
1185
+ /* Function that is called to store the output (instead of fwrite). The
1186
+ * parameters use fwrite() syntax, make sure to follow them. */
1173
1187
  CURLOPT(CURLOPT_WRITEFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 11),
1174
1188
 
1175
- /* Function that will be called to read the input (instead of fread). The
1176
- * parameters will use fread() syntax, make sure to follow them. */
1189
+ /* Function that is called to read the input (instead of fread). The
1190
+ * parameters use fread() syntax, make sure to follow them. */
1177
1191
  CURLOPT(CURLOPT_READFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 12),
1178
1192
 
1179
1193
  /* Time-out the read operation after this amount of seconds */
@@ -1247,7 +1261,7 @@ typedef enum {
1247
1261
  CURLOPT(CURLOPT_QUOTE, CURLOPTTYPE_SLISTPOINT, 28),
1248
1262
 
1249
1263
  /* send FILE * or void * to store headers to, if you use a callback it
1250
- is simply passed to the callback unmodified */
1264
+ is passed to the callback unmodified */
1251
1265
  CURLOPT(CURLOPT_HEADERDATA, CURLOPTTYPE_CBPOINT, 29),
1252
1266
 
1253
1267
  /* point to a file to read the initial cookies from, also enables
@@ -1327,7 +1341,7 @@ typedef enum {
1327
1341
  /* 55 = OBSOLETE */
1328
1342
 
1329
1343
  /* DEPRECATED
1330
- * Function that will be called instead of the internal progress display
1344
+ * Function that is called instead of the internal progress display
1331
1345
  * function. This function should be defined as the curl_progress_callback
1332
1346
  * prototype defines. */
1333
1347
  CURLOPTDEPRECATED(CURLOPT_PROGRESSFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 56,
@@ -1356,10 +1370,11 @@ typedef enum {
1356
1370
 
1357
1371
  /* Set the krb4/5 security level, this also enables krb4/5 awareness. This
1358
1372
  * is a string, 'clear', 'safe', 'confidential' or 'private'. If the string
1359
- * is set but does not match one of these, 'private' will be used. */
1360
- CURLOPT(CURLOPT_KRBLEVEL, CURLOPTTYPE_STRINGPOINT, 63),
1373
+ * is set but does not match one of these, 'private' is used. */
1374
+ CURLOPTDEPRECATED(CURLOPT_KRBLEVEL, CURLOPTTYPE_STRINGPOINT, 63,
1375
+ 8.17.0, "removed"),
1361
1376
 
1362
- /* Set if we should verify the peer in ssl handshake, set 1 to verify. */
1377
+ /* Set if we should verify the peer in SSL handshake, set 1 to verify. */
1363
1378
  CURLOPT(CURLOPT_SSL_VERIFYPEER, CURLOPTTYPE_LONG, 64),
1364
1379
 
1365
1380
  /* The CApath or CAfile used to validate the peer certificate
@@ -1408,8 +1423,8 @@ typedef enum {
1408
1423
  OK within this time, then fine... This only aborts the connect phase. */
1409
1424
  CURLOPT(CURLOPT_CONNECTTIMEOUT, CURLOPTTYPE_LONG, 78),
1410
1425
 
1411
- /* Function that will be called to store headers (instead of fwrite). The
1412
- * parameters will use fwrite() syntax, make sure to follow them. */
1426
+ /* Function that is called to store headers (instead of fwrite). The
1427
+ * parameters use fwrite() syntax, make sure to follow them. */
1413
1428
  CURLOPT(CURLOPT_HEADERFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 79),
1414
1429
 
1415
1430
  /* Set this to force the HTTP request to get back to GET. Only really usable
@@ -1417,7 +1432,7 @@ typedef enum {
1417
1432
  */
1418
1433
  CURLOPT(CURLOPT_HTTPGET, CURLOPTTYPE_LONG, 80),
1419
1434
 
1420
- /* Set if we should verify the Common name from the peer certificate in ssl
1435
+ /* Set if we should verify the Common name from the peer certificate in SSL
1421
1436
  * handshake, set 1 to check existence, 2 to ensure that it matches the
1422
1437
  * provided hostname. */
1423
1438
  CURLOPT(CURLOPT_SSL_VERIFYHOST, CURLOPTTYPE_LONG, 81),
@@ -1434,7 +1449,7 @@ typedef enum {
1434
1449
  CURLOPT(CURLOPT_HTTP_VERSION, CURLOPTTYPE_VALUES, 84),
1435
1450
 
1436
1451
  /* Specifically switch on or off the FTP engine's use of the EPSV command. By
1437
- default, that one will always be attempted before the more traditional
1452
+ default, that one is always attempted before the more traditional
1438
1453
  PASV command. */
1439
1454
  CURLOPT(CURLOPT_FTP_USE_EPSV, CURLOPTTYPE_LONG, 85),
1440
1455
 
@@ -1491,8 +1506,8 @@ typedef enum {
1491
1506
  CURLOPT(CURLOPT_SHARE, CURLOPTTYPE_OBJECTPOINT, 100),
1492
1507
 
1493
1508
  /* indicates type of proxy. accepted values are CURLPROXY_HTTP (default),
1494
- CURLPROXY_HTTPS, CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and
1495
- CURLPROXY_SOCKS5. */
1509
+ CURLPROXY_HTTPS, CURLPROXY_HTTPS2, CURLPROXY_HTTPS3, CURLPROXY_SOCKS4,
1510
+ CURLPROXY_SOCKS4A and CURLPROXY_SOCKS5. */
1496
1511
  CURLOPT(CURLOPT_PROXYTYPE, CURLOPTTYPE_VALUES, 101),
1497
1512
 
1498
1513
  /* Set the Accept-Encoding string. Use this to tell a server you would like
@@ -1512,7 +1527,7 @@ typedef enum {
1512
1527
  CURLOPT(CURLOPT_UNRESTRICTED_AUTH, CURLOPTTYPE_LONG, 105),
1513
1528
 
1514
1529
  /* Specifically switch on or off the FTP engine's use of the EPRT command (
1515
- it also disables the LPRT attempt). By default, those ones will always be
1530
+ it also disables the LPRT attempt). By default, those ones are always
1516
1531
  attempted before the good old traditional PORT command. */
1517
1532
  CURLOPT(CURLOPT_FTP_USE_EPRT, CURLOPTTYPE_LONG, 106),
1518
1533
 
@@ -1521,19 +1536,18 @@ typedef enum {
1521
1536
  Note that setting multiple bits may cause extra network round-trips. */
1522
1537
  CURLOPT(CURLOPT_HTTPAUTH, CURLOPTTYPE_VALUES, 107),
1523
1538
 
1524
- /* Set the ssl context callback function, currently only for OpenSSL or
1539
+ /* Set the SSL context callback function, currently only for OpenSSL or
1525
1540
  wolfSSL ssl_ctx, or mbedTLS mbedtls_ssl_config in the second argument.
1526
1541
  The function must match the curl_ssl_ctx_callback prototype. */
1527
1542
  CURLOPT(CURLOPT_SSL_CTX_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 108),
1528
1543
 
1529
- /* Set the userdata for the ssl context callback function's third
1544
+ /* Set the userdata for the SSL context callback function's third
1530
1545
  argument */
1531
1546
  CURLOPT(CURLOPT_SSL_CTX_DATA, CURLOPTTYPE_CBPOINT, 109),
1532
1547
 
1533
1548
  /* FTP Option that causes missing dirs to be created on the remote server.
1534
1549
  In 7.19.4 we introduced the convenience enums for this option using the
1535
- CURLFTP_CREATE_DIR prefix.
1536
- */
1550
+ CURLFTP_CREATE_DIR prefix. */
1537
1551
  CURLOPT(CURLOPT_FTP_CREATE_MISSING_DIRS, CURLOPTTYPE_LONG, 110),
1538
1552
 
1539
1553
  /* Set this to a bitmask value to enable the particular authentications
@@ -1552,7 +1566,7 @@ typedef enum {
1552
1566
  systems with support for more than one, i.e IPv4 _and_ IPv6. */
1553
1567
  CURLOPT(CURLOPT_IPRESOLVE, CURLOPTTYPE_VALUES, 113),
1554
1568
 
1555
- /* Set this option to limit the size of a file that will be downloaded from
1569
+ /* Set this option to limit the size of a file that is to be downloaded from
1556
1570
  an HTTP or FTP server.
1557
1571
 
1558
1572
  Note there is also _LARGE version which adds large file support for
@@ -1569,13 +1583,13 @@ typedef enum {
1569
1583
  */
1570
1584
  CURLOPT(CURLOPT_RESUME_FROM_LARGE, CURLOPTTYPE_OFF_T, 116),
1571
1585
 
1572
- /* Sets the maximum size of data that will be downloaded from
1586
+ /* Sets the maximum size of data that is to be downloaded from
1573
1587
  * an HTTP or FTP server. See MAXFILESIZE above for the LONG version.
1574
1588
  */
1575
1589
  CURLOPT(CURLOPT_MAXFILESIZE_LARGE, CURLOPTTYPE_OFF_T, 117),
1576
1590
 
1577
1591
  /* Set this option to the filename of your .netrc file you want libcurl
1578
- to parse (using the CURLOPT_NETRC option). If not set, libcurl will do
1592
+ to parse (using the CURLOPT_NETRC option). If not set, libcurl does
1579
1593
  a poor attempt to find the user's home directory and check for a .netrc
1580
1594
  file in there. */
1581
1595
  CURLOPT(CURLOPT_NETRC_FILE, CURLOPTTYPE_STRINGPOINT, 118),
@@ -1584,7 +1598,7 @@ typedef enum {
1584
1598
  CURLUSESSL_TRY - try using SSL, proceed anyway otherwise
1585
1599
  CURLUSESSL_CONTROL - SSL for the control connection or fail
1586
1600
  CURLUSESSL_ALL - SSL for all communication or fail
1587
- */
1601
+ */
1588
1602
  CURLOPT(CURLOPT_USE_SSL, CURLOPTTYPE_VALUES, 119),
1589
1603
 
1590
1604
  /* The _LARGE version of the standard POSTFIELDSIZE option */
@@ -1610,7 +1624,7 @@ typedef enum {
1610
1624
  CURLFTPAUTH_DEFAULT - let libcurl decide
1611
1625
  CURLFTPAUTH_SSL - try "AUTH SSL" first, then TLS
1612
1626
  CURLFTPAUTH_TLS - try "AUTH TLS" first, then SSL
1613
- */
1627
+ */
1614
1628
  CURLOPT(CURLOPT_FTPSSLAUTH, CURLOPTTYPE_VALUES, 129),
1615
1629
 
1616
1630
  CURLOPTDEPRECATED(CURLOPT_IOCTLFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 130,
@@ -1633,7 +1647,7 @@ typedef enum {
1633
1647
 
1634
1648
  /* Set to non-zero to skip the IP address received in a 227 PASV FTP server
1635
1649
  response. Typically used for FTP-SSL purposes but is not restricted to
1636
- that. libcurl will then instead use the same IP address it used for the
1650
+ that. libcurl is then instead using the same IP address it used for the
1637
1651
  control connection. */
1638
1652
  CURLOPT(CURLOPT_FTP_SKIP_PASV_IP, CURLOPTTYPE_LONG, 137),
1639
1653
 
@@ -1645,27 +1659,26 @@ typedef enum {
1645
1659
  CURLOPT(CURLOPT_LOCALPORT, CURLOPTTYPE_LONG, 139),
1646
1660
 
1647
1661
  /* Number of ports to try, including the first one set with LOCALPORT.
1648
- Thus, setting it to 1 will make no additional attempts but the first.
1649
- */
1662
+ Thus, setting it to 1 makes no additional attempts but the first. */
1650
1663
  CURLOPT(CURLOPT_LOCALPORTRANGE, CURLOPTTYPE_LONG, 140),
1651
1664
 
1652
1665
  /* no transfer, set up connection and let application use the socket by
1653
1666
  extracting it with CURLINFO_LASTSOCKET */
1654
1667
  CURLOPT(CURLOPT_CONNECT_ONLY, CURLOPTTYPE_LONG, 141),
1655
1668
 
1656
- /* Function that will be called to convert from the
1669
+ /* Function that is called to convert from the
1657
1670
  network encoding (instead of using the iconv calls in libcurl) */
1658
1671
  CURLOPTDEPRECATED(CURLOPT_CONV_FROM_NETWORK_FUNCTION,
1659
1672
  CURLOPTTYPE_FUNCTIONPOINT, 142,
1660
1673
  7.82.0, "Serves no purpose anymore"),
1661
1674
 
1662
- /* Function that will be called to convert to the
1675
+ /* Function that is called to convert to the
1663
1676
  network encoding (instead of using the iconv calls in libcurl) */
1664
1677
  CURLOPTDEPRECATED(CURLOPT_CONV_TO_NETWORK_FUNCTION,
1665
1678
  CURLOPTTYPE_FUNCTIONPOINT, 143,
1666
1679
  7.82.0, "Serves no purpose anymore"),
1667
1680
 
1668
- /* Function that will be called to convert from UTF8
1681
+ /* Function that is called to convert from UTF8
1669
1682
  (instead of using the iconv calls in libcurl)
1670
1683
  Note that this is used only for SSL certificate processing */
1671
1684
  CURLOPTDEPRECATED(CURLOPT_CONV_FROM_UTF8_FUNCTION,
@@ -1759,9 +1772,9 @@ typedef enum {
1759
1772
 
1760
1773
  /* Comma separated list of hostnames defining no-proxy zones. These should
1761
1774
  match both hostnames directly, and hostnames within a domain. For
1762
- example, local.com will match local.com and www.local.com, but NOT
1775
+ example, local.com matches local.com and www.local.com, but NOT
1763
1776
  notlocal.com or www.notlocal.com. For compatibility with other
1764
- implementations of this, .local.com will be considered to be the same as
1777
+ implementations of this, .local.com is considered to be the same as
1765
1778
  local.com. A single * is the only valid wildcard, and effectively
1766
1779
  disables the use of proxy. */
1767
1780
  CURLOPT(CURLOPT_NOPROXY, CURLOPTTYPE_STRINGPOINT, 177),
@@ -1858,24 +1871,25 @@ typedef enum {
1858
1871
  CURLOPT(CURLOPT_RESOLVE, CURLOPTTYPE_SLISTPOINT, 203),
1859
1872
 
1860
1873
  /* Set a username for authenticated TLS */
1861
- CURLOPT(CURLOPT_TLSAUTH_USERNAME, CURLOPTTYPE_STRINGPOINT, 204),
1874
+ CURLOPTDEPRECATED(CURLOPT_TLSAUTH_USERNAME, CURLOPTTYPE_STRINGPOINT, 204,
1875
+ 8.22.0, "Support was removed"),
1862
1876
 
1863
1877
  /* Set a password for authenticated TLS */
1864
- CURLOPT(CURLOPT_TLSAUTH_PASSWORD, CURLOPTTYPE_STRINGPOINT, 205),
1878
+ CURLOPTDEPRECATED(CURLOPT_TLSAUTH_PASSWORD, CURLOPTTYPE_STRINGPOINT, 205,
1879
+ 8.22.0, "Support was removed"),
1865
1880
 
1866
1881
  /* Set authentication type for authenticated TLS */
1867
- CURLOPT(CURLOPT_TLSAUTH_TYPE, CURLOPTTYPE_STRINGPOINT, 206),
1882
+ CURLOPTDEPRECATED(CURLOPT_TLSAUTH_TYPE, CURLOPTTYPE_STRINGPOINT, 206,
1883
+ 8.22.0, "Support was removed"),
1868
1884
 
1869
1885
  /* Set to 1 to enable the "TE:" header in HTTP requests to ask for
1870
1886
  compressed transfer-encoded responses. Set to 0 to disable the use of TE:
1871
1887
  in outgoing requests. The current default is 0, but it might change in a
1872
1888
  future libcurl release.
1873
1889
 
1874
- libcurl will ask for the compressed methods it knows of, and if that
1875
- is not any, it will not ask for transfer-encoding at all even if this
1876
- option is set to 1.
1877
-
1878
- */
1890
+ libcurl asks for the compressed methods it knows of, and if that
1891
+ is not any, it does not ask for transfer-encoding at all even if this
1892
+ option is set to 1. */
1879
1893
  CURLOPT(CURLOPT_TRANSFER_ENCODING, CURLOPTTYPE_LONG, 207),
1880
1894
 
1881
1895
  /* Callback function for closing socket (instead of close(2)). The callback
@@ -1910,7 +1924,7 @@ typedef enum {
1910
1924
  /* Enable/disable SASL initial response */
1911
1925
  CURLOPT(CURLOPT_SASL_IR, CURLOPTTYPE_LONG, 218),
1912
1926
 
1913
- /* Function that will be called instead of the internal progress display
1927
+ /* Function that is called instead of the internal progress display
1914
1928
  * function. This function should be defined as the curl_xferinfo_callback
1915
1929
  * prototype defines. (Deprecates CURLOPT_PROGRESSFUNCTION) */
1916
1930
  CURLOPT(CURLOPT_XFERINFOFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 219),
@@ -1934,11 +1948,11 @@ typedef enum {
1934
1948
  /* Set authentication options directly */
1935
1949
  CURLOPT(CURLOPT_LOGIN_OPTIONS, CURLOPTTYPE_STRINGPOINT, 224),
1936
1950
 
1937
- /* Enable/disable TLS NPN extension (http2 over ssl might fail without) */
1951
+ /* Enable/disable TLS NPN extension (http2 over SSL might fail without) */
1938
1952
  CURLOPTDEPRECATED(CURLOPT_SSL_ENABLE_NPN, CURLOPTTYPE_LONG, 225,
1939
1953
  7.86.0, "Has no function"),
1940
1954
 
1941
- /* Enable/disable TLS ALPN extension (http2 over ssl might fail without) */
1955
+ /* Enable/disable TLS ALPN extension (http2 over SSL might fail without) */
1942
1956
  CURLOPT(CURLOPT_SSL_ENABLE_ALPN, CURLOPTTYPE_LONG, 226),
1943
1957
 
1944
1958
  /* Time to wait for a response to an HTTP request containing an
@@ -1952,8 +1966,7 @@ typedef enum {
1952
1966
  /* Pass in a bitmask of "header options" */
1953
1967
  CURLOPT(CURLOPT_HEADEROPT, CURLOPTTYPE_VALUES, 229),
1954
1968
 
1955
- /* The public key in DER form used to validate the peer public key
1956
- this option is used only if SSL_VERIFYPEER is true */
1969
+ /* The public key used to validate the peer public key */
1957
1970
  CURLOPT(CURLOPT_PINNEDPUBLICKEY, CURLOPTTYPE_STRINGPOINT, 230),
1958
1971
 
1959
1972
  /* Path to Unix domain socket */
@@ -1985,10 +1998,12 @@ typedef enum {
1985
1998
  CURLOPT(CURLOPT_STREAM_WEIGHT, CURLOPTTYPE_LONG, 239),
1986
1999
 
1987
2000
  /* Set stream dependency on another curl handle */
1988
- CURLOPT(CURLOPT_STREAM_DEPENDS, CURLOPTTYPE_OBJECTPOINT, 240),
2001
+ CURLOPTDEPRECATED(CURLOPT_STREAM_DEPENDS, CURLOPTTYPE_OBJECTPOINT, 240,
2002
+ 8.21.0, "Has no function"),
1989
2003
 
1990
2004
  /* Set E-xclusive stream dependency on another curl handle */
1991
- CURLOPT(CURLOPT_STREAM_DEPENDS_E, CURLOPTTYPE_OBJECTPOINT, 241),
2005
+ CURLOPTDEPRECATED(CURLOPT_STREAM_DEPENDS_E, CURLOPTTYPE_OBJECTPOINT, 241,
2006
+ 8.21.0, "Has no function"),
1992
2007
 
1993
2008
  /* Do not send any tftp option requests to the server */
1994
2009
  CURLOPT(CURLOPT_TFTP_NO_OPTIONS, CURLOPTTYPE_LONG, 242),
@@ -2012,11 +2027,11 @@ typedef enum {
2012
2027
  this option is used only if PROXY_SSL_VERIFYPEER is true */
2013
2028
  CURLOPT(CURLOPT_PROXY_CAPATH, CURLOPTTYPE_STRINGPOINT, 247),
2014
2029
 
2015
- /* Set if we should verify the proxy in ssl handshake,
2030
+ /* Set if we should verify the proxy in SSL handshake,
2016
2031
  set 1 to verify. */
2017
2032
  CURLOPT(CURLOPT_PROXY_SSL_VERIFYPEER, CURLOPTTYPE_LONG, 248),
2018
2033
 
2019
- /* Set if we should verify the Common name from the proxy certificate in ssl
2034
+ /* Set if we should verify the Common name from the proxy certificate in SSL
2020
2035
  * handshake, set 1 to check existence, 2 to ensure that it matches
2021
2036
  * the provided hostname. */
2022
2037
  CURLOPT(CURLOPT_PROXY_SSL_VERIFYHOST, CURLOPTTYPE_LONG, 249),
@@ -2026,13 +2041,16 @@ typedef enum {
2026
2041
  CURLOPT(CURLOPT_PROXY_SSLVERSION, CURLOPTTYPE_VALUES, 250),
2027
2042
 
2028
2043
  /* Set a username for authenticated TLS for proxy */
2029
- CURLOPT(CURLOPT_PROXY_TLSAUTH_USERNAME, CURLOPTTYPE_STRINGPOINT, 251),
2044
+ CURLOPTDEPRECATED(CURLOPT_PROXY_TLSAUTH_USERNAME, CURLOPTTYPE_STRINGPOINT,
2045
+ 251, 8.22.0, "Support was removed"),
2030
2046
 
2031
2047
  /* Set a password for authenticated TLS for proxy */
2032
- CURLOPT(CURLOPT_PROXY_TLSAUTH_PASSWORD, CURLOPTTYPE_STRINGPOINT, 252),
2048
+ CURLOPTDEPRECATED(CURLOPT_PROXY_TLSAUTH_PASSWORD, CURLOPTTYPE_STRINGPOINT,
2049
+ 252, 8.22.0, "Support was removed"),
2033
2050
 
2034
2051
  /* Set authentication type for authenticated TLS for proxy */
2035
- CURLOPT(CURLOPT_PROXY_TLSAUTH_TYPE, CURLOPTTYPE_STRINGPOINT, 253),
2052
+ CURLOPTDEPRECATED(CURLOPT_PROXY_TLSAUTH_TYPE, CURLOPTTYPE_STRINGPOINT, 253,
2053
+ 8.22.0, "Support was removed"),
2036
2054
 
2037
2055
  /* name of the file keeping your private SSL-certificate for proxy */
2038
2056
  CURLOPT(CURLOPT_PROXY_SSLCERT, CURLOPTTYPE_STRINGPOINT, 254),
@@ -2093,7 +2111,7 @@ typedef enum {
2093
2111
  /* Head start in milliseconds to give happy eyeballs. */
2094
2112
  CURLOPT(CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS, CURLOPTTYPE_LONG, 271),
2095
2113
 
2096
- /* Function that will be called before a resolver request is made */
2114
+ /* Function that is called before a resolver request is made */
2097
2115
  CURLOPT(CURLOPT_RESOLVER_START_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 272),
2098
2116
 
2099
2117
  /* User data to pass to the resolver start callback. */
@@ -2124,7 +2142,7 @@ typedef enum {
2124
2142
  /* Specify URL using CURL URL API. */
2125
2143
  CURLOPT(CURLOPT_CURLU, CURLOPTTYPE_OBJECTPOINT, 282),
2126
2144
 
2127
- /* add trailing data just after no more data is available */
2145
+ /* add trailing data after no more data is available */
2128
2146
  CURLOPT(CURLOPT_TRAILERFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 283),
2129
2147
 
2130
2148
  /* pointer to be passed to HTTP_TRAILER_FUNCTION */
@@ -2202,8 +2220,8 @@ typedef enum {
2202
2220
  /* used by scp/sftp to verify the host's public key */
2203
2221
  CURLOPT(CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256, CURLOPTTYPE_STRINGPOINT, 311),
2204
2222
 
2205
- /* Function that will be called immediately before the initial request
2206
- is made on a connection (after any protocol negotiation step). */
2223
+ /* Function that is called immediately before the initial request
2224
+ is made on a connection (after any protocol negotiation step). */
2207
2225
  CURLOPT(CURLOPT_PREREQFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 312),
2208
2226
 
2209
2227
  /* Data passed to the CURLOPT_PREREQFUNCTION callback */
@@ -2258,6 +2276,18 @@ typedef enum {
2258
2276
  /* set TLS supported signature algorithms */
2259
2277
  CURLOPT(CURLOPT_SSL_SIGNATURE_ALGORITHMS, CURLOPTTYPE_STRINGPOINT, 328),
2260
2278
 
2279
+ /* RFC 9421 HTTP Message Signatures algorithm */
2280
+ CURLOPT(CURLOPT_HTTPSIG_ALGORITHM, CURLOPTTYPE_VALUES, 329),
2281
+
2282
+ /* Hex-encoded key for HTTP Message Signatures */
2283
+ CURLOPT(CURLOPT_HTTPSIG_KEY, CURLOPTTYPE_STRINGPOINT, 330),
2284
+
2285
+ /* Key identifier for HTTP Message Signatures */
2286
+ CURLOPT(CURLOPT_HTTPSIG_KEYID, CURLOPTTYPE_STRINGPOINT, 331),
2287
+
2288
+ /* Space-separated list of components to sign for HTTP Message Signatures */
2289
+ CURLOPT(CURLOPT_HTTPSIG_HEADERS, CURLOPTTYPE_STRINGPOINT, 332),
2290
+
2261
2291
  CURLOPT_LASTENTRY /* the last unused */
2262
2292
  } CURLoption;
2263
2293
 
@@ -2283,7 +2313,6 @@ typedef enum {
2283
2313
  #define CURLOPT_SSLCERTPASSWD CURLOPT_KEYPASSWD
2284
2314
  #define CURLOPT_KRB4LEVEL CURLOPT_KRBLEVEL
2285
2315
 
2286
- /* */
2287
2316
  #define CURLOPT_FTP_RESPONSE_TIMEOUT CURLOPT_SERVER_RESPONSE_TIMEOUT
2288
2317
 
2289
2318
  /* Added in 8.2.0 */
@@ -2294,10 +2323,9 @@ typedef enum {
2294
2323
  #undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */
2295
2324
  #endif
2296
2325
 
2297
-
2298
- /* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host
2299
- name resolves addresses using more than one IP protocol version, this
2300
- option might be handy to force libcurl to use a specific IP version. */
2326
+ /* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host
2327
+ name resolves addresses using more than one IP protocol version, this
2328
+ option might be handy to force libcurl to use a specific IP version. */
2301
2329
  #define CURL_IPRESOLVE_WHATEVER 0L /* default, uses addresses to all IP
2302
2330
  versions that your system allows */
2303
2331
  #define CURL_IPRESOLVE_V4 1L /* uses only IPv4 addresses/connections */
@@ -2350,16 +2378,16 @@ typedef enum {
2350
2378
  #define CURL_RTSPREQ_LAST 12L /* not used */
2351
2379
 
2352
2380
  /* These enums are for use with the CURLOPT_NETRC option. */
2353
- #define CURL_NETRC_IGNORED 0L /* The .netrc will never be read.
2381
+ #define CURL_NETRC_IGNORED 0L /* The .netrc is never read.
2354
2382
  This is the default. */
2355
- #define CURL_NETRC_OPTIONAL 1L /* A user:password in the URL will be preferred
2383
+ #define CURL_NETRC_OPTIONAL 1L /* A user:password in the URL is preferred
2356
2384
  to one in the .netrc. */
2357
- #define CURL_NETRC_REQUIRED 2L /* A user:password in the URL will be ignored.
2385
+ #define CURL_NETRC_REQUIRED 2L /* A user:password in the URL is ignored.
2358
2386
  Unless one is set programmatically, the
2359
- .netrc will be queried. */
2387
+ .netrc is queried. */
2360
2388
  enum CURL_NETRC_OPTION {
2361
- /* we set a single member here, just to make sure we still provide the enum,
2362
- but the values to use are defined above with L suffixes */
2389
+ /* we set a single member here, to make sure we still provide the enum, but
2390
+ the values to use are defined above with L suffixes */
2363
2391
  CURL_NETRC_LAST = 3
2364
2392
  };
2365
2393
 
@@ -2381,14 +2409,14 @@ enum CURL_NETRC_OPTION {
2381
2409
  #define CURL_SSLVERSION_MAX_TLSv1_2 (CURL_SSLVERSION_TLSv1_2 << 16)
2382
2410
  #define CURL_SSLVERSION_MAX_TLSv1_3 (CURL_SSLVERSION_TLSv1_3 << 16)
2383
2411
 
2384
- /* never use, keep last */
2412
+ /* never use, keep last */
2385
2413
  #define CURL_SSLVERSION_MAX_LAST (CURL_SSLVERSION_LAST << 16)
2386
2414
 
2387
2415
  #define CURL_TLSAUTH_NONE 0L
2388
2416
  #define CURL_TLSAUTH_SRP 1L
2389
2417
 
2390
2418
  enum CURL_TLSAUTH {
2391
- /* we set a single member here, just to make sure we still provide the enum,
2419
+ /* we set a single member here, to make sure we still provide the enum,
2392
2420
  but the values to use are defined above with L suffixes */
2393
2421
  CURL_TLSAUTH_LAST = 2
2394
2422
  };
@@ -2403,7 +2431,7 @@ enum CURL_TLSAUTH {
2403
2431
  #define CURL_REDIR_POST_302 2L
2404
2432
  #define CURL_REDIR_POST_303 4L
2405
2433
  #define CURL_REDIR_POST_ALL \
2406
- (CURL_REDIR_POST_301|CURL_REDIR_POST_302|CURL_REDIR_POST_303)
2434
+ (CURL_REDIR_POST_301 | CURL_REDIR_POST_302 | CURL_REDIR_POST_303)
2407
2435
 
2408
2436
  #define CURL_TIMECOND_NONE 0L
2409
2437
  #define CURL_TIMECOND_IFMODSINCE 1L
@@ -2411,14 +2439,14 @@ enum CURL_TLSAUTH {
2411
2439
  #define CURL_TIMECOND_LASTMOD 3L
2412
2440
 
2413
2441
  typedef enum {
2414
- /* we set a single member here, just to make sure we still provide
2442
+ /* we set a single member here, to make sure we still provide
2415
2443
  the enum typedef, but the values to use are defined above with L
2416
2444
  suffixes */
2417
2445
  CURL_TIMECOND_LAST = 4
2418
2446
  } curl_TimeCond;
2419
2447
 
2420
2448
  /* Special size_t value signaling a null-terminated string. */
2421
- #define CURL_ZERO_TERMINATED ((size_t) -1)
2449
+ #define CURL_ZERO_TERMINATED ((size_t)-1)
2422
2450
 
2423
2451
  /* curl_strequal() and curl_strnequal() are subject for removal in a future
2424
2452
  release */
@@ -2430,7 +2458,7 @@ typedef struct curl_mime curl_mime; /* Mime context. */
2430
2458
  typedef struct curl_mimepart curl_mimepart; /* Mime part context. */
2431
2459
 
2432
2460
  /* CURLMIMEOPT_ defines are for the CURLOPT_MIME_OPTIONS option. */
2433
- #define CURLMIMEOPT_FORMESCAPE (1L<<0) /* Use backslash-escaping for forms. */
2461
+ #define CURLMIMEOPT_FORMESCAPE (1L << 0) /* Use backslash-escaping for forms */
2434
2462
 
2435
2463
  /*
2436
2464
  * NAME curl_mime_init()
@@ -2637,7 +2665,7 @@ curl_formadd(struct curl_httppost **httppost,
2637
2665
 
2638
2666
  /*
2639
2667
  * callback function for curl_formget()
2640
- * The void *arg pointer will be the one passed as second argument to
2668
+ * The void *arg pointer is the one passed as second argument to
2641
2669
  * curl_formget().
2642
2670
  * The character buffer passed to it must not be freed.
2643
2671
  * Should return the buffer length passed to it as the argument "len" on
@@ -2652,7 +2680,7 @@ typedef size_t (*curl_formget_callback)(void *arg, const char *buf,
2652
2680
  * DESCRIPTION
2653
2681
  *
2654
2682
  * Serialize a curl_httppost struct built with curl_formadd().
2655
- * Accepts a void pointer as second argument which will be passed to
2683
+ * Accepts a void pointer as second argument which is passed to
2656
2684
  * the curl_formget_callback function.
2657
2685
  * Returns 0 on success.
2658
2686
  */
@@ -2697,7 +2725,7 @@ CURL_EXTERN char *curl_version(void);
2697
2725
  * %XX versions). This function returns a new allocated string or NULL if an
2698
2726
  * error occurred.
2699
2727
  */
2700
- CURL_EXTERN char *curl_easy_escape(CURL *handle,
2728
+ CURL_EXTERN char *curl_easy_escape(CURL *curl,
2701
2729
  const char *string,
2702
2730
  int length);
2703
2731
 
@@ -2705,21 +2733,20 @@ CURL_EXTERN char *curl_easy_escape(CURL *handle,
2705
2733
  CURL_EXTERN char *curl_escape(const char *string,
2706
2734
  int length);
2707
2735
 
2708
-
2709
2736
  /*
2710
2737
  * NAME curl_easy_unescape()
2711
2738
  *
2712
2739
  * DESCRIPTION
2713
2740
  *
2714
- * Unescapes URL encoding in strings (converts all %XX codes to their 8bit
2741
+ * Unescapes URL encoding in strings (converts all %XX codes to their 8-bit
2715
2742
  * versions). This function returns a new allocated string or NULL if an error
2716
2743
  * occurred.
2717
2744
  * Conversion Note: On non-ASCII platforms the ASCII %XX codes are
2718
2745
  * converted into the host encoding.
2719
2746
  */
2720
- CURL_EXTERN char *curl_easy_unescape(CURL *handle,
2747
+ CURL_EXTERN char *curl_easy_unescape(CURL *curl,
2721
2748
  const char *string,
2722
- int length,
2749
+ int inlength,
2723
2750
  int *outlength);
2724
2751
 
2725
2752
  /* the previous version */
@@ -2743,10 +2770,9 @@ CURL_EXTERN void curl_free(void *p);
2743
2770
  *
2744
2771
  * curl_global_init() should be invoked exactly once for each application that
2745
2772
  * uses libcurl and before any call of other libcurl functions.
2746
-
2773
+ *
2747
2774
  * This function is thread-safe if CURL_VERSION_THREADSAFE is set in the
2748
2775
  * curl_version_info_data.features flag (fetch by curl_version_info()).
2749
-
2750
2776
  */
2751
2777
  CURL_EXTERN CURLcode curl_global_init(long flags);
2752
2778
 
@@ -2760,7 +2786,7 @@ CURL_EXTERN CURLcode curl_global_init(long flags);
2760
2786
  * initialize libcurl and set user defined memory management callback
2761
2787
  * functions. Users can implement memory management routines to check for
2762
2788
  * memory leaks, check for misuse of the curl library etc. User registered
2763
- * callback routines will be invoked by this library instead of the system
2789
+ * callback routines is invoked by this library instead of the system
2764
2790
  * memory management routines like malloc, free etc.
2765
2791
  */
2766
2792
  CURL_EXTERN CURLcode curl_global_init_mem(long flags,
@@ -2787,10 +2813,9 @@ CURL_EXTERN void curl_global_cleanup(void);
2787
2813
  *
2788
2814
  * curl_global_trace() can be invoked at application start to
2789
2815
  * configure which components in curl should participate in tracing.
2790
-
2816
+ *
2791
2817
  * This function is thread-safe if CURL_VERSION_THREADSAFE is set in the
2792
2818
  * curl_version_info_data.features flag (fetch by curl_version_info()).
2793
-
2794
2819
  */
2795
2820
  CURL_EXTERN CURLcode curl_global_trace(const char *config);
2796
2821
 
@@ -2811,19 +2836,19 @@ struct curl_slist {
2811
2836
  *
2812
2837
  * The backend can be identified by the id (e.g. CURLSSLBACKEND_OPENSSL). The
2813
2838
  * backend can also be specified via the name parameter (passing -1 as id). If
2814
- * both id and name are specified, the name will be ignored. If neither id nor
2815
- * name are specified, the function will fail with CURLSSLSET_UNKNOWN_BACKEND
2816
- * and set the "avail" pointer to the NULL-terminated list of available
2839
+ * both id and name are specified, the name is ignored. If neither id nor
2840
+ * name are specified, the function fails with CURLSSLSET_UNKNOWN_BACKEND
2841
+ * and set the "avail" pointer to the null-terminated list of available
2817
2842
  * backends.
2818
2843
  *
2819
2844
  * Upon success, the function returns CURLSSLSET_OK.
2820
2845
  *
2821
2846
  * If the specified SSL backend is not available, the function returns
2822
2847
  * CURLSSLSET_UNKNOWN_BACKEND and sets the "avail" pointer to a
2823
- * NULL-terminated list of available SSL backends.
2848
+ * null-terminated list of available SSL backends.
2824
2849
  *
2825
2850
  * The SSL backend can be set only once. If it has already been set, a
2826
- * subsequent attempt to change it will result in a CURLSSLSET_TOO_LATE.
2851
+ * subsequent attempt to change it results in a CURLSSLSET_TOO_LATE.
2827
2852
  */
2828
2853
 
2829
2854
  struct curl_ssl_backend {
@@ -2847,8 +2872,8 @@ CURL_EXTERN CURLsslset curl_global_sslset(curl_sslbackend id, const char *name,
2847
2872
  *
2848
2873
  * DESCRIPTION
2849
2874
  *
2850
- * Appends a string to a linked list. If no list exists, it will be created
2851
- * first. Returns the new list, after appending.
2875
+ * Appends a string to a linked list. If no list exists, it is created first.
2876
+ * Returns the new list, after appending.
2852
2877
  */
2853
2878
  CURL_EXTERN struct curl_slist *curl_slist_append(struct curl_slist *list,
2854
2879
  const char *data);
@@ -2996,7 +3021,8 @@ typedef enum {
2996
3021
  CURLINFO_EARLYDATA_SENT_T = CURLINFO_OFF_T + 68,
2997
3022
  CURLINFO_HTTPAUTH_USED = CURLINFO_LONG + 69,
2998
3023
  CURLINFO_PROXYAUTH_USED = CURLINFO_LONG + 70,
2999
- CURLINFO_LASTONE = 70
3024
+ CURLINFO_SIZE_DELIVERED = CURLINFO_OFF_T + 71,
3025
+ CURLINFO_LASTONE = 71
3000
3026
  } CURLINFO;
3001
3027
 
3002
3028
  /* CURLINFO_RESPONSE_CODE is the new name for the option previously known as
@@ -3015,13 +3041,12 @@ typedef enum {
3015
3041
  CURLCLOSEPOLICY_LAST /* last, never use this */
3016
3042
  } curl_closepolicy;
3017
3043
 
3018
- #define CURL_GLOBAL_SSL (1<<0) /* no purpose since 7.57.0 */
3019
- #define CURL_GLOBAL_WIN32 (1<<1)
3020
- #define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32)
3044
+ #define CURL_GLOBAL_SSL (1 << 0) /* no purpose since 7.57.0 */
3045
+ #define CURL_GLOBAL_WIN32 (1 << 1)
3046
+ #define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32)
3021
3047
  #define CURL_GLOBAL_NOTHING 0
3022
3048
  #define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL
3023
- #define CURL_GLOBAL_ACK_EINTR (1<<2)
3024
-
3049
+ #define CURL_GLOBAL_ACK_EINTR (1 << 2)
3025
3050
 
3026
3051
  /*****************************************************************************
3027
3052
  * Setup defines, protos etc for the sharing stuff.
@@ -3030,9 +3055,8 @@ typedef enum {
3030
3055
  /* Different data locks for a single share */
3031
3056
  typedef enum {
3032
3057
  CURL_LOCK_DATA_NONE = 0,
3033
- /* CURL_LOCK_DATA_SHARE is used internally to say that
3034
- * the locking is just made to change the internal state of the share
3035
- * itself.
3058
+ /* CURL_LOCK_DATA_SHARE is used internally to say that the locking is made
3059
+ * to change the internal state of the share itself.
3036
3060
  */
3037
3061
  CURL_LOCK_DATA_SHARE,
3038
3062
  CURL_LOCK_DATA_COOKIE,
@@ -3060,7 +3084,6 @@ typedef void (*curl_unlock_function)(CURL *handle,
3060
3084
  curl_lock_data data,
3061
3085
  void *userptr);
3062
3086
 
3063
-
3064
3087
  typedef enum {
3065
3088
  CURLSHE_OK, /* all is fine */
3066
3089
  CURLSHE_BAD_OPTION, /* 1 */
@@ -3083,9 +3106,8 @@ typedef enum {
3083
3106
  } CURLSHoption;
3084
3107
 
3085
3108
  CURL_EXTERN CURLSH *curl_share_init(void);
3086
- CURL_EXTERN CURLSHcode curl_share_setopt(CURLSH *share, CURLSHoption option,
3087
- ...);
3088
- CURL_EXTERN CURLSHcode curl_share_cleanup(CURLSH *share);
3109
+ CURL_EXTERN CURLSHcode curl_share_setopt(CURLSH *sh, CURLSHoption option, ...);
3110
+ CURL_EXTERN CURLSHcode curl_share_cleanup(CURLSH *sh);
3089
3111
 
3090
3112
  /****************************************************************************
3091
3113
  * Structures for querying information about the curl library at runtime.
@@ -3107,11 +3129,10 @@ typedef enum {
3107
3129
  CURLVERSION_LAST /* never actually use this */
3108
3130
  } CURLversion;
3109
3131
 
3110
- /* The 'CURLVERSION_NOW' is the symbolic name meant to be used by
3111
- basically all programs ever that want to get version information. It is
3112
- meant to be a built-in version number for what kind of struct the caller
3113
- expects. If the struct ever changes, we redefine the NOW to another enum
3114
- from above. */
3132
+ /* The 'CURLVERSION_NOW' is the symbolic name meant to be used by programs
3133
+ that want to get version information. It is meant to be a built-in
3134
+ version number for what kind of struct the caller expects. If the struct
3135
+ ever changes, we redefine the NOW to another enum from above. */
3115
3136
  #define CURLVERSION_NOW CURLVERSION_TWELFTH
3116
3137
 
3117
3138
  struct curl_version_info_data {
@@ -3194,7 +3215,8 @@ typedef struct curl_version_info_data curl_version_info_data;
3194
3215
  supported */
3195
3216
  #define CURL_VERSION_SSPI (1<<11) /* Built against Windows SSPI */
3196
3217
  #define CURL_VERSION_CONV (1<<12) /* Character conversions supported */
3197
- #define CURL_VERSION_CURLDEBUG (1<<13) /* Debug memory tracking supported */
3218
+ #define CURL_VERSION_CURLDEBUG (1<<13) /* Debug memory tracking supported
3219
+ (deprecated) */
3198
3220
  #define CURL_VERSION_TLSAUTH_SRP (1<<14) /* TLS-SRP auth is supported */
3199
3221
  #define CURL_VERSION_NTLM_WB (1<<15) /* NTLM delegation to winbind helper
3200
3222
  is supported */
@@ -3223,7 +3245,7 @@ typedef struct curl_version_info_data curl_version_info_data;
3223
3245
  * This function returns a pointer to a static copy of the version info
3224
3246
  * struct. See above.
3225
3247
  */
3226
- CURL_EXTERN curl_version_info_data *curl_version_info(CURLversion);
3248
+ CURL_EXTERN curl_version_info_data *curl_version_info(CURLversion stamp);
3227
3249
 
3228
3250
  /*
3229
3251
  * NAME curl_easy_strerror()
@@ -3234,7 +3256,7 @@ CURL_EXTERN curl_version_info_data *curl_version_info(CURLversion);
3234
3256
  * into the equivalent human readable error string. This is useful
3235
3257
  * for printing meaningful error messages.
3236
3258
  */
3237
- CURL_EXTERN const char *curl_easy_strerror(CURLcode);
3259
+ CURL_EXTERN const char *curl_easy_strerror(CURLcode error);
3238
3260
 
3239
3261
  /*
3240
3262
  * NAME curl_share_strerror()
@@ -3245,7 +3267,7 @@ CURL_EXTERN const char *curl_easy_strerror(CURLcode);
3245
3267
  * into the equivalent human readable error string. This is useful
3246
3268
  * for printing meaningful error messages.
3247
3269
  */
3248
- CURL_EXTERN const char *curl_share_strerror(CURLSHcode);
3270
+ CURL_EXTERN const char *curl_share_strerror(CURLSHcode error);
3249
3271
 
3250
3272
  /*
3251
3273
  * NAME curl_easy_pause()
@@ -3253,19 +3275,19 @@ CURL_EXTERN const char *curl_share_strerror(CURLSHcode);
3253
3275
  * DESCRIPTION
3254
3276
  *
3255
3277
  * The curl_easy_pause function pauses or unpauses transfers. Select the new
3256
- * state by setting the bitmask, use the convenience defines below.
3278
+ * state by setting the action bitmask, use the convenience defines below.
3257
3279
  *
3258
3280
  */
3259
- CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask);
3281
+ CURL_EXTERN CURLcode curl_easy_pause(CURL *curl, int action);
3260
3282
 
3261
- #define CURLPAUSE_RECV (1<<0)
3262
- #define CURLPAUSE_RECV_CONT (0)
3283
+ #define CURLPAUSE_RECV (1 << 0)
3284
+ #define CURLPAUSE_RECV_CONT 0
3263
3285
 
3264
- #define CURLPAUSE_SEND (1<<2)
3265
- #define CURLPAUSE_SEND_CONT (0)
3286
+ #define CURLPAUSE_SEND (1 << 2)
3287
+ #define CURLPAUSE_SEND_CONT 0
3266
3288
 
3267
- #define CURLPAUSE_ALL (CURLPAUSE_RECV|CURLPAUSE_SEND)
3268
- #define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT)
3289
+ #define CURLPAUSE_ALL (CURLPAUSE_RECV | CURLPAUSE_SEND)
3290
+ #define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT | CURLPAUSE_SEND_CONT)
3269
3291
 
3270
3292
  /*
3271
3293
  * NAME curl_easy_ssls_import()
@@ -3275,7 +3297,7 @@ CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask);
3275
3297
  * The curl_easy_ssls_import function adds a previously exported SSL session
3276
3298
  * to the SSL session cache of the easy handle (or the underlying share).
3277
3299
  */
3278
- CURL_EXTERN CURLcode curl_easy_ssls_import(CURL *handle,
3300
+ CURL_EXTERN CURLcode curl_easy_ssls_import(CURL *curl,
3279
3301
  const char *session_key,
3280
3302
  const unsigned char *shmac,
3281
3303
  size_t shmac_len,
@@ -3284,7 +3306,7 @@ CURL_EXTERN CURLcode curl_easy_ssls_import(CURL *handle,
3284
3306
 
3285
3307
  /* This is the curl_ssls_export_cb callback prototype. It
3286
3308
  * is passed to curl_easy_ssls_export() to extract SSL sessions/tickets. */
3287
- typedef CURLcode curl_ssls_export_cb(CURL *handle,
3309
+ typedef CURLcode curl_ssls_export_cb(CURL *curl,
3288
3310
  void *userptr,
3289
3311
  const char *session_key,
3290
3312
  const unsigned char *shmac,
@@ -3306,17 +3328,16 @@ typedef CURLcode curl_ssls_export_cb(CURL *handle,
3306
3328
  * callback.
3307
3329
  *
3308
3330
  */
3309
- CURL_EXTERN CURLcode curl_easy_ssls_export(CURL *handle,
3331
+ CURL_EXTERN CURLcode curl_easy_ssls_export(CURL *curl,
3310
3332
  curl_ssls_export_cb *export_fn,
3311
3333
  void *userptr);
3312
3334
 
3313
-
3314
3335
  #ifdef __cplusplus
3315
3336
  } /* end of extern "C" */
3316
3337
  #endif
3317
3338
 
3318
3339
  /* unfortunately, the easy.h and multi.h include files need options and info
3319
- stuff before they can be included! */
3340
+ stuff before they can be included! */
3320
3341
  #include "easy.h" /* nothing in curl is fun without the easy stuff */
3321
3342
  #include "multi.h"
3322
3343
  #include "urlapi.h"
@@ -3333,13 +3354,19 @@ CURL_EXTERN CURLcode curl_easy_ssls_export(CURL *handle,
3333
3354
  #include "typecheck-gcc.h"
3334
3355
  #else
3335
3356
  #if defined(__STDC__) && (__STDC__ >= 1)
3336
- /* This preprocessor magic that replaces a call with the exact same call is
3337
- only done to make sure application authors pass exactly three arguments
3338
- to these functions. */
3339
- #define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt,param)
3340
- #define curl_easy_getinfo(handle,info,arg) curl_easy_getinfo(handle,info,arg)
3341
- #define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param)
3342
- #define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param)
3357
+ /* This preprocessor magic ensures that application authors pass exactly three
3358
+ arguments to these functions. For compatibility with C++ global namespace
3359
+ '::' and reusing these symbols as method names, while also avoiding
3360
+ recursive macros, use a two-stage solution. */
3361
+ #define curl_exactly_three_arguments(a, b, c) (a, b, c)
3362
+ #define curl_easy_setopt(handle, opt, param) \
3363
+ curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
3364
+ #define curl_easy_getinfo(handle, info, arg) \
3365
+ curl_easy_getinfo curl_exactly_three_arguments(handle, info, arg)
3366
+ #define curl_share_setopt(share, opt, param) \
3367
+ curl_share_setopt curl_exactly_three_arguments(share, opt, param)
3368
+ #define curl_multi_setopt(handle, opt, param) \
3369
+ curl_multi_setopt curl_exactly_three_arguments(handle, opt, param)
3343
3370
  #endif /* __STDC__ >= 1 */
3344
3371
  #endif /* gcc >= 4.3 && !__cplusplus && !CURL_DISABLE_TYPECHECK */
3345
3372