mirror of
https://github.com/moparisthebest/curl
synced 2024-11-11 03:55:03 -05:00
failf: remove newline from formatting strings
... as failf adds one itself. Also: add an assert() to failf() that triggers on a newline in the format string! Closes #6365
This commit is contained in:
parent
78617b48e4
commit
aba01da639
@ -711,7 +711,7 @@ struct Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
failf(conn->data, "getaddrinfo() thread failed\n");
|
failf(conn->data, "getaddrinfo() thread failed");
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -766,7 +766,7 @@ struct Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
failf(data, "getaddrinfo() thread failed to start\n");
|
failf(data, "getaddrinfo() thread failed to start");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -340,7 +340,7 @@ static CURLcode hyperstream(struct Curl_easy *data,
|
|||||||
h->init = TRUE;
|
h->init = TRUE;
|
||||||
*didwhat = KEEP_RECV;
|
*didwhat = KEEP_RECV;
|
||||||
if(!resp) {
|
if(!resp) {
|
||||||
failf(data, "hyperstream: couldn't get response\n");
|
failf(data, "hyperstream: couldn't get response");
|
||||||
return CURLE_RECV_ERROR;
|
return CURLE_RECV_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -356,7 +356,7 @@ static CURLcode hyperstream(struct Curl_easy *data,
|
|||||||
|
|
||||||
headers = hyper_response_headers(resp);
|
headers = hyper_response_headers(resp);
|
||||||
if(!headers) {
|
if(!headers) {
|
||||||
failf(data, "hyperstream: couldn't get response headers\n");
|
failf(data, "hyperstream: couldn't get response headers");
|
||||||
result = CURLE_RECV_ERROR;
|
result = CURLE_RECV_ERROR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -369,20 +369,20 @@ static CURLcode hyperstream(struct Curl_easy *data,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(empty_header(data)) {
|
if(empty_header(data)) {
|
||||||
failf(data, "hyperstream: couldn't pass blank header\n");
|
failf(data, "hyperstream: couldn't pass blank header");
|
||||||
result = CURLE_OUT_OF_MEMORY;
|
result = CURLE_OUT_OF_MEMORY;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
resp_body = hyper_response_body(resp);
|
resp_body = hyper_response_body(resp);
|
||||||
if(!resp_body) {
|
if(!resp_body) {
|
||||||
failf(data, "hyperstream: couldn't get response body\n");
|
failf(data, "hyperstream: couldn't get response body");
|
||||||
result = CURLE_RECV_ERROR;
|
result = CURLE_RECV_ERROR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
foreach = hyper_body_foreach(resp_body, hyper_body_chunk, data);
|
foreach = hyper_body_foreach(resp_body, hyper_body_chunk, data);
|
||||||
if(!foreach) {
|
if(!foreach) {
|
||||||
failf(data, "hyperstream: body foreach failed\n");
|
failf(data, "hyperstream: body foreach failed");
|
||||||
result = CURLE_OUT_OF_MEMORY;
|
result = CURLE_OUT_OF_MEMORY;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -467,7 +467,7 @@ CURLcode Curl_hyper_header(struct Curl_easy *data, hyper_headers *headers,
|
|||||||
|
|
||||||
if(HYPERE_OK != hyper_headers_add(headers, (uint8_t *)n, nlen,
|
if(HYPERE_OK != hyper_headers_add(headers, (uint8_t *)n, nlen,
|
||||||
(uint8_t *)v, vlen)) {
|
(uint8_t *)v, vlen)) {
|
||||||
failf(data, "hyper_headers_add host\n");
|
failf(data, "hyper_headers_add host");
|
||||||
return CURLE_OUT_OF_MEMORY;
|
return CURLE_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
if(data->set.verbose) {
|
if(data->set.verbose) {
|
||||||
@ -505,7 +505,7 @@ static CURLcode request_target(struct Curl_easy *data,
|
|||||||
|
|
||||||
if(hyper_request_set_uri(req, (uint8_t *)Curl_dyn_uptr(&r),
|
if(hyper_request_set_uri(req, (uint8_t *)Curl_dyn_uptr(&r),
|
||||||
Curl_dyn_len(&r))) {
|
Curl_dyn_len(&r))) {
|
||||||
failf(data, "error setting path\n");
|
failf(data, "error setting path");
|
||||||
result = CURLE_OUT_OF_MEMORY;
|
result = CURLE_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -758,7 +758,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
|
|||||||
|
|
||||||
headers = hyper_request_headers(req);
|
headers = hyper_request_headers(req);
|
||||||
if(!headers) {
|
if(!headers) {
|
||||||
failf(data, "hyper_request_headers\n");
|
failf(data, "hyper_request_headers");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -829,7 +829,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
|
|||||||
data->req.upload_chunky = FALSE;
|
data->req.upload_chunky = FALSE;
|
||||||
sendtask = hyper_clientconn_send(client, req);
|
sendtask = hyper_clientconn_send(client, req);
|
||||||
if(!sendtask) {
|
if(!sendtask) {
|
||||||
failf(data, "hyper_clientconn_send\n");
|
failf(data, "hyper_clientconn_send");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -225,7 +225,7 @@ static CURLcode dohprobe(struct Curl_easy *data,
|
|||||||
DOHcode d = doh_encode(host, dnstype, p->dohbuffer, sizeof(p->dohbuffer),
|
DOHcode d = doh_encode(host, dnstype, p->dohbuffer, sizeof(p->dohbuffer),
|
||||||
&p->dohlen);
|
&p->dohlen);
|
||||||
if(d) {
|
if(d) {
|
||||||
failf(data, "Failed to encode DOH packet [%d]\n", d);
|
failf(data, "Failed to encode DOH packet [%d]", d);
|
||||||
return CURLE_OUT_OF_MEMORY;
|
return CURLE_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1768,7 +1768,7 @@ static CURLcode ftp_epsv_disable(struct connectdata *conn)
|
|||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
/* We can't disable EPSV when doing IPv6, so this is instead a fail */
|
/* We can't disable EPSV when doing IPv6, so this is instead a fail */
|
||||||
failf(conn->data, "Failed EPSV attempt, exiting\n");
|
failf(conn->data, "Failed EPSV attempt, exiting");
|
||||||
return CURLE_WEIRD_SERVER_REPLY;
|
return CURLE_WEIRD_SERVER_REPLY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3743,7 +3743,7 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data,
|
|||||||
k->badheader = HEADER_ALLBAD;
|
k->badheader = HEADER_ALLBAD;
|
||||||
streamclose(conn, "bad HTTP: No end-of-message indicator");
|
streamclose(conn, "bad HTTP: No end-of-message indicator");
|
||||||
if(!data->set.http09_allowed) {
|
if(!data->set.http09_allowed) {
|
||||||
failf(data, "Received HTTP/0.9 when not allowed\n");
|
failf(data, "Received HTTP/0.9 when not allowed");
|
||||||
return CURLE_UNSUPPORTED_PROTOCOL;
|
return CURLE_UNSUPPORTED_PROTOCOL;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -3778,7 +3778,7 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data,
|
|||||||
streamclose(conn, "bad HTTP: No end-of-message indicator");
|
streamclose(conn, "bad HTTP: No end-of-message indicator");
|
||||||
/* this is not the beginning of a protocol first header line */
|
/* this is not the beginning of a protocol first header line */
|
||||||
if(!data->set.http09_allowed) {
|
if(!data->set.http09_allowed) {
|
||||||
failf(data, "Received HTTP/0.9 when not allowed\n");
|
failf(data, "Received HTTP/0.9 when not allowed");
|
||||||
return CURLE_UNSUPPORTED_PROTOCOL;
|
return CURLE_UNSUPPORTED_PROTOCOL;
|
||||||
}
|
}
|
||||||
k->header = FALSE;
|
k->header = FALSE;
|
||||||
|
@ -542,7 +542,7 @@ static int push_promise(struct Curl_easy *data,
|
|||||||
|
|
||||||
stream = data->req.p.http;
|
stream = data->req.p.http;
|
||||||
if(!stream) {
|
if(!stream) {
|
||||||
failf(data, "Internal NULL stream!\n");
|
failf(data, "Internal NULL stream!");
|
||||||
(void)Curl_close(&newhandle);
|
(void)Curl_close(&newhandle);
|
||||||
rv = CURL_PUSH_DENY;
|
rv = CURL_PUSH_DENY;
|
||||||
goto fail;
|
goto fail;
|
||||||
@ -957,7 +957,7 @@ static int on_header(nghttp2_session *session, const nghttp2_frame *frame,
|
|||||||
|
|
||||||
stream = data_s->req.p.http;
|
stream = data_s->req.p.http;
|
||||||
if(!stream) {
|
if(!stream) {
|
||||||
failf(data_s, "Internal NULL stream! 5\n");
|
failf(data_s, "Internal NULL stream!");
|
||||||
return NGHTTP2_ERR_CALLBACK_FAILURE;
|
return NGHTTP2_ERR_CALLBACK_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1341,7 +1341,7 @@ static int h2_process_pending_input(struct connectdata *conn,
|
|||||||
if(rv < 0) {
|
if(rv < 0) {
|
||||||
failf(data,
|
failf(data,
|
||||||
"h2_process_pending_input: nghttp2_session_mem_recv() returned "
|
"h2_process_pending_input: nghttp2_session_mem_recv() returned "
|
||||||
"%zd:%s\n", rv, nghttp2_strerror((int)rv));
|
"%zd:%s", rv, nghttp2_strerror((int)rv));
|
||||||
*err = CURLE_RECV_ERROR;
|
*err = CURLE_RECV_ERROR;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -769,7 +769,7 @@ static CURLcode imap_perform_append(struct connectdata *conn)
|
|||||||
|
|
||||||
/* Check we know the size of the upload */
|
/* Check we know the size of the upload */
|
||||||
if(data->state.infilesize < 0) {
|
if(data->state.infilesize < 0) {
|
||||||
failf(data, "Cannot APPEND with unknown input file size\n");
|
failf(data, "Cannot APPEND with unknown input file size");
|
||||||
return CURLE_UPLOAD_FAILED;
|
return CURLE_UPLOAD_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -267,6 +267,7 @@ void Curl_infof(struct Curl_easy *data, const char *fmt, ...)
|
|||||||
|
|
||||||
void Curl_failf(struct Curl_easy *data, const char *fmt, ...)
|
void Curl_failf(struct Curl_easy *data, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
|
DEBUGASSERT(!strchr(fmt, '\n'));
|
||||||
if(data->set.verbose || data->set.errorbuffer) {
|
if(data->set.verbose || data->set.errorbuffer) {
|
||||||
va_list ap;
|
va_list ap;
|
||||||
size_t len;
|
size_t len;
|
||||||
|
@ -298,7 +298,7 @@ CURLproxycode Curl_SOCKS4(const char *proxy_user,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
hp = NULL; /* fail! */
|
hp = NULL; /* fail! */
|
||||||
failf(data, "SOCKS4 connection to %s not supported\n", buf);
|
failf(data, "SOCKS4 connection to %s not supported", buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
Curl_resolv_unlock(data, dns); /* not used anymore from now on */
|
Curl_resolv_unlock(data, dns); /* not used anymore from now on */
|
||||||
@ -319,7 +319,7 @@ CURLproxycode Curl_SOCKS4(const char *proxy_user,
|
|||||||
if(proxy_user) {
|
if(proxy_user) {
|
||||||
size_t plen = strlen(proxy_user);
|
size_t plen = strlen(proxy_user);
|
||||||
if(plen >= sizeof(sx->socksreq) - 8) {
|
if(plen >= sizeof(sx->socksreq) - 8) {
|
||||||
failf(data, "Too long SOCKS proxy user name, can't use!\n");
|
failf(data, "Too long SOCKS proxy user name, can't use!");
|
||||||
return CURLPX_LONG_USER;
|
return CURLPX_LONG_USER;
|
||||||
}
|
}
|
||||||
/* copy the proxy name WITH trailing zero */
|
/* copy the proxy name WITH trailing zero */
|
||||||
@ -839,7 +839,7 @@ CURLproxycode Curl_SOCKS5(const char *proxy_user,
|
|||||||
#endif
|
#endif
|
||||||
else {
|
else {
|
||||||
hp = NULL; /* fail! */
|
hp = NULL; /* fail! */
|
||||||
failf(data, "SOCKS5 connection to %s not supported\n", dest);
|
failf(data, "SOCKS5 connection to %s not supported", dest);
|
||||||
}
|
}
|
||||||
|
|
||||||
Curl_resolv_unlock(data, dns); /* not used anymore from now on */
|
Curl_resolv_unlock(data, dns); /* not used anymore from now on */
|
||||||
|
@ -92,7 +92,7 @@ static int check_gss_err(struct Curl_easy *data,
|
|||||||
}
|
}
|
||||||
gss_release_buffer(&min_stat, &status_string);
|
gss_release_buffer(&min_stat, &status_string);
|
||||||
}
|
}
|
||||||
failf(data, "GSS-API error: %s failed:\n%s", function, buf);
|
failf(data, "GSS-API error: %s failed: %s", function, buf);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -493,7 +493,7 @@ static CURLcode tftp_send_first(struct tftp_state_data *state,
|
|||||||
return result;
|
return result;
|
||||||
|
|
||||||
if(strlen(filename) > (state->blksize - strlen(mode) - 4)) {
|
if(strlen(filename) > (state->blksize - strlen(mode) - 4)) {
|
||||||
failf(data, "TFTP file name too long\n");
|
failf(data, "TFTP file name too long");
|
||||||
free(filename);
|
free(filename);
|
||||||
return CURLE_TFTP_ILLEGAL; /* too long file name field */
|
return CURLE_TFTP_ILLEGAL; /* too long file name field */
|
||||||
}
|
}
|
||||||
|
@ -1550,7 +1550,7 @@ CURLcode Curl_idnconvert_hostname(struct connectdata *conn,
|
|||||||
host->name = host->encalloc;
|
host->name = host->encalloc;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
failf(data, "Failed to convert %s to ACE; %s\n", host->name,
|
failf(data, "Failed to convert %s to ACE; %s", host->name,
|
||||||
idn2_strerror(rc));
|
idn2_strerror(rc));
|
||||||
return CURLE_URL_MALFORMAT;
|
return CURLE_URL_MALFORMAT;
|
||||||
}
|
}
|
||||||
@ -1565,7 +1565,7 @@ CURLcode Curl_idnconvert_hostname(struct connectdata *conn,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
char buffer[STRERROR_LEN];
|
char buffer[STRERROR_LEN];
|
||||||
failf(data, "Failed to convert %s to ACE; %s\n", host->name,
|
failf(data, "Failed to convert %s to ACE; %s", host->name,
|
||||||
Curl_winapi_strerror(GetLastError(), buffer, sizeof(buffer)));
|
Curl_winapi_strerror(GetLastError(), buffer, sizeof(buffer)));
|
||||||
return CURLE_URL_MALFORMAT;
|
return CURLE_URL_MALFORMAT;
|
||||||
}
|
}
|
||||||
|
@ -135,7 +135,7 @@ CURLcode Curl_auth_create_digest_md5_message(struct Curl_easy *data,
|
|||||||
if(status != SEC_E_OK) {
|
if(status != SEC_E_OK) {
|
||||||
free(input_token);
|
free(input_token);
|
||||||
|
|
||||||
failf(data, "SSPI: couldn't get auth info\n");
|
failf(data, "SSPI: couldn't get auth info");
|
||||||
return CURLE_AUTH_ERROR;
|
return CURLE_AUTH_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -439,7 +439,7 @@ CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data,
|
|||||||
status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT(SP_NAME_DIGEST),
|
status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT(SP_NAME_DIGEST),
|
||||||
&SecurityPackage);
|
&SecurityPackage);
|
||||||
if(status != SEC_E_OK) {
|
if(status != SEC_E_OK) {
|
||||||
failf(data, "SSPI: couldn't get auth info\n");
|
failf(data, "SSPI: couldn't get auth info");
|
||||||
return CURLE_AUTH_ERROR;
|
return CURLE_AUTH_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ CURLcode Curl_auth_create_gssapi_user_message(struct Curl_easy *data,
|
|||||||
TEXT(SP_NAME_KERBEROS),
|
TEXT(SP_NAME_KERBEROS),
|
||||||
&SecurityPackage);
|
&SecurityPackage);
|
||||||
if(status != SEC_E_OK) {
|
if(status != SEC_E_OK) {
|
||||||
failf(data, "SSPI: couldn't get auth info\n");
|
failf(data, "SSPI: couldn't get auth info");
|
||||||
return CURLE_AUTH_ERROR;
|
return CURLE_AUTH_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ CURLcode Curl_auth_create_ntlm_type1_message(struct Curl_easy *data,
|
|||||||
status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT(SP_NAME_NTLM),
|
status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT(SP_NAME_NTLM),
|
||||||
&SecurityPackage);
|
&SecurityPackage);
|
||||||
if(status != SEC_E_OK) {
|
if(status != SEC_E_OK) {
|
||||||
failf(data, "SSPI: couldn't get auth info\n");
|
failf(data, "SSPI: couldn't get auth info");
|
||||||
return CURLE_AUTH_ERROR;
|
return CURLE_AUTH_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ CURLcode Curl_auth_decode_spnego_message(struct Curl_easy *data,
|
|||||||
TEXT(SP_NAME_NEGOTIATE),
|
TEXT(SP_NAME_NEGOTIATE),
|
||||||
&SecurityPackage);
|
&SecurityPackage);
|
||||||
if(nego->status != SEC_E_OK) {
|
if(nego->status != SEC_E_OK) {
|
||||||
failf(data, "SSPI: couldn't get auth info\n");
|
failf(data, "SSPI: couldn't get auth info");
|
||||||
return CURLE_AUTH_ERROR;
|
return CURLE_AUTH_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -587,7 +587,7 @@ static int cb_recv_stream_data(ngtcp2_conn *tconn, uint32_t flags,
|
|||||||
nconsumed =
|
nconsumed =
|
||||||
nghttp3_conn_read_stream(qs->h3conn, stream_id, buf, buflen, fin);
|
nghttp3_conn_read_stream(qs->h3conn, stream_id, buf, buflen, fin);
|
||||||
if(nconsumed < 0) {
|
if(nconsumed < 0) {
|
||||||
failf(qs->conn->data, "nghttp3_conn_read_stream returned error: %s\n",
|
failf(qs->conn->data, "nghttp3_conn_read_stream returned error: %s",
|
||||||
nghttp3_strerror((int)nconsumed));
|
nghttp3_strerror((int)nconsumed));
|
||||||
return NGTCP2_ERR_CALLBACK_FAILURE;
|
return NGTCP2_ERR_CALLBACK_FAILURE;
|
||||||
}
|
}
|
||||||
@ -616,7 +616,7 @@ cb_acked_stream_data_offset(ngtcp2_conn *tconn, int64_t stream_id,
|
|||||||
|
|
||||||
rv = nghttp3_conn_add_ack_offset(qs->h3conn, stream_id, datalen);
|
rv = nghttp3_conn_add_ack_offset(qs->h3conn, stream_id, datalen);
|
||||||
if(rv != 0) {
|
if(rv != 0) {
|
||||||
failf(qs->conn->data, "nghttp3_conn_add_ack_offset returned error: %s\n",
|
failf(qs->conn->data, "nghttp3_conn_add_ack_offset returned error: %s",
|
||||||
nghttp3_strerror(rv));
|
nghttp3_strerror(rv));
|
||||||
return NGTCP2_ERR_CALLBACK_FAILURE;
|
return NGTCP2_ERR_CALLBACK_FAILURE;
|
||||||
}
|
}
|
||||||
@ -637,7 +637,7 @@ static int cb_stream_close(ngtcp2_conn *tconn, int64_t stream_id,
|
|||||||
rv = nghttp3_conn_close_stream(qs->h3conn, stream_id,
|
rv = nghttp3_conn_close_stream(qs->h3conn, stream_id,
|
||||||
app_error_code);
|
app_error_code);
|
||||||
if(rv != 0) {
|
if(rv != 0) {
|
||||||
failf(qs->conn->data, "nghttp3_conn_close_stream returned error: %s\n",
|
failf(qs->conn->data, "nghttp3_conn_close_stream returned error: %s",
|
||||||
nghttp3_strerror(rv));
|
nghttp3_strerror(rv));
|
||||||
return NGTCP2_ERR_CALLBACK_FAILURE;
|
return NGTCP2_ERR_CALLBACK_FAILURE;
|
||||||
}
|
}
|
||||||
@ -658,7 +658,7 @@ static int cb_stream_reset(ngtcp2_conn *tconn, int64_t stream_id,
|
|||||||
|
|
||||||
rv = nghttp3_conn_reset_stream(qs->h3conn, stream_id);
|
rv = nghttp3_conn_reset_stream(qs->h3conn, stream_id);
|
||||||
if(rv != 0) {
|
if(rv != 0) {
|
||||||
failf(qs->conn->data, "nghttp3_conn_reset_stream returned error: %s\n",
|
failf(qs->conn->data, "nghttp3_conn_reset_stream returned error: %s",
|
||||||
nghttp3_strerror(rv));
|
nghttp3_strerror(rv));
|
||||||
return NGTCP2_ERR_CALLBACK_FAILURE;
|
return NGTCP2_ERR_CALLBACK_FAILURE;
|
||||||
}
|
}
|
||||||
@ -689,7 +689,7 @@ static int cb_extend_max_stream_data(ngtcp2_conn *tconn, int64_t stream_id,
|
|||||||
|
|
||||||
rv = nghttp3_conn_unblock_stream(qs->h3conn, stream_id);
|
rv = nghttp3_conn_unblock_stream(qs->h3conn, stream_id);
|
||||||
if(rv != 0) {
|
if(rv != 0) {
|
||||||
failf(qs->conn->data, "nghttp3_conn_unblock_stream returned error: %s\n",
|
failf(qs->conn->data, "nghttp3_conn_unblock_stream returned error: %s",
|
||||||
nghttp3_strerror(rv));
|
nghttp3_strerror(rv));
|
||||||
return NGTCP2_ERR_CALLBACK_FAILURE;
|
return NGTCP2_ERR_CALLBACK_FAILURE;
|
||||||
}
|
}
|
||||||
@ -1783,7 +1783,7 @@ static CURLcode ng_flush_egress(struct connectdata *conn, int sockfd,
|
|||||||
|
|
||||||
rv = ngtcp2_conn_handle_expiry(qs->qconn, ts);
|
rv = ngtcp2_conn_handle_expiry(qs->qconn, ts);
|
||||||
if(rv != 0) {
|
if(rv != 0) {
|
||||||
failf(conn->data, "ngtcp2_conn_handle_expiry returned error: %s\n",
|
failf(conn->data, "ngtcp2_conn_handle_expiry returned error: %s",
|
||||||
ngtcp2_strerror(rv));
|
ngtcp2_strerror(rv));
|
||||||
return CURLE_SEND_ERROR;
|
return CURLE_SEND_ERROR;
|
||||||
}
|
}
|
||||||
@ -1796,7 +1796,7 @@ static CURLcode ng_flush_egress(struct connectdata *conn, int sockfd,
|
|||||||
veccnt = nghttp3_conn_writev_stream(qs->h3conn, &stream_id, &fin, vec,
|
veccnt = nghttp3_conn_writev_stream(qs->h3conn, &stream_id, &fin, vec,
|
||||||
sizeof(vec) / sizeof(vec[0]));
|
sizeof(vec) / sizeof(vec[0]));
|
||||||
if(veccnt < 0) {
|
if(veccnt < 0) {
|
||||||
failf(conn->data, "nghttp3_conn_writev_stream returned error: %s\n",
|
failf(conn->data, "nghttp3_conn_writev_stream returned error: %s",
|
||||||
nghttp3_strerror((int)veccnt));
|
nghttp3_strerror((int)veccnt));
|
||||||
return CURLE_SEND_ERROR;
|
return CURLE_SEND_ERROR;
|
||||||
}
|
}
|
||||||
@ -1838,7 +1838,7 @@ static CURLcode ng_flush_egress(struct connectdata *conn, int sockfd,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
assert(ndatalen == -1);
|
assert(ndatalen == -1);
|
||||||
failf(conn->data, "ngtcp2_conn_writev_stream returned error: %s\n",
|
failf(conn->data, "ngtcp2_conn_writev_stream returned error: %s",
|
||||||
ngtcp2_strerror((int)outlen));
|
ngtcp2_strerror((int)outlen));
|
||||||
return CURLE_SEND_ERROR;
|
return CURLE_SEND_ERROR;
|
||||||
}
|
}
|
||||||
@ -1852,7 +1852,7 @@ static CURLcode ng_flush_egress(struct connectdata *conn, int sockfd,
|
|||||||
outlen = ngtcp2_conn_write_pkt(qs->qconn, &ps.path, NULL,
|
outlen = ngtcp2_conn_write_pkt(qs->qconn, &ps.path, NULL,
|
||||||
out, pktlen, ts);
|
out, pktlen, ts);
|
||||||
if(outlen < 0) {
|
if(outlen < 0) {
|
||||||
failf(conn->data, "ngtcp2_conn_write_pkt returned error: %s\n",
|
failf(conn->data, "ngtcp2_conn_write_pkt returned error: %s",
|
||||||
ngtcp2_strerror((int)outlen));
|
ngtcp2_strerror((int)outlen));
|
||||||
return CURLE_SEND_ERROR;
|
return CURLE_SEND_ERROR;
|
||||||
}
|
}
|
||||||
@ -1871,7 +1871,7 @@ static CURLcode ng_flush_egress(struct connectdata *conn, int sockfd,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
failf(conn->data, "send() returned %zd (errno %d)\n", sent,
|
failf(conn->data, "send() returned %zd (errno %d)", sent,
|
||||||
SOCKERRNO);
|
SOCKERRNO);
|
||||||
return CURLE_SEND_ERROR;
|
return CURLE_SEND_ERROR;
|
||||||
}
|
}
|
||||||
|
@ -399,14 +399,14 @@ static CURLcode flush_egress(struct connectdata *conn, int sockfd,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
if(sent < 0) {
|
if(sent < 0) {
|
||||||
failf(conn->data, "quiche_conn_send returned %zd\n",
|
failf(conn->data, "quiche_conn_send returned %zd",
|
||||||
sent);
|
sent);
|
||||||
return CURLE_SEND_ERROR;
|
return CURLE_SEND_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
sent = send(sockfd, out, sent, 0);
|
sent = send(sockfd, out, sent, 0);
|
||||||
if(sent < 0) {
|
if(sent < 0) {
|
||||||
failf(conn->data, "send() returned %zd\n", sent);
|
failf(conn->data, "send() returned %zd", sent);
|
||||||
return CURLE_SEND_ERROR;
|
return CURLE_SEND_ERROR;
|
||||||
}
|
}
|
||||||
} while(1);
|
} while(1);
|
||||||
|
@ -763,10 +763,10 @@ static CURLcode ssh_force_knownhost_key_type(struct connectdata *conn)
|
|||||||
hostkey_method = hostkey_method_ssh_dss;
|
hostkey_method = hostkey_method_ssh_dss;
|
||||||
break;
|
break;
|
||||||
case LIBSSH2_KNOWNHOST_KEY_RSA1:
|
case LIBSSH2_KNOWNHOST_KEY_RSA1:
|
||||||
failf(data, "Found host key type RSA1 which is not supported\n");
|
failf(data, "Found host key type RSA1 which is not supported");
|
||||||
return CURLE_SSH;
|
return CURLE_SSH;
|
||||||
default:
|
default:
|
||||||
failf(data, "Unknown host key type: %i\n",
|
failf(data, "Unknown host key type: %i",
|
||||||
(store->typemask & LIBSSH2_KNOWNHOST_KEY_MASK));
|
(store->typemask & LIBSSH2_KNOWNHOST_KEY_MASK));
|
||||||
return CURLE_SSH;
|
return CURLE_SSH;
|
||||||
}
|
}
|
||||||
|
@ -262,7 +262,7 @@ static ssize_t wsftp_send(struct connectdata *conn, int sockindex,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if(rc < 0) {
|
if(rc < 0) {
|
||||||
failf(conn->data, "wolfSSH_SFTP_SendWritePacket returned %d\n", rc);
|
failf(conn->data, "wolfSSH_SFTP_SendWritePacket returned %d", rc);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
DEBUGASSERT(rc == (int)len);
|
DEBUGASSERT(rc == (int)len);
|
||||||
@ -307,7 +307,7 @@ static ssize_t wsftp_recv(struct connectdata *conn, int sockindex,
|
|||||||
DEBUGASSERT(rc <= (int)len);
|
DEBUGASSERT(rc <= (int)len);
|
||||||
|
|
||||||
if(rc < 0) {
|
if(rc < 0) {
|
||||||
failf(conn->data, "wolfSSH_SFTP_SendReadPacket returned %d\n", rc);
|
failf(conn->data, "wolfSSH_SFTP_SendReadPacket returned %d", rc);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
sshc->offset += len;
|
sshc->offset += len;
|
||||||
|
@ -349,8 +349,8 @@ static CURLcode bearssl_connect_step1(struct connectdata *conn, int sockindex)
|
|||||||
ret = load_cafile(ssl_cafile, &backend->anchors, &backend->anchors_len);
|
ret = load_cafile(ssl_cafile, &backend->anchors, &backend->anchors_len);
|
||||||
if(ret != CURLE_OK) {
|
if(ret != CURLE_OK) {
|
||||||
if(verifypeer) {
|
if(verifypeer) {
|
||||||
failf(data, "error setting certificate verify locations:\n"
|
failf(data, "error setting certificate verify locations."
|
||||||
" CAfile: %s\n", ssl_cafile);
|
" CAfile: %s", ssl_cafile);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
infof(data, "error setting certificate verify locations,"
|
infof(data, "error setting certificate verify locations,"
|
||||||
|
@ -280,7 +280,7 @@ mbed_connect_step1(struct connectdata *conn,
|
|||||||
#ifdef MBEDTLS_ERROR_C
|
#ifdef MBEDTLS_ERROR_C
|
||||||
mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
|
mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
|
||||||
#endif /* MBEDTLS_ERROR_C */
|
#endif /* MBEDTLS_ERROR_C */
|
||||||
failf(data, "Failed - mbedTLS: ctr_drbg_init returned (-0x%04X) %s\n",
|
failf(data, "Failed - mbedTLS: ctr_drbg_init returned (-0x%04X) %s",
|
||||||
-ret, errorbuf);
|
-ret, errorbuf);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@ -293,7 +293,7 @@ mbed_connect_step1(struct connectdata *conn,
|
|||||||
#ifdef MBEDTLS_ERROR_C
|
#ifdef MBEDTLS_ERROR_C
|
||||||
mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
|
mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
|
||||||
#endif /* MBEDTLS_ERROR_C */
|
#endif /* MBEDTLS_ERROR_C */
|
||||||
failf(data, "Failed - mbedTLS: ctr_drbg_init returned (-0x%04X) %s\n",
|
failf(data, "Failed - mbedTLS: ctr_drbg_init returned (-0x%04X) %s",
|
||||||
-ret, errorbuf);
|
-ret, errorbuf);
|
||||||
}
|
}
|
||||||
#endif /* THREADING_SUPPORT */
|
#endif /* THREADING_SUPPORT */
|
||||||
@ -868,7 +868,7 @@ static CURLcode Curl_mbedtls_random(struct Curl_easy *data,
|
|||||||
#ifdef MBEDTLS_ERROR_C
|
#ifdef MBEDTLS_ERROR_C
|
||||||
mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
|
mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
|
||||||
#endif /* MBEDTLS_ERROR_C */
|
#endif /* MBEDTLS_ERROR_C */
|
||||||
failf(data, "Failed - mbedTLS: ctr_drbg_seed returned (-0x%04X) %s\n",
|
failf(data, "Failed - mbedTLS: ctr_drbg_seed returned (-0x%04X) %s",
|
||||||
-ret, errorbuf);
|
-ret, errorbuf);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -878,7 +878,7 @@ static CURLcode Curl_mbedtls_random(struct Curl_easy *data,
|
|||||||
#ifdef MBEDTLS_ERROR_C
|
#ifdef MBEDTLS_ERROR_C
|
||||||
mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
|
mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
|
||||||
#endif /* MBEDTLS_ERROR_C */
|
#endif /* MBEDTLS_ERROR_C */
|
||||||
failf(data, "mbedTLS: ctr_drbg_init returned (-0x%04X) %s\n",
|
failf(data, "mbedTLS: ctr_drbg_init returned (-0x%04X) %s",
|
||||||
-ret, errorbuf);
|
-ret, errorbuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1289,7 +1289,7 @@ static CURLcode Curl_ossl_set_engine(struct Curl_easy *data,
|
|||||||
char buf[256];
|
char buf[256];
|
||||||
|
|
||||||
ENGINE_free(e);
|
ENGINE_free(e);
|
||||||
failf(data, "Failed to initialise SSL Engine '%s':\n%s",
|
failf(data, "Failed to initialise SSL Engine '%s': %s",
|
||||||
engine, ossl_strerror(ERR_get_error(), buf, sizeof(buf)));
|
engine, ossl_strerror(ERR_get_error(), buf, sizeof(buf)));
|
||||||
return CURLE_SSL_ENGINE_INITFAILED;
|
return CURLE_SSL_ENGINE_INITFAILED;
|
||||||
}
|
}
|
||||||
|
@ -608,7 +608,7 @@ wolfssl_connect_step2(struct connectdata *conn,
|
|||||||
* as also mismatching CN fields */
|
* as also mismatching CN fields */
|
||||||
else if(DOMAIN_NAME_MISMATCH == detail) {
|
else if(DOMAIN_NAME_MISMATCH == detail) {
|
||||||
#if 1
|
#if 1
|
||||||
failf(data, "\tsubject alt name(s) or common name do not match \"%s\"\n",
|
failf(data, "\tsubject alt name(s) or common name do not match \"%s\"",
|
||||||
dispname);
|
dispname);
|
||||||
return CURLE_PEER_FAILED_VERIFICATION;
|
return CURLE_PEER_FAILED_VERIFICATION;
|
||||||
#else
|
#else
|
||||||
@ -635,7 +635,7 @@ wolfssl_connect_step2(struct connectdata *conn,
|
|||||||
#if LIBWOLFSSL_VERSION_HEX >= 0x02007000 /* 2.7.0 */
|
#if LIBWOLFSSL_VERSION_HEX >= 0x02007000 /* 2.7.0 */
|
||||||
else if(ASN_NO_SIGNER_E == detail) {
|
else if(ASN_NO_SIGNER_E == detail) {
|
||||||
if(SSL_CONN_CONFIG(verifypeer)) {
|
if(SSL_CONN_CONFIG(verifypeer)) {
|
||||||
failf(data, "\tCA signer not available for verification\n");
|
failf(data, "\tCA signer not available for verification");
|
||||||
return CURLE_SSL_CACERT_BADFILE;
|
return CURLE_SSL_CACERT_BADFILE;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user