mirror of
https://github.com/curl/curl.git
synced 2026-04-11 12:01:42 +08:00
tidy-up: miscellaneous
- vms/curlmsg_vms.h: delete unused/commented code. - vtls/schannel_verify: sort includes. - typecheck-gcc.h: fix indent and alignment. - lib/config-win32.h: drop idle `#undef`. - spacecheck: check for stray empty lines before after curly braces. - make literals more readable: 1048576 -> 1024 * 1024 - scope variables. - use ISO date in a comment. - drop redundant parentheses. - drop empty comments. - unfold lines. - duplicate/stray spaces in comments. - fix indent, whitespace, minor typos. Closes #20690
This commit is contained in:
parent
ac46392f44
commit
af78b199b2
@ -27,7 +27,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
/* */
|
||||
|
||||
#if defined(sun) || defined(__sun__) || \
|
||||
defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
||||
# if defined(__SVR4) || defined(__srv4__)
|
||||
@ -39,7 +39,7 @@
|
||||
#if (defined(_AIX) || defined(__xlC__)) && !defined(_AIX41)
|
||||
# define PLATFORM_AIX_V3
|
||||
#endif
|
||||
/* */
|
||||
|
||||
#if defined(PLATFORM_SUNOS4) || defined(PLATFORM_AIX_V3)
|
||||
#error "O_NONBLOCK does not work on this platform"
|
||||
#endif
|
||||
|
||||
@ -2335,8 +2335,7 @@ if(NOT CURL_DISABLE_INSTALL)
|
||||
FILES_MATCHING PATTERN "*.h")
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
write_basic_package_version_file(
|
||||
"${_version_config}"
|
||||
write_basic_package_version_file("${_version_config}"
|
||||
VERSION ${_curl_version}
|
||||
COMPATIBILITY SameMajorVersion)
|
||||
file(READ "${_version_config}" _generated_version_config)
|
||||
|
||||
@ -34,7 +34,7 @@ We remove support for CMake <3.18 in April 2026.
|
||||
|
||||
CMake 3.18 was released on 2020-07-15.
|
||||
|
||||
## TLS SRP Authentication
|
||||
## TLS-SRP Authentication
|
||||
|
||||
Transport Layer Security Secure Remote Password is a TLS feature that does not
|
||||
work with TLS 1.3 or QUIC and is virtually unused by curl users and in
|
||||
|
||||
@ -58,7 +58,6 @@ while(<S>) {
|
||||
$rem{$sym}=$a[2];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
close(S);
|
||||
|
||||
@ -41,7 +41,7 @@ option.
|
||||
Using this option multiple times makes the last set string override the
|
||||
previous ones. Set it to NULL to disable its use again.
|
||||
|
||||
This feature relies on TLS SRP which does not work with TLS 1.3.
|
||||
This feature relies on TLS-SRP which does not work with TLS 1.3.
|
||||
|
||||
# DEFAULT
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@ defined in RFC 5054 and provides mutual authentication if both sides have a
|
||||
shared secret. To use TLS-SRP, you must also set the
|
||||
CURLOPT_TLSAUTH_USERNAME(3) and CURLOPT_TLSAUTH_PASSWORD(3) options.
|
||||
|
||||
TLS SRP does not work with TLS 1.3.
|
||||
TLS-SRP does not work with TLS 1.3.
|
||||
|
||||
# DEFAULT
|
||||
|
||||
|
||||
@ -40,7 +40,7 @@ option.
|
||||
Using this option multiple times makes the last set string override the
|
||||
previous ones. Set it to NULL to disable its use again.
|
||||
|
||||
This feature relies on TLS SRP which does not work with TLS 1.3.
|
||||
This feature relies on TLS-SRP which does not work with TLS 1.3.
|
||||
|
||||
# DEFAULT
|
||||
|
||||
|
||||
@ -100,6 +100,5 @@ EOS
|
||||
EOS
|
||||
;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -2283,7 +2283,6 @@ typedef enum {
|
||||
#define CURLOPT_SSLCERTPASSWD CURLOPT_KEYPASSWD
|
||||
#define CURLOPT_KRB4LEVEL CURLOPT_KRBLEVEL
|
||||
|
||||
/* */
|
||||
#define CURLOPT_FTP_RESPONSE_TIMEOUT CURLOPT_SERVER_RESPONSE_TIMEOUT
|
||||
|
||||
/* Added in 8.2.0 */
|
||||
@ -3330,7 +3329,7 @@ CURL_EXTERN CURLcode curl_easy_ssls_export(CURL *handle,
|
||||
/* This preprocessor magic that replaces a call with the exact same call is
|
||||
only done to make sure application authors pass exactly three arguments
|
||||
to these functions. Use recursive macros to allow using these symbols via
|
||||
the C++ global namespace '::' or reuse them as method names. */
|
||||
the C++ global namespace '::' or reusing them as method names. */
|
||||
#define curl_easy_setopt(handle, opt, param) \
|
||||
curl_easy_setopt(handle, opt, param)
|
||||
#define curl_easy_getinfo(handle, info, arg) \
|
||||
|
||||
@ -367,20 +367,20 @@
|
||||
#define CURL_PULL_SYS_POLL_H
|
||||
#endif
|
||||
|
||||
/* CURL_PULL_SYS_TYPES_H is defined above when inclusion of header file */
|
||||
/* sys/types.h is required here to properly make type definitions below. */
|
||||
/* CURL_PULL_SYS_TYPES_H is defined above when inclusion of header file
|
||||
sys/types.h is required here to properly make type definitions below. */
|
||||
#ifdef CURL_PULL_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
|
||||
/* CURL_PULL_SYS_SOCKET_H is defined above when inclusion of header file */
|
||||
/* sys/socket.h is required here to properly make type definitions below. */
|
||||
/* CURL_PULL_SYS_SOCKET_H is defined above when inclusion of header file
|
||||
sys/socket.h is required here to properly make type definitions below. */
|
||||
#ifdef CURL_PULL_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
/* CURL_PULL_SYS_POLL_H is defined above when inclusion of header file */
|
||||
/* sys/poll.h is required here to properly make type definitions below. */
|
||||
/* CURL_PULL_SYS_POLL_H is defined above when inclusion of header file
|
||||
sys/poll.h is required here to properly make type definitions below. */
|
||||
#ifdef CURL_PULL_SYS_POLL_H
|
||||
# include <sys/poll.h>
|
||||
#endif
|
||||
|
||||
@ -573,11 +573,13 @@ CURLWARNING(Wcurl_easy_getinfo_err_curl_off_t,
|
||||
|
||||
/* true if info expects a pointer to struct curl_slist * argument */
|
||||
#define curlcheck_slist_info(info) \
|
||||
(((info) == CURLINFO_SSL_ENGINES) || ((info) == CURLINFO_COOKIELIST))
|
||||
(((info) == CURLINFO_SSL_ENGINES) || \
|
||||
((info) == CURLINFO_COOKIELIST))
|
||||
|
||||
/* true if info expects a pointer to struct curl_tlssessioninfo * argument */
|
||||
#define curlcheck_tlssessioninfo_info(info) \
|
||||
(((info) == CURLINFO_TLS_SSL_PTR) || ((info) == CURLINFO_TLS_SESSION))
|
||||
(((info) == CURLINFO_TLS_SSL_PTR) || \
|
||||
((info) == CURLINFO_TLS_SESSION))
|
||||
|
||||
/* true if info expects a pointer to struct curl_certinfo * argument */
|
||||
#define curlcheck_certinfo_info(info) ((info) == CURLINFO_CERTINFO)
|
||||
@ -817,21 +819,21 @@ typedef int (*Wcurl_progress_callback2)(const void *,
|
||||
curlcheck_cb_compatible((expr), Wcurl_debug_callback6) || \
|
||||
curlcheck_cb_compatible((expr), Wcurl_debug_callback7) || \
|
||||
curlcheck_cb_compatible((expr), Wcurl_debug_callback8))
|
||||
typedef int (*Wcurl_debug_callback1) (CURL *,
|
||||
typedef int (*Wcurl_debug_callback1)(CURL *,
|
||||
curl_infotype, char *, size_t, void *);
|
||||
typedef int (*Wcurl_debug_callback2) (CURL *,
|
||||
typedef int (*Wcurl_debug_callback2)(CURL *,
|
||||
curl_infotype, char *, size_t, const void *);
|
||||
typedef int (*Wcurl_debug_callback3) (CURL *,
|
||||
typedef int (*Wcurl_debug_callback3)(CURL *,
|
||||
curl_infotype, const char *, size_t, void *);
|
||||
typedef int (*Wcurl_debug_callback4) (CURL *,
|
||||
typedef int (*Wcurl_debug_callback4)(CURL *,
|
||||
curl_infotype, const char *, size_t, const void *);
|
||||
typedef int (*Wcurl_debug_callback5) (CURL *,
|
||||
typedef int (*Wcurl_debug_callback5)(CURL *,
|
||||
curl_infotype, unsigned char *, size_t, void *);
|
||||
typedef int (*Wcurl_debug_callback6) (CURL *,
|
||||
typedef int (*Wcurl_debug_callback6)(CURL *,
|
||||
curl_infotype, unsigned char *, size_t, const void *);
|
||||
typedef int (*Wcurl_debug_callback7) (CURL *,
|
||||
typedef int (*Wcurl_debug_callback7)(CURL *,
|
||||
curl_infotype, const unsigned char *, size_t, void *);
|
||||
typedef int (*Wcurl_debug_callback8) (CURL *,
|
||||
typedef int (*Wcurl_debug_callback8)(CURL *,
|
||||
curl_infotype, const unsigned char *, size_t, const void *);
|
||||
|
||||
/* evaluates to true if expr is of type curl_ssl_ctx_callback or "similar" */
|
||||
|
||||
@ -229,7 +229,6 @@ static CURLcode altsvc_load(struct altsvcinfo *asi, const char *file)
|
||||
/*
|
||||
* Write this single altsvc entry to a single output line
|
||||
*/
|
||||
|
||||
static CURLcode altsvc_out(struct altsvc *as, FILE *fp)
|
||||
{
|
||||
struct tm stamp;
|
||||
|
||||
@ -600,8 +600,8 @@ async_ares_node2addr(struct ares_addrinfo_node *node)
|
||||
for(ai = node; ai != NULL; ai = ai->ai_next) {
|
||||
size_t ss_size;
|
||||
struct Curl_addrinfo *ca;
|
||||
/* ignore elements with unsupported address family, */
|
||||
/* settle family-specific sockaddr structure size. */
|
||||
/* ignore elements with unsupported address family,
|
||||
settle family-specific sockaddr structure size. */
|
||||
if(ai->ai_family == AF_INET)
|
||||
ss_size = sizeof(struct sockaddr_in);
|
||||
#ifdef USE_IPV6
|
||||
@ -625,8 +625,8 @@ async_ares_node2addr(struct ares_addrinfo_node *node)
|
||||
break;
|
||||
}
|
||||
|
||||
/* copy each structure member individually, member ordering, */
|
||||
/* size, or padding might be different for each platform. */
|
||||
/* copy each structure member individually, member ordering,
|
||||
size, or padding might be different for each platform. */
|
||||
|
||||
ca->ai_flags = ai->ai_flags;
|
||||
ca->ai_family = ai->ai_family;
|
||||
|
||||
@ -284,7 +284,6 @@
|
||||
/* ---------------------------------------------------------------- */
|
||||
|
||||
#ifndef CURL_WINDOWS_UWP
|
||||
#undef HAVE_LDAP_URL_PARSE
|
||||
#define HAVE_LDAP_SSL 1
|
||||
#define USE_WIN32_LDAP 1
|
||||
#endif
|
||||
|
||||
@ -61,7 +61,7 @@
|
||||
#include "multiif.h"
|
||||
#include "curlx/inet_ntop.h"
|
||||
#include "curlx/strparse.h"
|
||||
#include "vtls/vtls.h" /* for vtsl cfilters */
|
||||
#include "vtls/vtls.h" /* for vtls cfilters */
|
||||
#include "progress.h"
|
||||
#include "conncache.h"
|
||||
#include "multihandle.h"
|
||||
|
||||
@ -115,8 +115,8 @@ int Curl_getaddrinfo_ex(const char *nodename,
|
||||
|
||||
for(ai = aihead; ai != NULL; ai = ai->ai_next) {
|
||||
size_t namelen = ai->ai_canonname ? strlen(ai->ai_canonname) + 1 : 0;
|
||||
/* ignore elements with unsupported address family, */
|
||||
/* settle family-specific sockaddr structure size. */
|
||||
/* ignore elements with unsupported address family,
|
||||
settle family-specific sockaddr structure size. */
|
||||
if(ai->ai_family == AF_INET)
|
||||
ss_size = sizeof(struct sockaddr_in);
|
||||
#ifdef USE_IPV6
|
||||
@ -140,8 +140,8 @@ int Curl_getaddrinfo_ex(const char *nodename,
|
||||
break;
|
||||
}
|
||||
|
||||
/* copy each structure member individually, member ordering, */
|
||||
/* size, or padding might be different for each platform. */
|
||||
/* copy each structure member individually, member ordering,
|
||||
size, or padding might be different for each platform. */
|
||||
|
||||
ca->ai_flags = ai->ai_flags;
|
||||
ca->ai_family = ai->ai_family;
|
||||
|
||||
@ -194,7 +194,6 @@ timediff_t curlx_ptimediff_ms(const struct curltime *newer,
|
||||
return (diff * 1000) + ((newer->tv_usec - older->tv_usec) / 1000);
|
||||
}
|
||||
|
||||
|
||||
timediff_t curlx_timediff_ms(struct curltime newer, struct curltime older)
|
||||
{
|
||||
return curlx_ptimediff_ms(&newer, &older);
|
||||
|
||||
@ -67,8 +67,8 @@ static struct addrinfo *mk_getaddrinfo(const struct ares_addrinfo *aihead)
|
||||
for(ai = aihead->nodes; ai != NULL; ai = ai->ai_next) {
|
||||
size_t ss_size;
|
||||
size_t namelen = name ? strlen(name) + 1 : 0;
|
||||
/* ignore elements with unsupported address family, */
|
||||
/* settle family-specific sockaddr structure size. */
|
||||
/* ignore elements with unsupported address family,
|
||||
settle family-specific sockaddr structure size. */
|
||||
if(ai->ai_family == AF_INET)
|
||||
ss_size = sizeof(struct sockaddr_in);
|
||||
else if(ai->ai_family == AF_INET6)
|
||||
@ -90,8 +90,8 @@ static struct addrinfo *mk_getaddrinfo(const struct ares_addrinfo *aihead)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* copy each structure member individually, member ordering, */
|
||||
/* size, or padding might be different for each platform. */
|
||||
/* copy each structure member individually, member ordering,
|
||||
size, or padding might be different for each platform. */
|
||||
|
||||
ca->ai_flags = ai->ai_flags;
|
||||
ca->ai_family = ai->ai_family;
|
||||
|
||||
10
lib/http.c
10
lib/http.c
@ -685,7 +685,8 @@ static CURLcode output_auth_headers(struct Curl_easy *data,
|
||||
if(
|
||||
#ifndef CURL_DISABLE_PROXY
|
||||
(proxy && conn->bits.proxy_user_passwd &&
|
||||
!Curl_checkProxyheaders(data, conn, STRCONST("Proxy-authorization"))) ||
|
||||
!Curl_checkProxyheaders(data, conn,
|
||||
STRCONST("Proxy-authorization"))) ||
|
||||
#endif
|
||||
(!proxy && data->state.aptr.user &&
|
||||
!Curl_checkheaders(data, STRCONST("Authorization")))) {
|
||||
@ -703,8 +704,8 @@ static CURLcode output_auth_headers(struct Curl_easy *data,
|
||||
#ifndef CURL_DISABLE_BEARER_AUTH
|
||||
if(authstatus->picked == CURLAUTH_BEARER) {
|
||||
/* Bearer */
|
||||
if((!proxy && data->set.str[STRING_BEARER] &&
|
||||
!Curl_checkheaders(data, STRCONST("Authorization")))) {
|
||||
if(!proxy && data->set.str[STRING_BEARER] &&
|
||||
!Curl_checkheaders(data, STRCONST("Authorization"))) {
|
||||
auth = "Bearer";
|
||||
result = http_output_bearer(data);
|
||||
if(result)
|
||||
@ -2625,7 +2626,6 @@ static CURLcode http_range(struct Curl_easy *data,
|
||||
data->state.aptr.rangeline =
|
||||
curl_maprintf("Content-Range: bytes 0-%" FMT_OFF_T "/"
|
||||
"%" FMT_OFF_T "\r\n", req_clen - 1, req_clen);
|
||||
|
||||
}
|
||||
else if(data->state.resume_from) {
|
||||
/* This is because "resume" was selected */
|
||||
@ -4345,7 +4345,7 @@ void Curl_http_to_fold(struct dynbuf *bf)
|
||||
len--;
|
||||
if(len && (hd[len - 1] == '\r'))
|
||||
len--;
|
||||
while(len && (ISBLANK(hd[len - 1]))) /* strip off trailing whitespace */
|
||||
while(len && ISBLANK(hd[len - 1])) /* strip off trailing whitespace */
|
||||
len--;
|
||||
curlx_dyn_setlen(bf, len);
|
||||
}
|
||||
|
||||
@ -888,7 +888,6 @@ static void h2_xfer_write_resp_hd(struct Curl_cfilter *cf,
|
||||
struct h2_stream_ctx *stream,
|
||||
const char *buf, size_t blen, bool eos)
|
||||
{
|
||||
|
||||
/* If we already encountered an error, skip further writes */
|
||||
if(!stream->xfer_result) {
|
||||
stream->xfer_result = Curl_xfer_write_resp_hd(data, buf, blen, eos);
|
||||
@ -905,7 +904,6 @@ static void h2_xfer_write_resp(struct Curl_cfilter *cf,
|
||||
struct h2_stream_ctx *stream,
|
||||
const char *buf, size_t blen, bool eos)
|
||||
{
|
||||
|
||||
/* If we already encountered an error, skip further writes */
|
||||
if(!stream->xfer_result)
|
||||
stream->xfer_result = Curl_xfer_write_resp(data, buf, blen, eos);
|
||||
|
||||
@ -645,7 +645,6 @@ fail:
|
||||
|
||||
static int compare_func(const void *a, const void *b)
|
||||
{
|
||||
|
||||
const struct pair *aa = a;
|
||||
const struct pair *bb = b;
|
||||
const size_t aa_key_len = curlx_dyn_len(&aa->key);
|
||||
|
||||
@ -2324,7 +2324,6 @@ static const struct Curl_protocol Curl_protocol_imap = {
|
||||
|
||||
#endif /* CURL_DISABLE_IMAP */
|
||||
|
||||
|
||||
/*
|
||||
* IMAP protocol handler.
|
||||
*/
|
||||
|
||||
@ -131,9 +131,9 @@ struct asprintf {
|
||||
};
|
||||
|
||||
/* the provided input number is 1-based but this returns the number 0-based.
|
||||
|
||||
returns -1 if no valid number was provided.
|
||||
*/
|
||||
*
|
||||
* returns -1 if no valid number was provided.
|
||||
*/
|
||||
static int dollarstring(const char *p, const char **end)
|
||||
{
|
||||
curl_off_t num;
|
||||
|
||||
@ -962,7 +962,6 @@ static CURLcode mqtts_connecting(struct Curl_easy *data, bool *done)
|
||||
/*
|
||||
* MQTTS protocol.
|
||||
*/
|
||||
|
||||
static const struct Curl_protocol Curl_protocol_mqtts = {
|
||||
mqtt_setup_conn, /* setup_connection */
|
||||
mqtt_do, /* do_it */
|
||||
@ -988,7 +987,6 @@ static const struct Curl_protocol Curl_protocol_mqtts = {
|
||||
/*
|
||||
* MQTT protocol.
|
||||
*/
|
||||
|
||||
static const struct Curl_protocol Curl_protocol_mqtt = {
|
||||
mqtt_setup_conn, /* setup_connection */
|
||||
mqtt_do, /* do_it */
|
||||
@ -1011,7 +1009,6 @@ static const struct Curl_protocol Curl_protocol_mqtt = {
|
||||
|
||||
#endif /* CURL_DISABLE_MQTT */
|
||||
|
||||
|
||||
const struct Curl_scheme Curl_scheme_mqtts = {
|
||||
"mqtts", /* scheme */
|
||||
#if defined(CURL_DISABLE_MQTT) || !defined(USE_SSL)
|
||||
@ -1028,7 +1025,6 @@ const struct Curl_scheme Curl_scheme_mqtts = {
|
||||
/*
|
||||
* MQTT protocol.
|
||||
*/
|
||||
|
||||
const struct Curl_scheme Curl_scheme_mqtt = {
|
||||
"mqtt", /* scheme */
|
||||
#ifdef CURL_DISABLE_MQTT
|
||||
|
||||
@ -114,7 +114,6 @@ struct ldapreqinfo {
|
||||
/* meta key for storing ldapconninfo at connection */
|
||||
#define CURL_META_LDAP_CONN "meta:proto:ldap:conn"
|
||||
|
||||
|
||||
/*
|
||||
* oldap_state()
|
||||
*
|
||||
|
||||
@ -169,14 +169,11 @@ CURLcode Curl_pollset_set(struct Curl_easy *data,
|
||||
#define Curl_pollset_remove_out(data, ps, sock) \
|
||||
Curl_pollset_change(data, ps, sock, 0, CURL_POLL_OUT)
|
||||
#define Curl_pollset_add_inout(data, ps, sock) \
|
||||
Curl_pollset_change(data, ps, sock, \
|
||||
CURL_POLL_IN | CURL_POLL_OUT, 0)
|
||||
Curl_pollset_change(data, ps, sock, CURL_POLL_IN | CURL_POLL_OUT, 0)
|
||||
#define Curl_pollset_set_in_only(data, ps, sock) \
|
||||
Curl_pollset_change(data, ps, sock, \
|
||||
CURL_POLL_IN, CURL_POLL_OUT)
|
||||
Curl_pollset_change(data, ps, sock, CURL_POLL_IN, CURL_POLL_OUT)
|
||||
#define Curl_pollset_set_out_only(data, ps, sock) \
|
||||
Curl_pollset_change(data, ps, sock, \
|
||||
CURL_POLL_OUT, CURL_POLL_IN)
|
||||
Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, CURL_POLL_IN)
|
||||
|
||||
/* return < = on error, 0 on timeout or how many sockets are ready */
|
||||
int Curl_pollset_poll(struct Curl_easy *data,
|
||||
|
||||
@ -55,7 +55,7 @@ struct Curl_cwriter;
|
||||
struct Curl_easy;
|
||||
|
||||
/**
|
||||
* Write `len` bytes at `prt` to the client. `type` indicates what
|
||||
* Write `len` bytes at `buf` to the client. `type` indicates what
|
||||
* kind of data is being written.
|
||||
*/
|
||||
CURLcode Curl_client_write(struct Curl_easy *data, int type, const char *buf,
|
||||
|
||||
@ -24,8 +24,7 @@
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* */
|
||||
/* JEM, 12/30/12, VMS now generates config.h, so only define wrappers for */
|
||||
/* JEM, 2012-12-30, VMS now generates config.h, so only define wrappers for */
|
||||
/* getenv(), getpwuid() and provide is_vms_shell() */
|
||||
/* Also need upper case symbols for system services, and */
|
||||
/* OpenSSL, and some Kerberos image */
|
||||
|
||||
@ -1061,9 +1061,9 @@ static CURLcode smtp_perform_mail(struct Curl_easy *data,
|
||||
"MAIL FROM:%s%s%s%s%s%s",
|
||||
from, /* Mandatory */
|
||||
auth ? " AUTH=" : "", /* Optional on AUTH support */
|
||||
auth ? auth : "", /* */
|
||||
auth ? auth : "",
|
||||
size ? " SIZE=" : "", /* Optional on SIZE support */
|
||||
size ? size : "", /* */
|
||||
size ? size : "",
|
||||
utf8 ? " SMTPUTF8" /* Internationalised mailbox */
|
||||
: ""); /* included in our envelope */
|
||||
|
||||
|
||||
@ -1339,7 +1339,6 @@ static CURLcode socks_cf_adjust_pollset(struct Curl_cfilter *cf,
|
||||
static void socks_proxy_cf_close(struct Curl_cfilter *cf,
|
||||
struct Curl_easy *data)
|
||||
{
|
||||
|
||||
DEBUGASSERT(cf->next);
|
||||
cf->connected = FALSE;
|
||||
socks_proxy_cf_free(cf);
|
||||
|
||||
@ -281,7 +281,7 @@ static CURLcode socks5_sspi_encrypt(struct Curl_cfilter *cf,
|
||||
|
||||
infof(data, "SOCKS5 server supports GSS-API %s data protection.",
|
||||
(gss_enc == 0) ? "no" :
|
||||
((gss_enc == 1) ? "integrity" : "confidentiality") );
|
||||
((gss_enc == 1) ? "integrity" : "confidentiality"));
|
||||
|
||||
sspi_w_token[0].pvBuffer =
|
||||
sspi_w_token[1].pvBuffer =
|
||||
|
||||
@ -2538,7 +2538,6 @@ error:
|
||||
static CURLcode parse_remote_port(struct Curl_easy *data,
|
||||
struct connectdata *conn)
|
||||
{
|
||||
|
||||
if(data->set.use_port && data->state.allow_port) {
|
||||
/* if set, we use this instead of the port possibly given in the URL */
|
||||
char portbuf[16];
|
||||
|
||||
@ -416,7 +416,7 @@ static CURLcode get_client_cert(struct Curl_easy *data,
|
||||
}
|
||||
|
||||
if(fInCert || blob) {
|
||||
/* Reading a .P12 or .pfx file, like the example at bottom of
|
||||
/* Reading a .p12 or .pfx file, like the example at bottom of
|
||||
https://learn.microsoft.com/archive/msdn-technet-forums/3e7bc95f-b21a-4bcd-bd2c-7f996718cae5
|
||||
*/
|
||||
CRYPT_DATA_BLOB datablob;
|
||||
@ -2030,8 +2030,8 @@ static CURLcode schannel_send(struct Curl_cfilter *cf, struct Curl_easy *data,
|
||||
timediff_t timeout_ms = Curl_timeleft_ms(data);
|
||||
if(timeout_ms < 0) {
|
||||
/* we already got the timeout */
|
||||
failf(data, "schannel: timed out sending data "
|
||||
"(bytes sent: %zu)", *pnwritten);
|
||||
failf(data, "schannel: timed out sending data (bytes sent: %zu)",
|
||||
*pnwritten);
|
||||
result = CURLE_OPERATION_TIMEDOUT;
|
||||
break;
|
||||
}
|
||||
@ -2045,8 +2045,8 @@ static CURLcode schannel_send(struct Curl_cfilter *cf, struct Curl_easy *data,
|
||||
break;
|
||||
}
|
||||
else if(what == 0) {
|
||||
failf(data, "schannel: timed out sending data "
|
||||
"(bytes sent: %zu)", *pnwritten);
|
||||
failf(data, "schannel: timed out sending data (bytes sent: %zu)",
|
||||
*pnwritten);
|
||||
result = CURLE_OPERATION_TIMEDOUT;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -38,20 +38,20 @@
|
||||
#include "vtls/schannel.h"
|
||||
#include "vtls/schannel_int.h"
|
||||
|
||||
#include "curlx/fopen.h"
|
||||
#include "curlx/inet_pton.h"
|
||||
#include "vtls/hostcheck.h"
|
||||
#include "vtls/vtls.h"
|
||||
#include "vtls/vtls_int.h"
|
||||
#include "curl_trc.h"
|
||||
#include "strerror.h"
|
||||
#include "curlx/winapi.h"
|
||||
#include "curlx/fopen.h"
|
||||
#include "curlx/inet_pton.h"
|
||||
#include "curlx/multibyte.h"
|
||||
#include "vtls/hostcheck.h"
|
||||
#include "curlx/version_win32.h"
|
||||
#include "curlx/winapi.h"
|
||||
|
||||
#define BACKEND ((struct schannel_ssl_backend_data *)connssl->backend)
|
||||
|
||||
#define MAX_CAFILE_SIZE 1048576 /* 1 MiB */
|
||||
#define MAX_CAFILE_SIZE (1024 * 1024) /* 1 MiB */
|
||||
#define BEGIN_CERT "-----BEGIN CERTIFICATE-----"
|
||||
#define END_CERT "\n-----END CERTIFICATE-----"
|
||||
|
||||
@ -438,10 +438,8 @@ static DWORD cert_get_name_string(struct Curl_easy *data,
|
||||
|
||||
static bool get_num_host_info(struct num_ip_data *ip_blob, LPCSTR hostname)
|
||||
{
|
||||
struct in_addr ia;
|
||||
struct in6_addr ia6;
|
||||
bool result = FALSE;
|
||||
|
||||
struct in_addr ia;
|
||||
int res = curlx_inet_pton(AF_INET, hostname, &ia);
|
||||
if(res) {
|
||||
ip_blob->size = sizeof(struct in_addr);
|
||||
@ -449,6 +447,7 @@ static bool get_num_host_info(struct num_ip_data *ip_blob, LPCSTR hostname)
|
||||
result = TRUE;
|
||||
}
|
||||
else {
|
||||
struct in6_addr ia6;
|
||||
res = curlx_inet_pton(AF_INET6, hostname, &ia6);
|
||||
if(res) {
|
||||
ip_blob->size = sizeof(struct in6_addr);
|
||||
|
||||
@ -97,7 +97,7 @@ struct ssl_peer {
|
||||
CURLsslset Curl_init_sslset_nolock(curl_sslbackend id, const char *name,
|
||||
const curl_ssl_backend ***avail);
|
||||
|
||||
#define MAX_PINNED_PUBKEY_SIZE 1048576 /* 1 MiB */
|
||||
#define MAX_PINNED_PUBKEY_SIZE (1024 * 1024) /* 1 MiB */
|
||||
|
||||
curl_sslbackend Curl_ssl_backend(void);
|
||||
|
||||
|
||||
@ -1424,7 +1424,6 @@ CURLcode Curl_wssl_ctx_init(struct wssl_ctx *wctx,
|
||||
result = CURLE_SSL_CONNECT_ERROR;
|
||||
goto out;
|
||||
}
|
||||
|
||||
}
|
||||
#endif /* HAVE_WOLFSSL_CTX_GENERATEECHCONFIG */
|
||||
|
||||
|
||||
@ -37,20 +37,6 @@
|
||||
|
||||
#include "curlmsg.h"
|
||||
|
||||
/*
|
||||
#define FAC_CURL 0xC01
|
||||
#define FAC_SYSTEM 0
|
||||
#define MSG_NORMAL 0
|
||||
*/
|
||||
|
||||
/*
|
||||
#define SEV_WARNING 0
|
||||
#define SEV_SUCCESS 1
|
||||
#define SEV_ERROR 2
|
||||
#define SEV_INFO 3
|
||||
#define SEV_FATAL 4
|
||||
*/
|
||||
|
||||
static const long vms_cond[] =
|
||||
{
|
||||
CURL_OK,
|
||||
|
||||
@ -1230,7 +1230,6 @@ sub scanfile {
|
||||
checksrc_endoffile($file);
|
||||
|
||||
close($R);
|
||||
|
||||
}
|
||||
|
||||
if($errors || $warnings || $verbose) {
|
||||
|
||||
@ -529,7 +529,6 @@ sub render {
|
||||
my $qstr = $quote ? "q" : "";
|
||||
push @desc, "[".(1 + $level)."$qstr]$d" if(!$manpage);
|
||||
$header = 0;
|
||||
|
||||
}
|
||||
if($finalblank) {
|
||||
print STDERR "$f:$line:1:ERROR: trailing blank line\n";
|
||||
|
||||
@ -180,6 +180,26 @@ while(my $filename = <$git_ls_files>) {
|
||||
$linepos += $line;
|
||||
}
|
||||
|
||||
$search = $content;
|
||||
$linepos = 0;
|
||||
while($search =~ /\n\n *}\n/) {
|
||||
my $part = substr($search, 0, $+[0] - 1);
|
||||
$search = substr($search, $+[0]);
|
||||
my $line = ($part =~ tr/\n//);
|
||||
push @err, sprintf("line %d: '}' preceded by empty line", $linepos + $line);
|
||||
$linepos += $line + 1;
|
||||
}
|
||||
|
||||
$search = $content;
|
||||
$linepos = 0;
|
||||
while($search =~ /\n\{\n\n/) {
|
||||
my $part = substr($search, 0, $+[0]);
|
||||
$search = substr($search, $+[0]);
|
||||
my $line = ($part =~ tr/\n//);
|
||||
push @err, sprintf("line %d: top-level '{' followed by empty line", $linepos + $line);
|
||||
$linepos += $line;
|
||||
}
|
||||
|
||||
if($content =~ /([\x00-\x08\x0b\x0c\x0e-\x1f\x7f])/) {
|
||||
push @err, "content: has binary contents";
|
||||
}
|
||||
|
||||
@ -111,7 +111,6 @@ for my $l (@output) {
|
||||
$alllines += $len;
|
||||
$allscore += ($len * $score);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
my $showncutoff;
|
||||
|
||||
@ -456,7 +456,7 @@ UNITTEST ParameterError parse_cert_parameter(const char *cert_parameter,
|
||||
#ifdef _WIN32
|
||||
if((param_place == &cert_parameter[1]) &&
|
||||
(cert_parameter[2] == '\\' || cert_parameter[2] == '/') &&
|
||||
(ISALPHA(cert_parameter[0]))) {
|
||||
ISALPHA(cert_parameter[0])) {
|
||||
/* colon in the second column, followed by a backslash, and the
|
||||
first character is an alphabetic letter:
|
||||
|
||||
@ -1256,7 +1256,7 @@ static ParameterError parse_ech(struct OperationConfig *config,
|
||||
warnf("Could not read file \"%s\" "
|
||||
"specified for \"--ech ecl:\" option",
|
||||
nextarg);
|
||||
return PARAM_BAD_USE; /* */
|
||||
return PARAM_BAD_USE;
|
||||
}
|
||||
err = file2string(&tmpcfg, file);
|
||||
if(file != stdin)
|
||||
|
||||
@ -209,7 +209,8 @@ ParameterError parseconfig(const char *filename, int max_recursive,
|
||||
}
|
||||
|
||||
#ifdef DEBUG_CONFIG
|
||||
curl_mfprintf(tool_stderr, "PARAM: \"%s\"\n",(param ? param : "(null)"));
|
||||
curl_mfprintf(tool_stderr, "PARAM: \"%s\"\n",
|
||||
(param ? param : "(null)"));
|
||||
#endif
|
||||
res = getparameter(option, param, &usedarg, config, max_recursive);
|
||||
config = global->last;
|
||||
|
||||
@ -146,7 +146,7 @@ elsif($ARGV[0] eq "postprocess") {
|
||||
}
|
||||
close(IN);
|
||||
|
||||
@canondir = sort {substr($a,57) cmp substr($b,57)} @canondir;
|
||||
@canondir = sort {substr($a, 57) cmp substr($b, 57)} @canondir;
|
||||
my $newfile = $logfile . ".new";
|
||||
open(OUT, ">$newfile") || die "$!";
|
||||
print OUT join('', @canondir);
|
||||
|
||||
@ -154,7 +154,6 @@ sub memanalyze {
|
||||
|
||||
$sizeataddr{$addr}=-1; # set -1 to mark as freed
|
||||
$getmem{$addr}="$source:$linenum";
|
||||
|
||||
}
|
||||
}
|
||||
elsif($function =~ /malloc\((\d*)\) = 0x([0-9a-f]*)/) {
|
||||
@ -380,7 +379,6 @@ sub memanalyze {
|
||||
push @res, "FREEADDRINFO ($source:$linenum)\n";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
push @res, "Not recognized prefix line: $line\n";
|
||||
|
||||
@ -1447,7 +1447,6 @@ sub singletest_check {
|
||||
}
|
||||
|
||||
$ok .= "p";
|
||||
|
||||
}
|
||||
else {
|
||||
$ok .= "-"; # protocol not checked
|
||||
@ -1609,7 +1608,6 @@ sub singletest_check {
|
||||
}
|
||||
|
||||
$ok .= "P";
|
||||
|
||||
}
|
||||
else {
|
||||
$ok .= "-"; # proxy not checked
|
||||
|
||||
@ -519,7 +519,6 @@ static curl_socket_t sockit(curl_socket_t fd)
|
||||
rep = s_config.connectrep;
|
||||
}
|
||||
|
||||
/* */
|
||||
response[SOCKS5_VERSION] = s_config.responseversion;
|
||||
|
||||
/*
|
||||
|
||||
@ -311,7 +311,7 @@ sub serverfortest {
|
||||
push @lprotocols, "dns";
|
||||
|
||||
if(! grep /^\Q$server\E$/, @lprotocols) {
|
||||
if(substr($server,0,5) ne "socks") {
|
||||
if(substr($server, 0, 5) ne "socks") {
|
||||
if($tlsext) {
|
||||
return ("curl lacks $tlsext support", 4);
|
||||
}
|
||||
|
||||
@ -279,7 +279,6 @@ while(<$r>) {
|
||||
push @toolhelp, $combo;
|
||||
$opts{$combo} |= 4;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
close($r);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user