set(_valid_default_ssl_backend TRUE)
endif()
set(_curl_ca_bundle_supported TRUE)
+
+ set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS "WOLFSSL_OPTIONS_IGNORE_SYS")
endif()
if(CURL_USE_GNUTLS)
endif()
if(USE_WOLFSSL)
list(APPEND CMAKE_REQUIRED_LIBRARIES CURL::wolfssl)
+ list(APPEND CMAKE_REQUIRED_DEFINITIONS "-DWOLFSSL_OPTIONS_IGNORE_SYS")
if(HAVE_LIBZ)
list(APPEND CMAKE_REQUIRED_LIBRARIES ZLIB::ZLIB) # Public wolfSSL headers also require zlib headers
endif()
#ifdef _WIN32
#include <windows.h>
-#define strcasecmp _stricmp
-#define strncasecmp _strnicmp
#define unlink _unlink
#else
#include <strings.h>
};
#endif
-#define HTTP_COMMAND_HEAD 0
-#define HTTP_COMMAND_GET 1
-
static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *stream)
{
fwrite(ptr, size, nmemb, stream);
curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, SyncTime_CURL_WriteHeader);
}
-static CURLcode SyncTime_CURL_Fetch(CURL *curl, const char *URL_Str,
- const char *OutFileName, int HttpGetBody)
+static CURLcode SyncTime_CURL_FetchHead(CURL *curl, const char *URL_Str)
{
- FILE *outfile;
CURLcode result;
- outfile = NULL;
- if(HttpGetBody == HTTP_COMMAND_HEAD)
- curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);
- else {
- outfile = fopen(OutFileName, "wb");
- curl_easy_setopt(curl, CURLOPT_WRITEDATA, outfile);
- }
-
+ curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);
curl_easy_setopt(curl, CURLOPT_URL, URL_Str);
+
result = curl_easy_perform(curl);
- if(outfile)
- fclose(outfile);
+
return result; /* CURLE_OK */
}
fprintf(stderr, "Before HTTP. Date: %s%s\n\n", timeBuf, tzoneBuf);
/* HTTP HEAD command to the Webserver */
- SyncTime_CURL_Fetch(curl, conf.timeserver, "index.htm", HTTP_COMMAND_HEAD);
+ SyncTime_CURL_FetchHead(curl, conf.timeserver);
#if defined(_WIN32) && !defined(CURL_WINDOWS_UWP)
GetLocalTime(&LOCALTime);
#include <ares_version.h> /* really old c-ares did not include this by
itself */
-#if ARES_VERSION >= 0x010601
-/* IPv6 supported since 1.6.1 */
-#define HAVE_CARES_IPV6 1
-#endif
-
#if ARES_VERSION >= 0x010704
#define HAVE_CARES_SERVERS_CSV 1
#define HAVE_CARES_LOCAL_DEV 1
}
#else
-#ifdef HAVE_CARES_IPV6
+#if ARES_VERSION >= 0x010601 /* IPv6 supported since 1.6.1 */
if((ip_version != CURL_IPRESOLVE_V4) && Curl_ipv6works(data)) {
/* The stack seems to be IPv6-enabled */
/* areschannel is already setup in the Curl_open() function */
#endif
}
+#if defined(USE_WINSOCK) || defined(TCP_KEEPIDLE) || \
+ defined(TCP_KEEPALIVE) || defined(TCP_KEEPALIVE_THRESHOLD) || \
+ defined(TCP_KEEPINTVL) || defined(TCP_KEEPALIVE_ABORT_THRESHOLD)
#if defined(USE_WINSOCK) || \
(defined(__sun) && !defined(TCP_KEEPIDLE)) || \
(defined(__DragonFly__) && __DragonFly_version < 500702) || \
#else
#define KEEPALIVE_FACTOR(x)
#endif
+#endif
static void tcpkeepalive(struct Curl_cfilter *cf,
struct Curl_easy *data,
# define DESKEY(x) &x
# endif
#endif
-#define DESKEYARG(x) *x
#elif defined(USE_GNUTLS)
* Turns a 56-bit key into a 64-bit, odd parity key and sets the key. The
* key schedule ks is also set.
*/
-static void setup_des_key(const unsigned char *key_56,
- DES_key_schedule DESKEYARG(ks))
+static void setup_des_key(const unsigned char *key_56, DES_key_schedule *ks)
{
DES_cblock key;
return TRUE;
}
-#endif /* USE_WIN32_CRYPTO */
+#endif /* crypto backends */
/*
* takes a 21 byte array and treats it as 3 56-bit DES keys. The
/* macro to check for the last line in an FTP server response */
#define LASTLINE(line) (STATUSCODE(line) && (' ' == line[3]))
-#ifndef CURLVERBOSE
-#define FTP_CSTATE(c) ((void)(c), "")
-#else
+#ifdef CURLVERBOSE
/* for tracing purposes */
static const char * const ftp_state_names[] = {
"STOP",
return NULL;
}
-#else
-/* disabled */
-#define Curl_checkProxyheaders(x, y, z, a) NULL
#endif
static bool http_header_is_empty(const char *header)
#error too old nghttp2 version, upgrade!
#endif
-#ifndef CURLVERBOSE
-#define nghttp2_session_callbacks_set_error_callback(x, y)
-#endif
-
#if (NGHTTP2_VERSION_NUM >= 0x010c00)
#define NGHTTP2_HAS_SET_LOCAL_WINDOW_SIZE 1
#endif
#ifdef USE_WOLFSSL
#include <wolfssl/options.h>
-#define VOID_MD4_INIT
-#ifdef NO_MD4
-#define WOLFSSL_NO_MD4
-#endif
#endif
/* When OpenSSL or wolfSSL is available, we use their MD4 functions. */
-#if defined(USE_WOLFSSL) && !defined(WOLFSSL_NO_MD4)
+
+#if defined(USE_WOLFSSL) && !defined(NO_MD4)
#include <wolfssl/openssl/md4.h>
+#define VOID_MD4_INIT
+
+#ifdef OPENSSL_COEXIST
+# define MD4_CTX WOLFSSL_MD4_CTX
+# define MD4_Init wolfSSL_MD4_Init
+# define MD4_Update wolfSSL_MD4_Update
+# define MD4_Final wolfSSL_MD4_Final
+#endif
+
#elif defined(USE_OPENSSL) && !defined(OPENSSL_NO_MD4)
#include <openssl/md4.h>
+
#elif (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && \
(__MAC_OS_X_VERSION_MAX_ALLOWED >= 1040) && \
defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && \
(__IPHONE_OS_VERSION_MAX_ALLOWED >= 20000) && \
defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && \
(__IPHONE_OS_VERSION_MIN_REQUIRED < 130000))
-#define AN_APPLE_OS
#include <CommonCrypto/CommonDigest.h>
-#elif defined(USE_WIN32_CRYPTO)
-#include <wincrypt.h>
-#elif defined(USE_GNUTLS)
-#include <nettle/md4.h>
-#endif
-
-#if defined(USE_WOLFSSL) && !defined(WOLFSSL_NO_MD4)
-#ifdef OPENSSL_COEXIST
-# define MD4_CTX WOLFSSL_MD4_CTX
-# define MD4_Init wolfSSL_MD4_Init
-# define MD4_Update wolfSSL_MD4_Update
-# define MD4_Final wolfSSL_MD4_Final
-#endif
-
-#elif defined(USE_OPENSSL) && !defined(OPENSSL_NO_MD4)
-
-#elif defined(AN_APPLE_OS)
typedef CC_MD4_CTX MD4_CTX;
static int MD4_Init(MD4_CTX *ctx)
}
#elif defined(USE_WIN32_CRYPTO)
+#include <wincrypt.h>
struct md4_ctx {
HCRYPTPROV hCryptProv;
}
#elif defined(USE_GNUTLS)
+#include <nettle/md4.h>
typedef struct md4_ctx MD4_CTX;
#ifdef USE_OPENSSL
#include <openssl/opensslconf.h>
-#if !defined(OPENSSL_NO_MD5) && !defined(OPENSSL_NO_DEPRECATED_3_0)
-#define USE_OPENSSL_MD5
-#endif
#endif
#ifdef USE_WOLFSSL
#include <wolfssl/options.h>
-#ifndef NO_MD5
-#define USE_WOLFSSL_MD5
-#endif
#endif
#ifdef USE_MBEDTLS
#error "mbedTLS 3.2.0 or later required"
#endif
#include <psa/crypto_config.h>
-#if defined(PSA_WANT_ALG_MD5) && PSA_WANT_ALG_MD5 /* mbedTLS 4+ */
-#define USE_MBEDTLS_MD5
-#endif
#endif
#ifdef USE_GNUTLS
#include <nettle/md5.h>
-#elif defined(USE_OPENSSL_MD5)
-#include <openssl/md5.h>
-#elif defined(USE_WOLFSSL_MD5)
-#include <wolfssl/openssl/md5.h>
-#elif defined(USE_MBEDTLS_MD5)
-#include <psa/crypto.h>
-#elif (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && \
- (__MAC_OS_X_VERSION_MAX_ALLOWED >= 1040) && \
- defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && \
- (__MAC_OS_X_VERSION_MIN_REQUIRED < 101500)) || \
- (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && \
- (__IPHONE_OS_VERSION_MAX_ALLOWED >= 20000) && \
- defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && \
- (__IPHONE_OS_VERSION_MIN_REQUIRED < 130000))
-#define AN_APPLE_OS
-#include <CommonCrypto/CommonDigest.h>
-#elif defined(USE_WIN32_CRYPTO)
-#include <wincrypt.h>
-#endif
-
-#ifdef USE_GNUTLS
typedef struct md5_ctx my_md5_ctx;
md5_digest(ctx, 16, digest);
}
-#elif defined(USE_OPENSSL_MD5) || \
- (defined(USE_WOLFSSL_MD5) && !defined(OPENSSL_COEXIST))
+#elif (defined(USE_OPENSSL) && \
+ !defined(OPENSSL_NO_MD5) && !defined(OPENSSL_NO_DEPRECATED_3_0)) || \
+ (defined(USE_WOLFSSL) && !defined(NO_MD5) && !defined(OPENSSL_COEXIST))
+#ifdef USE_OPENSSL
+#include <openssl/md5.h>
+#else
+#include <wolfssl/openssl/md5.h>
+#endif
typedef MD5_CTX my_md5_ctx;
(void)MD5_Final(digest, ctx);
}
-#elif defined(USE_WOLFSSL_MD5)
+#elif defined(USE_WOLFSSL) && !defined(NO_MD5)
+#include <wolfssl/openssl/md5.h>
typedef WOLFSSL_MD5_CTX my_md5_ctx;
(void)wolfSSL_MD5_Final(digest, ctx);
}
-#elif defined(USE_MBEDTLS_MD5)
+#elif defined(USE_MBEDTLS) && \
+ defined(PSA_WANT_ALG_MD5) && PSA_WANT_ALG_MD5 /* mbedTLS 4+ */
+#include <psa/crypto.h>
typedef psa_hash_operation_t my_md5_ctx;
(void)psa_hash_finish(ctx, digest, 16, &actual_length);
}
-#elif defined(AN_APPLE_OS)
+#elif (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && \
+ (__MAC_OS_X_VERSION_MAX_ALLOWED >= 1040) && \
+ defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && \
+ (__MAC_OS_X_VERSION_MIN_REQUIRED < 101500)) || \
+ (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && \
+ (__IPHONE_OS_VERSION_MAX_ALLOWED >= 20000) && \
+ defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && \
+ (__IPHONE_OS_VERSION_MIN_REQUIRED < 130000))
+#include <CommonCrypto/CommonDigest.h>
/* For Apple operating systems: CommonCrypto has the functions we need.
These functions are available on Tiger and later, as well as iOS 2.0
}
#elif defined(USE_WIN32_CRYPTO)
+#include <wincrypt.h>
struct md5_ctx {
HCRYPTPROV hCryptProv;
*/
-#define PARSEDATE_OK 0
-#define PARSEDATE_FAIL -1
-#define PARSEDATE_LATER 1
-#if defined(HAVE_TIME_T_UNSIGNED) || (SIZEOF_TIME_T < 5)
-#define PARSEDATE_SOONER 2
-#endif
-
#if !defined(CURL_DISABLE_PARSEDATE) || !defined(CURL_DISABLE_FTP) || \
!defined(CURL_DISABLE_FILE) || defined(USE_GNUTLS)
/* These names are also used by FTP and FILE code */
};
#endif
+#define PARSEDATE_OK 0
+#define PARSEDATE_FAIL -1
+
#ifndef CURL_DISABLE_PARSEDATE
+
+#define PARSEDATE_LATER 1
+#if defined(HAVE_TIME_T_UNSIGNED) || (SIZEOF_TIME_T < 5)
+#define PARSEDATE_SOONER 2
+#endif
+
static const char * const weekday[] = {
"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"
};
#include "transfer.h"
#include "curlx/strcopy.h"
-/* check rate limits within this many recent milliseconds, at minimum. */
-#define MIN_RATE_LIMIT_PERIOD 3000
-
#ifndef CURL_DISABLE_PROGRESS_METER
/* Provide a string that is 7 letters long (plus the zero byte).
return CURLE_OK;
}
+#ifdef USE_SSL
#define C_SSLVERSION_VALUE(x) (x & 0xffff)
#define C_SSLVERSION_MAX_VALUE(x) ((unsigned long)x & 0xffff0000)
+#endif
static CURLcode protocol2num(const char *str, curl_prot_t *val)
{
#error "mbedTLS 3.2.0 or later required"
#endif
#include <psa/crypto_config.h>
-#if defined(PSA_WANT_ALG_SHA_256) && PSA_WANT_ALG_SHA_256 /* mbedTLS 4+ */
-#define USE_MBEDTLS_SHA256
-#endif
-#endif
-
-#ifdef USE_OPENSSL
-#include <openssl/evp.h>
-#elif defined(USE_GNUTLS)
-#include <nettle/sha.h>
-#elif defined(USE_MBEDTLS_SHA256)
-#include <psa/crypto.h>
-#elif (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && \
- (__MAC_OS_X_VERSION_MAX_ALLOWED >= 1040)) || \
- (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && \
- (__IPHONE_OS_VERSION_MAX_ALLOWED >= 20000))
-#include <CommonCrypto/CommonDigest.h>
-#define AN_APPLE_OS
-#elif defined(USE_WIN32_CRYPTO)
-#include <wincrypt.h>
#endif
/* Please keep the SSL backend-specific #if branches in this order:
*/
#ifdef USE_OPENSSL
+#include <openssl/evp.h>
struct ossl_sha256_ctx {
EVP_MD_CTX *openssl_ctx;
}
#elif defined(USE_GNUTLS)
+#include <nettle/sha.h>
typedef struct sha256_ctx my_sha256_ctx;
sha256_digest(ctx, SHA256_DIGEST_SIZE, digest);
}
-#elif defined(USE_MBEDTLS_SHA256)
+#elif defined(USE_MBEDTLS) && \
+ defined(PSA_WANT_ALG_SHA_256) && PSA_WANT_ALG_SHA_256 /* mbedTLS 4+ */
+#include <psa/crypto.h>
typedef psa_hash_operation_t my_sha256_ctx;
&actual_length);
}
-#elif defined(AN_APPLE_OS)
+#elif (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && \
+ (__MAC_OS_X_VERSION_MAX_ALLOWED >= 1040)) || \
+ (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && \
+ (__IPHONE_OS_VERSION_MAX_ALLOWED >= 20000))
+#include <CommonCrypto/CommonDigest.h>
+
typedef CC_SHA256_CTX my_sha256_ctx;
static CURLcode my_sha256_init(void *ctx)
}
#elif defined(USE_WIN32_CRYPTO)
+#include <wincrypt.h>
struct sha256_ctx {
HCRYPTPROV hCryptProv;
# error READBUFFER_SIZE is too small
#endif
-#ifdef USE_UNIX_SOCKETS
+#if !defined(CURL_DISABLE_PROXY) && defined(USE_UNIX_SOCKETS)
#define UNIX_SOCKET_PREFIX "localhost"
#endif
return FALSE;
return TRUE;
}
-#else
-/* disabled, will not get called */
-#define proxy_info_matches(x, y) FALSE
-#define socks_proxy_info_matches(x, y) FALSE
#endif
/* A connection has to have been idle for less than 'conn_max_idle_ms'
#include "../curlx/strdup.h"
#include "../curl_endian.h"
+/* "NTLMSSP" signature is always in ASCII regardless of the platform */
+#define NTLMSSP_SIGNATURE "\x4e\x54\x4c\x4d\x53\x53\x50"
+
/* NTLM buffer fixed size, large enough for long user + host + domain */
#define NTLM_BUFSIZE 1024
/* Requests that the server's authentication realm be included in the Type 2
message. */
+#if DEBUG_ME
/* unknown (1 << 3) */
#define NTLMFLAG_NEGOTIATE_SIGN (1 << 4)
/* Specifies that authenticated communication between the client and server
#define NTLMFLAG_NEGOTIATE_LM_KEY (1 << 7)
/* Indicates that the LAN Manager session key should be used for signing and
sealing authenticated communications. */
+#endif
#define NTLMFLAG_NEGOTIATE_NTLM_KEY (1 << 9)
/* Indicates that NTLM authentication is being used. */
+#if DEBUG_ME
/* unknown (1 << 10) */
#define NTLMFLAG_NEGOTIATE_ANONYMOUS (1 << 11)
/* Sent by the server to indicate that the server and client are on the same
machine. Implies that the client may use a pre-established local security
context rather than responding to the challenge. */
+#endif
#define NTLMFLAG_NEGOTIATE_ALWAYS_SIGN (1 << 15)
/* Indicates that authenticated communication between the client and server
should be signed with a "dummy" signature. */
+#if DEBUG_ME
#define NTLMFLAG_TARGET_TYPE_DOMAIN (1 << 16)
/* Sent by the server in the Type 2 message to indicate that the target
authentication realm is a domain. */
/* Sent by the server in the Type 2 message to indicate that the target
authentication realm is a share. Presumably, this is for share-level
authentication. Usage is unclear. */
+#endif
#define NTLMFLAG_NEGOTIATE_NTLM2_KEY (1 << 19)
/* Indicates that the NTLM2 signing and sealing scheme should be used for
protecting authenticated communications. */
+#if DEBUG_ME
#define NTLMFLAG_REQUEST_INIT_RESPONSE (1 << 20)
/* unknown purpose */
#define NTLMFLAG_REQUEST_NONNT_SESSION_KEY (1 << 22)
/* unknown purpose */
+#endif
#define NTLMFLAG_NEGOTIATE_TARGET_INFO (1 << 23)
/* Sent by the server in the Type 2 message to indicate that it is including a
Target Information block in the message. */
+#if DEBUG_ME
/* unknown (1<24) */
/* unknown (1<25) */
/* unknown (1<26) */
#define NTLMFLAG_NEGOTIATE_56 (1 << 31)
/* Indicates that 56-bit encryption is supported. */
-/* "NTLMSSP" signature is always in ASCII regardless of the platform */
-#define NTLMSSP_SIGNATURE "\x4e\x54\x4c\x4d\x53\x53\x50"
-
-#if DEBUG_ME
#define DEBUG_OUT(x) x
static void ntlm_print_flags(FILE *handle, unsigned long flags)
{
}
}
-/* ngtcp2 default congestion controller does not perform pacing. Limit
- the maximum packet burst to MAX_PKT_BURST packets. */
-#define MAX_PKT_BURST 10
-
struct pkt_io_ctx {
struct Curl_cfilter *cf;
struct Curl_easy *data;
/* HTTP/3 error values defined in RFC 9114, ch. 8.1 */
#define CURL_H3_NO_ERROR 0x0100
+#define MAX_PKT_BURST 10
+
#define QUIC_MAX_STREAMS 100
#define H3_STREAM_WINDOW_SIZE (1024 * 128)
#define H3_STREAM_CHUNK_SIZE (1024 * 16)
-/* The pool keeps spares around and half of a full stream windows seems good.
- * More does not seem to improve performance. The benefit of the pool is that
- * stream buffer to not keep spares. Memory consumption goes down when streams
- * run empty, have a large upload done, etc. */
-#define H3_STREAM_POOL_SPARES \
- (H3_STREAM_WINDOW_SIZE / H3_STREAM_CHUNK_SIZE) / 2
/* Receive and Send max number of chunks just follows from the
* chunk size and window size */
#define H3_STREAM_RECV_CHUNKS \
return result;
}
+#ifdef CURLVERBOSE
#ifdef HAVE_SENDMSG
#define VQUIC_SEND_METHOD "sendmsg"
#else
#define VQUIC_SEND_METHOD "send"
#endif
+#endif
static CURLcode send_packet_no_gso(struct Curl_cfilter *cf,
struct Curl_easy *data,
#include "../bufq.h"
-#define MAX_PKT_BURST 10
#define MAX_UDP_PAYLOAD_SIZE 1452
/* definitions from RFC 9114, ch 8.1 */
return result;
}
-#if !(defined(LIBRESSL_VERSION_NUMBER) && \
- LIBRESSL_VERSION_NUMBER < 0x3060000fL) && \
- !defined(HAVE_BORINGSSL_LIKE) && defined(CURLVERBOSE)
+#ifdef CURLVERBOSE
+#if !defined(HAVE_BORINGSSL_LIKE) && \
+ !(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x3060000fL)
static void infof_certstack(struct Curl_easy *data, const SSL *ssl)
{
STACK_OF(X509) *certstack;
#else
#define infof_certstack(data, ssl)
#endif
+#endif /* CURLVERBOSE */
static CURLcode ossl_check_issuer(struct Curl_cfilter *cf,
struct Curl_easy *data,
#ifdef USE_WOLFSSL
-#define WOLFSSL_OPTIONS_IGNORE_SYS
#include <wolfssl/options.h>
#include <wolfssl/version.h>
/* Largest supported ASN.1 structure. */
#define CURL_ASN1_MAX ((size_t)0x40000) /* 256K */
+#ifdef WANT_EXTRACT_CERTINFO
/* ASN.1 classes. */
/* #define CURL_ASN1_UNIVERSAL 0 */
/* #define CURL_ASN1_APPLICATION 1 */
/* #define CURL_ASN1_CHARACTER_STRING 29 */
#define CURL_ASN1_BMP_STRING 30
-#ifdef WANT_EXTRACT_CERTINFO
/* ASN.1 OID table entry. */
struct Curl_OID {
const char *numoid; /* Dotted-numeric OID. */
#define WSBIT_OPCODE_CLOSE 0x8
#define WSBIT_OPCODE_PING 0x9
#define WSBIT_OPCODE_PONG 0xa
+#ifdef CURLVERBOSE
#define WSBIT_OPCODE_MASK 0xf
+#endif
#define WSBIT_MASK 0x80
fi
if test "$USE_WOLFSSL" != "yes"; then
+ CPPFLAGS="$CPPFLAGS -DWOLFSSL_OPTIONS_IGNORE_SYS"
LDFLAGS="$LDFLAGS $addld"
LDFLAGSPC="$LDFLAGSPC $addld"
#ifdef _WIN32
# include <tlhelp32.h>
-# undef PATH_MAX
-# define PATH_MAX MAX_PATH
#elif !defined(__DJGPP__) || (__DJGPP__ < 2) /* DJGPP 2.0 has _use_lfn() */
# define CURL_USE_LFN(f) 0 /* long filenames never available */
#elif defined(__DJGPP__)
{
CURLcode result = CURLE_OK;
DWORD res_len;
- TCHAR buf[PATH_MAX];
+ TCHAR buf[MAX_PATH];
TCHAR *ptr = NULL;
buf[0] = TEXT('\0');
- res_len = SearchPath(NULL, bundle_file, NULL, PATH_MAX, buf, &ptr);
+ res_len = SearchPath(NULL, bundle_file, NULL, MAX_PATH, buf, &ptr);
if(res_len > 0) {
curlx_free(config->cacert);
config->cacert = curlx_convert_tchar_to_UTF8(buf);
return PARAM_NO_MEM;
}
-#define MAX_FILENAME 10000
-
ParameterError setvariable(const char *input)
{
const char *name;