mirror of
https://github.com/curl/curl.git
synced 2026-08-26 07:43:33 +03:00
parent
61b79dee79
commit
a4196e2249
23 changed files with 51 additions and 90 deletions
|
|
@ -26,7 +26,7 @@
|
|||
TARGET = example
|
||||
|
||||
# Which object files that the executable consists of
|
||||
OBJS= ftpget.o
|
||||
OBJS = ftpget.o
|
||||
|
||||
# What compiler to use
|
||||
CC = gcc
|
||||
|
|
@ -48,7 +48,7 @@ LIBS = -lcurl -lsocket -lnsl -lssl -lcrypto
|
|||
|
||||
# Link the target with all objects and libraries
|
||||
$(TARGET) : $(OBJS)
|
||||
$(CC) -o $(TARGET) $(OBJS) $(LDFLAGS) $(LIBS)
|
||||
$(CC) -o $(TARGET) $(OBJS) $(LDFLAGS) $(LIBS)
|
||||
|
||||
# Compile the source files into object files
|
||||
ftpget.o : ftpget.c
|
||||
|
|
|
|||
|
|
@ -88,7 +88,6 @@ struct GlobalInfo {
|
|||
FILE *input;
|
||||
};
|
||||
|
||||
|
||||
/* Information associated with a specific easy handle */
|
||||
struct ConnInfo {
|
||||
CURL *easy;
|
||||
|
|
@ -97,7 +96,6 @@ struct ConnInfo {
|
|||
char error[CURL_ERROR_SIZE];
|
||||
};
|
||||
|
||||
|
||||
/* Information associated with a specific socket */
|
||||
struct SockInfo {
|
||||
curl_socket_t sockfd;
|
||||
|
|
@ -167,7 +165,6 @@ static int multi_timer_cb(CURLM *multi, long timeout_ms, struct GlobalInfo *g)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Check for completed transfers, and remove their easy handles */
|
||||
static void check_multi_info(struct GlobalInfo *g)
|
||||
{
|
||||
|
|
@ -244,7 +241,6 @@ static void timer_cb(struct GlobalInfo *g, int revents)
|
|||
check_multi_info(g);
|
||||
}
|
||||
|
||||
|
||||
/* Clean up the SockInfo structure */
|
||||
static void remsock(struct SockInfo *f, struct GlobalInfo *g)
|
||||
{
|
||||
|
|
@ -258,7 +254,6 @@ static void remsock(struct SockInfo *f, struct GlobalInfo *g)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/* Assign information to a SockInfo structure */
|
||||
static void setsock(struct SockInfo *f, curl_socket_t s, CURL *e, int act,
|
||||
struct GlobalInfo *g)
|
||||
|
|
@ -284,7 +279,6 @@ static void setsock(struct SockInfo *f, curl_socket_t s, CURL *e, int act,
|
|||
s, strerror(errno));
|
||||
}
|
||||
|
||||
|
||||
/* Initialize a new SockInfo structure */
|
||||
static void addsock(curl_socket_t s, CURL *easy, int action,
|
||||
struct GlobalInfo *g)
|
||||
|
|
@ -324,7 +318,6 @@ static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* CURLOPT_WRITEFUNCTION */
|
||||
static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *data)
|
||||
{
|
||||
|
|
@ -333,7 +326,6 @@ static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *data)
|
|||
return size * nmemb;
|
||||
}
|
||||
|
||||
|
||||
/* CURLOPT_PROGRESSFUNCTION */
|
||||
static int prog_cb(void *p, double dltotal, double dlnow, double ult,
|
||||
double uln)
|
||||
|
|
@ -346,7 +338,6 @@ static int prog_cb(void *p, double dltotal, double dlnow, double ult,
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Create a new easy handle, and add it to the global curl_multi */
|
||||
static void new_conn(const char *url, struct GlobalInfo *g)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -88,7 +88,6 @@ struct GlobalInfo {
|
|||
FILE *input;
|
||||
};
|
||||
|
||||
|
||||
/* Information associated with a specific easy handle */
|
||||
struct ConnInfo {
|
||||
CURL *easy;
|
||||
|
|
@ -97,7 +96,6 @@ struct ConnInfo {
|
|||
char error[CURL_ERROR_SIZE];
|
||||
};
|
||||
|
||||
|
||||
/* Information associated with a specific socket */
|
||||
struct SockInfo {
|
||||
curl_socket_t sockfd;
|
||||
|
|
@ -164,7 +162,6 @@ static void mcode_or_die(const char *where, CURLMcode code)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/* Check for completed transfers, and remove their easy handles */
|
||||
static void check_multi_info(struct GlobalInfo *g)
|
||||
{
|
||||
|
|
@ -191,7 +188,6 @@ static void check_multi_info(struct GlobalInfo *g)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/* Called by libevent when we get action on a multi socket */
|
||||
static void event_cb(EV_P_ struct ev_io *w, int revents)
|
||||
{
|
||||
|
|
@ -240,7 +236,6 @@ static void remsock(struct SockInfo *f, struct GlobalInfo *g)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/* Assign information to a SockInfo structure */
|
||||
static void setsock(struct SockInfo *f, curl_socket_t s, CURL *e, int act,
|
||||
struct GlobalInfo *g)
|
||||
|
|
@ -261,7 +256,6 @@ static void setsock(struct SockInfo *f, curl_socket_t s, CURL *e, int act,
|
|||
ev_io_start(g->loop, &f->ev);
|
||||
}
|
||||
|
||||
|
||||
/* Initialize a new SockInfo structure */
|
||||
static void addsock(curl_socket_t s, CURL *easy, int action,
|
||||
struct GlobalInfo *g)
|
||||
|
|
@ -304,7 +298,6 @@ static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* CURLOPT_WRITEFUNCTION */
|
||||
static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *data)
|
||||
{
|
||||
|
|
@ -328,7 +321,6 @@ static int xferinfo_cb(void *p, curl_off_t dltotal, curl_off_t dlnow,
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Create a new easy handle, and add it to the global curl_multi */
|
||||
static void new_conn(const char *url, struct GlobalInfo *g)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -88,7 +88,6 @@ struct GlobalInfo {
|
|||
int stopped;
|
||||
};
|
||||
|
||||
|
||||
/* Information associated with a specific easy handle */
|
||||
struct ConnInfo {
|
||||
CURL *easy;
|
||||
|
|
@ -97,7 +96,6 @@ struct ConnInfo {
|
|||
char error[CURL_ERROR_SIZE];
|
||||
};
|
||||
|
||||
|
||||
/* Information associated with a specific socket */
|
||||
struct SockInfo {
|
||||
curl_socket_t sockfd;
|
||||
|
|
@ -134,7 +132,6 @@ static void mcode_or_die(const char *where, CURLMcode code)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/* Update the event timer after curl_multi library calls */
|
||||
static int multi_timer_cb(CURLM *multi, long timeout_ms, struct GlobalInfo *g)
|
||||
{
|
||||
|
|
@ -158,7 +155,6 @@ static int multi_timer_cb(CURLM *multi, long timeout_ms, struct GlobalInfo *g)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Check for completed transfers, and remove their easy handles */
|
||||
static void check_multi_info(struct GlobalInfo *g)
|
||||
{
|
||||
|
|
@ -187,7 +183,6 @@ static void check_multi_info(struct GlobalInfo *g)
|
|||
event_base_loopbreak(g->evbase);
|
||||
}
|
||||
|
||||
|
||||
/* Called by libevent when we get action on a multi socket */
|
||||
static void event_cb(int fd, short kind, void *userp)
|
||||
{
|
||||
|
|
@ -210,7 +205,6 @@ static void event_cb(int fd, short kind, void *userp)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/* Called by libevent when our timeout expires */
|
||||
static void timer_cb(int fd, short kind, void *userp)
|
||||
{
|
||||
|
|
@ -225,7 +219,6 @@ static void timer_cb(int fd, short kind, void *userp)
|
|||
check_multi_info(g);
|
||||
}
|
||||
|
||||
|
||||
/* Clean up the SockInfo structure */
|
||||
static void remsock(struct SockInfo *f)
|
||||
{
|
||||
|
|
@ -237,7 +230,6 @@ static void remsock(struct SockInfo *f)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/* Assign information to a SockInfo structure */
|
||||
static void setsock(struct SockInfo *f, curl_socket_t s, CURL *e, int act,
|
||||
struct GlobalInfo *g)
|
||||
|
|
@ -256,7 +248,6 @@ static void setsock(struct SockInfo *f, curl_socket_t s, CURL *e, int act,
|
|||
event_add(&f->ev, NULL);
|
||||
}
|
||||
|
||||
|
||||
/* Initialize a new SockInfo structure */
|
||||
static void addsock(curl_socket_t s, CURL *easy, int action,
|
||||
struct GlobalInfo *g)
|
||||
|
|
@ -296,7 +287,6 @@ static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* CURLOPT_WRITEFUNCTION */
|
||||
static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *data)
|
||||
{
|
||||
|
|
@ -305,7 +295,6 @@ static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *data)
|
|||
return size * nmemb;
|
||||
}
|
||||
|
||||
|
||||
/* CURLOPT_PROGRESSFUNCTION */
|
||||
static int xferinfo_cb(void *p, curl_off_t dltotal, curl_off_t dlnow,
|
||||
curl_off_t ult, curl_off_t uln)
|
||||
|
|
@ -319,7 +308,6 @@ static int xferinfo_cb(void *p, curl_off_t dltotal, curl_off_t dlnow,
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Create a new easy handle, and add it to the global curl_multi */
|
||||
static void new_conn(const char *url, struct GlobalInfo *g)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -430,6 +430,7 @@ static const struct Curl_cwtype ftp_cw_lc = {
|
|||
};
|
||||
|
||||
#endif /* CURL_PREFER_LF_LINEENDS */
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* ftp_check_ctrl_on_data_wait()
|
||||
|
|
@ -629,7 +630,6 @@ static CURLcode ftp_readresp(struct Curl_easy *data,
|
|||
* from a server after a command.
|
||||
*
|
||||
*/
|
||||
|
||||
CURLcode Curl_GetFTPResponse(struct Curl_easy *data,
|
||||
ssize_t *nreadp, /* return number of bytes read */
|
||||
int *ftpcodep) /* return the ftp-code */
|
||||
|
|
@ -3494,7 +3494,6 @@ static CURLcode ftp_done(struct Curl_easy *data, CURLcode status,
|
|||
*
|
||||
* BLOCKING
|
||||
*/
|
||||
|
||||
static
|
||||
CURLcode ftp_sendquote(struct Curl_easy *data,
|
||||
struct ftp_conn *ftpc,
|
||||
|
|
@ -3617,7 +3616,6 @@ ftp_pasv_verbose(struct Curl_easy *data,
|
|||
* (which basically is only for when PASV is being sent to retry a failed
|
||||
* EPSV).
|
||||
*/
|
||||
|
||||
static CURLcode ftp_do_more(struct Curl_easy *data, int *completep)
|
||||
{
|
||||
struct connectdata *conn = data->conn;
|
||||
|
|
@ -3781,7 +3779,6 @@ static CURLcode ftp_do_more(struct Curl_easy *data, int *completep)
|
|||
* This is the actual DO function for FTP. Get a file/directory according to
|
||||
* the options previously setup.
|
||||
*/
|
||||
|
||||
static
|
||||
CURLcode ftp_perform(struct Curl_easy *data,
|
||||
struct ftp_conn *ftpc,
|
||||
|
|
|
|||
|
|
@ -342,7 +342,7 @@ static const void *my_md4_body(MD4_CTX *ctx,
|
|||
saved_c = c;
|
||||
saved_d = d;
|
||||
|
||||
/* Round 1 */
|
||||
/* Round 1 */
|
||||
MD4_STEP(MD4_F, a, b, c, d, MD4_SET(0), 3)
|
||||
MD4_STEP(MD4_F, d, a, b, c, MD4_SET(1), 7)
|
||||
MD4_STEP(MD4_F, c, d, a, b, MD4_SET(2), 11)
|
||||
|
|
@ -360,7 +360,7 @@ static const void *my_md4_body(MD4_CTX *ctx,
|
|||
MD4_STEP(MD4_F, c, d, a, b, MD4_SET(14), 11)
|
||||
MD4_STEP(MD4_F, b, c, d, a, MD4_SET(15), 19)
|
||||
|
||||
/* Round 2 */
|
||||
/* Round 2 */
|
||||
MD4_STEP(MD4_G, a, b, c, d, MD4_GET(0) + 0x5a827999, 3)
|
||||
MD4_STEP(MD4_G, d, a, b, c, MD4_GET(4) + 0x5a827999, 5)
|
||||
MD4_STEP(MD4_G, c, d, a, b, MD4_GET(8) + 0x5a827999, 9)
|
||||
|
|
@ -378,7 +378,7 @@ static const void *my_md4_body(MD4_CTX *ctx,
|
|||
MD4_STEP(MD4_G, c, d, a, b, MD4_GET(11) + 0x5a827999, 9)
|
||||
MD4_STEP(MD4_G, b, c, d, a, MD4_GET(15) + 0x5a827999, 13)
|
||||
|
||||
/* Round 3 */
|
||||
/* Round 3 */
|
||||
MD4_STEP(MD4_H, a, b, c, d, MD4_GET(0) + 0x6ed9eba1, 3)
|
||||
MD4_STEP(MD4_H, d, a, b, c, MD4_GET(8) + 0x6ed9eba1, 9)
|
||||
MD4_STEP(MD4_H, c, d, a, b, MD4_GET(4) + 0x6ed9eba1, 11)
|
||||
|
|
|
|||
|
|
@ -382,7 +382,7 @@ static const void *my_md5_body(my_md5_ctx *ctx,
|
|||
saved_c = c;
|
||||
saved_d = d;
|
||||
|
||||
/* Round 1 */
|
||||
/* Round 1 */
|
||||
MD5_STEP(MD5_F, a, b, c, d, MD5_SET(0), 0xd76aa478, 7)
|
||||
MD5_STEP(MD5_F, d, a, b, c, MD5_SET(1), 0xe8c7b756, 12)
|
||||
MD5_STEP(MD5_F, c, d, a, b, MD5_SET(2), 0x242070db, 17)
|
||||
|
|
@ -400,7 +400,7 @@ static const void *my_md5_body(my_md5_ctx *ctx,
|
|||
MD5_STEP(MD5_F, c, d, a, b, MD5_SET(14), 0xa679438e, 17)
|
||||
MD5_STEP(MD5_F, b, c, d, a, MD5_SET(15), 0x49b40821, 22)
|
||||
|
||||
/* Round 2 */
|
||||
/* Round 2 */
|
||||
MD5_STEP(MD5_G, a, b, c, d, MD5_GET(1), 0xf61e2562, 5)
|
||||
MD5_STEP(MD5_G, d, a, b, c, MD5_GET(6), 0xc040b340, 9)
|
||||
MD5_STEP(MD5_G, c, d, a, b, MD5_GET(11), 0x265e5a51, 14)
|
||||
|
|
@ -418,7 +418,7 @@ static const void *my_md5_body(my_md5_ctx *ctx,
|
|||
MD5_STEP(MD5_G, c, d, a, b, MD5_GET(7), 0x676f02d9, 14)
|
||||
MD5_STEP(MD5_G, b, c, d, a, MD5_GET(12), 0x8d2a4c8a, 20)
|
||||
|
||||
/* Round 3 */
|
||||
/* Round 3 */
|
||||
MD5_STEP(MD5_H, a, b, c, d, MD5_GET(5), 0xfffa3942, 4)
|
||||
MD5_STEP(MD5_H2, d, a, b, c, MD5_GET(8), 0x8771f681, 11)
|
||||
MD5_STEP(MD5_H, c, d, a, b, MD5_GET(11), 0x6d9d6122, 16)
|
||||
|
|
@ -436,7 +436,7 @@ static const void *my_md5_body(my_md5_ctx *ctx,
|
|||
MD5_STEP(MD5_H, c, d, a, b, MD5_GET(15), 0x1fa27cf8, 16)
|
||||
MD5_STEP(MD5_H2, b, c, d, a, MD5_GET(2), 0xc4ac5665, 23)
|
||||
|
||||
/* Round 4 */
|
||||
/* Round 4 */
|
||||
MD5_STEP(MD5_I, a, b, c, d, MD5_GET(0), 0xf4292244, 6)
|
||||
MD5_STEP(MD5_I, d, a, b, c, MD5_GET(7), 0x432aff97, 10)
|
||||
MD5_STEP(MD5_I, c, d, a, b, MD5_GET(14), 0xab9423a7, 15)
|
||||
|
|
|
|||
|
|
@ -321,9 +321,9 @@ curl_socket_t curl_dbg_socket(int domain, int type, int protocol,
|
|||
}
|
||||
|
||||
SEND_TYPE_RETV curl_dbg_send(SEND_TYPE_ARG1 sockfd,
|
||||
SEND_QUAL_ARG2 SEND_TYPE_ARG2 buf,
|
||||
SEND_TYPE_ARG3 len, SEND_TYPE_ARG4 flags, int line,
|
||||
const char *source)
|
||||
SEND_QUAL_ARG2 SEND_TYPE_ARG2 buf,
|
||||
SEND_TYPE_ARG3 len, SEND_TYPE_ARG4 flags,
|
||||
int line, const char *source)
|
||||
{
|
||||
SEND_TYPE_RETV rc;
|
||||
if(countcheck("send", line, source))
|
||||
|
|
@ -336,8 +336,8 @@ SEND_TYPE_RETV curl_dbg_send(SEND_TYPE_ARG1 sockfd,
|
|||
}
|
||||
|
||||
RECV_TYPE_RETV curl_dbg_recv(RECV_TYPE_ARG1 sockfd, RECV_TYPE_ARG2 buf,
|
||||
RECV_TYPE_ARG3 len, RECV_TYPE_ARG4 flags, int line,
|
||||
const char *source)
|
||||
RECV_TYPE_ARG3 len, RECV_TYPE_ARG4 flags,
|
||||
int line, const char *source)
|
||||
{
|
||||
RECV_TYPE_RETV rc;
|
||||
if(countcheck("recv", line, source))
|
||||
|
|
|
|||
|
|
@ -361,9 +361,9 @@ CURLcode Curl_init_userdefined(struct Curl_easy *data)
|
|||
struct UserDefined *set = &data->set;
|
||||
CURLcode result = CURLE_OK;
|
||||
|
||||
set->out = stdout; /* default output to stdout */
|
||||
set->out = stdout; /* default output to stdout */
|
||||
set->in_set = stdin; /* default input from stdin */
|
||||
set->err = stderr; /* default stderr to stderr */
|
||||
set->err = stderr; /* default stderr to stderr */
|
||||
|
||||
/* use fwrite as default function to store output */
|
||||
set->fwrite_func = (curl_write_callback)fwrite;
|
||||
|
|
|
|||
|
|
@ -195,9 +195,9 @@ CURLcode Curl_auth_create_digest_md5_message(struct Curl_easy *data,
|
|||
|
||||
/* Generate our response message */
|
||||
status = Curl_pSecFn->InitializeSecurityContext(&credentials, NULL, spn,
|
||||
0, 0, 0, &chlg_desc, 0,
|
||||
&context, &resp_desc, &attrs,
|
||||
&expiry);
|
||||
0, 0, 0, &chlg_desc, 0,
|
||||
&context, &resp_desc, &attrs,
|
||||
&expiry);
|
||||
|
||||
if(status == SEC_I_COMPLETE_NEEDED ||
|
||||
status == SEC_I_COMPLETE_AND_CONTINUE)
|
||||
|
|
@ -591,11 +591,11 @@ CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data,
|
|||
|
||||
/* Generate our response message */
|
||||
status = Curl_pSecFn->InitializeSecurityContext(&credentials, NULL,
|
||||
spn,
|
||||
ISC_REQ_USE_HTTP_STYLE, 0, 0,
|
||||
&chlg_desc, 0,
|
||||
digest->http_context,
|
||||
&resp_desc, &attrs, &expiry);
|
||||
spn,
|
||||
ISC_REQ_USE_HTTP_STYLE, 0, 0,
|
||||
&chlg_desc, 0,
|
||||
digest->http_context,
|
||||
&resp_desc, &attrs, &expiry);
|
||||
curlx_unicodefree(spn);
|
||||
|
||||
if(status == SEC_I_COMPLETE_NEEDED ||
|
||||
|
|
|
|||
|
|
@ -282,8 +282,8 @@ CURLcode Curl_auth_create_gssapi_security_message(struct Curl_easy *data,
|
|||
|
||||
/* Get our response size information */
|
||||
status = Curl_pSecFn->QueryContextAttributes(krb5->context,
|
||||
SECPKG_ATTR_SIZES,
|
||||
&sizes);
|
||||
SECPKG_ATTR_SIZES,
|
||||
&sizes);
|
||||
|
||||
if(status == SEC_E_INSUFFICIENT_MEMORY)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
|
|
@ -392,7 +392,7 @@ CURLcode Curl_auth_create_gssapi_security_message(struct Curl_easy *data,
|
|||
|
||||
/* Encrypt the data */
|
||||
status = Curl_pSecFn->EncryptMessage(krb5->context, KERB_WRAP_NO_ENCRYPT,
|
||||
&wrap_desc, 0);
|
||||
&wrap_desc, 0);
|
||||
if(status != SEC_E_OK) {
|
||||
free(padding);
|
||||
free(message);
|
||||
|
|
|
|||
|
|
@ -170,11 +170,11 @@ CURLcode Curl_auth_create_ntlm_type1_message(struct Curl_easy *data,
|
|||
|
||||
/* Generate our type-1 message */
|
||||
status = Curl_pSecFn->InitializeSecurityContext(ntlm->credentials, NULL,
|
||||
ntlm->spn,
|
||||
0, 0, SECURITY_NETWORK_DREP,
|
||||
NULL, 0,
|
||||
ntlm->context, &type_1_desc,
|
||||
&attrs, &expiry);
|
||||
ntlm->spn,
|
||||
0, 0, SECURITY_NETWORK_DREP,
|
||||
NULL, 0,
|
||||
ntlm->context, &type_1_desc,
|
||||
&attrs, &expiry);
|
||||
if(status == SEC_I_COMPLETE_NEEDED ||
|
||||
status == SEC_I_COMPLETE_AND_CONTINUE)
|
||||
Curl_pSecFn->CompleteAuthToken(ntlm->context, &type_1_desc);
|
||||
|
|
@ -308,13 +308,13 @@ CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data,
|
|||
|
||||
/* Generate our type-3 message */
|
||||
status = Curl_pSecFn->InitializeSecurityContext(ntlm->credentials,
|
||||
ntlm->context,
|
||||
ntlm->spn,
|
||||
0, 0, SECURITY_NETWORK_DREP,
|
||||
&type_2_desc,
|
||||
0, ntlm->context,
|
||||
&type_3_desc,
|
||||
&attrs, &expiry);
|
||||
ntlm->context,
|
||||
ntlm->spn,
|
||||
0, 0, SECURITY_NETWORK_DREP,
|
||||
&type_2_desc,
|
||||
0, ntlm->context,
|
||||
&type_3_desc,
|
||||
&attrs, &expiry);
|
||||
if(status != SEC_E_OK) {
|
||||
infof(data, "NTLM handshake failure (type-3 message): Status=%lx",
|
||||
status);
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@ CURLcode Curl_auth_decode_spnego_message(struct Curl_easy *data,
|
|||
if(nego->status == SEC_I_COMPLETE_NEEDED ||
|
||||
nego->status == SEC_I_COMPLETE_AND_CONTINUE) {
|
||||
nego->status = (DWORD)Curl_pSecFn->CompleteAuthToken(nego->context,
|
||||
&resp_desc);
|
||||
&resp_desc);
|
||||
if(GSS_ERROR(nego->status)) {
|
||||
char buffer[STRERROR_LEN];
|
||||
failf(data, "CompleteAuthToken failed: %s",
|
||||
|
|
@ -308,7 +308,7 @@ CURLcode Curl_auth_create_spnego_message(struct negotiatedata *nego,
|
|||
char **outptr, size_t *outlen)
|
||||
{
|
||||
/* Base64 encode the already generated response */
|
||||
CURLcode result = curlx_base64_encode((const char *) nego->output_token,
|
||||
CURLcode result = curlx_base64_encode((const char *)nego->output_token,
|
||||
nego->output_token_length, outptr,
|
||||
outlen);
|
||||
if(!result && (!*outptr || !*outlen)) {
|
||||
|
|
|
|||
|
|
@ -2433,9 +2433,7 @@ static CURLcode cf_connect_start(struct Curl_cfilter *cf,
|
|||
CURLcode result;
|
||||
const struct Curl_sockaddr_ex *sockaddr = NULL;
|
||||
int qfd;
|
||||
static const struct alpn_spec ALPN_SPEC_H3 = {
|
||||
{ "h3", "h3-29" }, 2
|
||||
};
|
||||
static const struct alpn_spec ALPN_SPEC_H3 = {{ "h3", "h3-29" }, 2};
|
||||
|
||||
DEBUGASSERT(ctx->initialized);
|
||||
ctx->dcid.datalen = NGTCP2_MAX_CIDLEN;
|
||||
|
|
|
|||
|
|
@ -1161,9 +1161,7 @@ static CURLcode cf_osslq_ctx_start(struct Curl_cfilter *cf,
|
|||
const struct Curl_sockaddr_ex *peer_addr = NULL;
|
||||
BIO *bio = NULL;
|
||||
BIO_ADDR *baddr = NULL;
|
||||
static const struct alpn_spec ALPN_SPEC_H3 = {
|
||||
{ "h3" }, 1
|
||||
};
|
||||
static const struct alpn_spec ALPN_SPEC_H3 = {{ "h3" }, 1};
|
||||
|
||||
DEBUGASSERT(ctx->initialized);
|
||||
|
||||
|
|
|
|||
|
|
@ -1256,9 +1256,7 @@ static CURLcode cf_quiche_ctx_open(struct Curl_cfilter *cf,
|
|||
int rv;
|
||||
CURLcode result;
|
||||
const struct Curl_sockaddr_ex *sockaddr;
|
||||
static const struct alpn_spec ALPN_SPEC_H3 = {
|
||||
{ "h3" }, 1
|
||||
};
|
||||
static const struct alpn_spec ALPN_SPEC_H3 = {{ "h3" }, 1};
|
||||
|
||||
DEBUGASSERT(ctx->q.sockfd != CURL_SOCKET_BAD);
|
||||
DEBUGASSERT(ctx->initialized);
|
||||
|
|
|
|||
2
lib/ws.c
2
lib/ws.c
|
|
@ -1876,7 +1876,7 @@ CURL_EXTERN CURLcode curl_ws_start_frame(CURL *d,
|
|||
result = ws_enc_write_head(data, ws, &ws->enc, flags, frame_len,
|
||||
&ws->sendbuf);
|
||||
if(result)
|
||||
CURL_TRC_WS(data, "curl_start_frame(), error adding frame head %d",
|
||||
CURL_TRC_WS(data, "curl_start_frame(), error adding frame head %d",
|
||||
result);
|
||||
|
||||
out:
|
||||
|
|
|
|||
|
|
@ -936,7 +936,6 @@ sub scanfile {
|
|||
my $diff = $second - $first;
|
||||
checkwarn("INDENTATION", $line, length($1), $file, $ol,
|
||||
"not indented $indent steps (uses $diff)");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ unsigned int get_terminal_columns(void)
|
|||
cols = (int)ts.ws_col;
|
||||
#elif defined(_WIN32) && !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
|
||||
{
|
||||
HANDLE stderr_hnd = GetStdHandle(STD_ERROR_HANDLE);
|
||||
HANDLE stderr_hnd = GetStdHandle(STD_ERROR_HANDLE);
|
||||
CONSOLE_SCREEN_BUFFER_INFO console_info;
|
||||
|
||||
if((stderr_hnd != INVALID_HANDLE_VALUE) &&
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ http
|
|||
--retry with a 429 response and Retry-After: and --fail
|
||||
</name>
|
||||
<command>
|
||||
http://%HOSTIP:%HTTPPORT/%TESTNUMBER --retry 1 --fail
|
||||
http://%HOSTIP:%HTTPPORT/%TESTNUMBER --retry 1 --fail
|
||||
</command>
|
||||
</client>
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ http
|
|||
--retry with a 429 response and Retry-After: and --fail-with-body
|
||||
</name>
|
||||
<command option="no-include">
|
||||
http://%HOSTIP:%HTTPPORT/%TESTNUMBER --retry 1 --fail-with-body
|
||||
http://%HOSTIP:%HTTPPORT/%TESTNUMBER --retry 1 --fail-with-body
|
||||
</command>
|
||||
</client>
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ sftp
|
|||
SFTP post-quote remove file
|
||||
</name>
|
||||
<command>
|
||||
--key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: -T %LOGDIR/file%TESTNUMBER.txt -Q "-rm %SFTP_PWD/%LOGDIR/upload.%TESTNUMBER" sftp://%HOSTIP:%SSHPORT%SFTP_PWD/%LOGDIR/upload.%TESTNUMBER --insecure
|
||||
--key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: -T %LOGDIR/file%TESTNUMBER.txt -Q "-rm %SFTP_PWD/%LOGDIR/upload.%TESTNUMBER" sftp://%HOSTIP:%SSHPORT%SFTP_PWD/%LOGDIR/upload.%TESTNUMBER --insecure
|
||||
</command>
|
||||
<file name="%LOGDIR/file%TESTNUMBER.txt">
|
||||
Dummy test file for remove test
|
||||
|
|
|
|||
|
|
@ -159,8 +159,8 @@ static CURLcode test_unit1304(const char *arg)
|
|||
* with login[0] != 0.
|
||||
*/
|
||||
free(password);
|
||||
free(login);
|
||||
password = NULL;
|
||||
free(login);
|
||||
login = NULL;
|
||||
Curl_netrc_init(&store);
|
||||
result = Curl_parsenetrc(&store,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue