mirror of
https://github.com/curl/curl.git
synced 2026-08-24 11:23:31 +03:00
code: language cleanup in comments
Based on the standards and guidelines we use for our documentation. - expand contractions (they're => they are etc) - host name = > hostname - file name => filename - user name = username - man page => manpage - run-time => runtime - set-up => setup - back-end => backend - a HTTP => an HTTP - Two spaces after a period => one space after period Closes #14073
This commit is contained in:
parent
9b683577e1
commit
c074ba64a8
213 changed files with 1719 additions and 1715 deletions
|
|
@ -100,11 +100,11 @@ CURLcode Curl_auth_create_plain_message(const char *authzid,
|
|||
* Curl_auth_create_login_message()
|
||||
*
|
||||
* This is used to generate an already encoded LOGIN message containing the
|
||||
* user name or password ready for sending to the recipient.
|
||||
* username or password ready for sending to the recipient.
|
||||
*
|
||||
* Parameters:
|
||||
*
|
||||
* valuep [in] - The user name or user's password.
|
||||
* valuep [in] - The username or user's password.
|
||||
* out [out] - The result storage.
|
||||
*
|
||||
* Returns void.
|
||||
|
|
@ -118,11 +118,11 @@ void Curl_auth_create_login_message(const char *valuep, struct bufref *out)
|
|||
* Curl_auth_create_external_message()
|
||||
*
|
||||
* This is used to generate an already encoded EXTERNAL message containing
|
||||
* the user name ready for sending to the recipient.
|
||||
* the username ready for sending to the recipient.
|
||||
*
|
||||
* Parameters:
|
||||
*
|
||||
* user [in] - The user name.
|
||||
* user [in] - The username.
|
||||
* out [out] - The result storage.
|
||||
*
|
||||
* Returns void.
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
* Parameters:
|
||||
*
|
||||
* chlg [in] - The challenge.
|
||||
* userp [in] - The user name.
|
||||
* userp [in] - The username.
|
||||
* passwdp [in] - The user's password.
|
||||
* out [out] - The result storage.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ bool Curl_auth_digest_get_pair(const char *str, char *value, char *content,
|
|||
|
||||
case ',':
|
||||
if(!starts_with_quote) {
|
||||
/* This signals the end of the content if we didn't get a starting
|
||||
/* This signals the end of the content if we did not get a starting
|
||||
quote and then we do "sloppy" parsing */
|
||||
c = 0; /* the end */
|
||||
continue;
|
||||
|
|
@ -326,7 +326,7 @@ bool Curl_auth_is_digest_supported(void)
|
|||
*
|
||||
* data [in] - The session handle.
|
||||
* chlg [in] - The challenge message.
|
||||
* userp [in] - The user name.
|
||||
* userp [in] - The username.
|
||||
* passwdp [in] - The user's password.
|
||||
* service [in] - The service type such as http, smtp, pop or imap.
|
||||
* out [out] - The result storage.
|
||||
|
|
@ -629,7 +629,7 @@ CURLcode Curl_auth_decode_digest_http_message(const char *chlg,
|
|||
}
|
||||
}
|
||||
else
|
||||
break; /* We're done here */
|
||||
break; /* We are done here */
|
||||
|
||||
/* Pass all additional spaces here */
|
||||
while(*chlg && ISBLANK(*chlg))
|
||||
|
|
@ -646,7 +646,7 @@ CURLcode Curl_auth_decode_digest_http_message(const char *chlg,
|
|||
if(before && !digest->stale)
|
||||
return CURLE_BAD_CONTENT_ENCODING;
|
||||
|
||||
/* We got this header without a nonce, that's a bad Digest line! */
|
||||
/* We got this header without a nonce, that is a bad Digest line! */
|
||||
if(!digest->nonce)
|
||||
return CURLE_BAD_CONTENT_ENCODING;
|
||||
|
||||
|
|
@ -666,7 +666,7 @@ CURLcode Curl_auth_decode_digest_http_message(const char *chlg,
|
|||
* Parameters:
|
||||
*
|
||||
* data [in] - The session handle.
|
||||
* userp [in] - The user name.
|
||||
* userp [in] - The username.
|
||||
* passwdp [in] - The user's password.
|
||||
* request [in] - The HTTP request.
|
||||
* uripath [in] - The path of the HTTP uri.
|
||||
|
|
@ -788,7 +788,7 @@ static CURLcode auth_create_digest_http_message(
|
|||
return CURLE_OUT_OF_MEMORY;
|
||||
|
||||
if(digest->qop && strcasecompare(digest->qop, "auth-int")) {
|
||||
/* We don't support auth-int for PUT or POST */
|
||||
/* We do not support auth-int for PUT or POST */
|
||||
char hashed[65];
|
||||
char *hashthis2;
|
||||
|
||||
|
|
@ -835,12 +835,12 @@ static CURLcode auth_create_digest_http_message(
|
|||
Authorization: Digest username="testuser", realm="testrealm", \
|
||||
nonce="1053604145", uri="/64", response="c55f7f30d83d774a3d2dcacf725abaca"
|
||||
|
||||
Digest parameters are all quoted strings. Username which is provided by
|
||||
Digest parameters are all quoted strings. Username which is provided by
|
||||
the user will need double quotes and backslashes within it escaped.
|
||||
realm, nonce, and opaque will need backslashes as well as they were
|
||||
de-escaped when copied from request header. cnonce is generated with
|
||||
web-safe characters. uri is already percent encoded. nc is 8 hex
|
||||
characters. algorithm and qop with standard values only contain web-safe
|
||||
de-escaped when copied from request header. cnonce is generated with
|
||||
web-safe characters. uri is already percent encoded. nc is 8 hex
|
||||
characters. algorithm and qop with standard values only contain web-safe
|
||||
characters.
|
||||
*/
|
||||
userp_quoted = auth_digest_string_quoted(digest->userhash ? userh : userp);
|
||||
|
|
@ -957,7 +957,7 @@ static CURLcode auth_create_digest_http_message(
|
|||
* Parameters:
|
||||
*
|
||||
* data [in] - The session handle.
|
||||
* userp [in] - The user name.
|
||||
* userp [in] - The username.
|
||||
* passwdp [in] - The user's password.
|
||||
* request [in] - The HTTP request.
|
||||
* uripath [in] - The path of the HTTP uri.
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ bool Curl_auth_is_digest_supported(void)
|
|||
*
|
||||
* data [in] - The session handle.
|
||||
* chlg [in] - The challenge message.
|
||||
* userp [in] - The user name in the format User or Domain\User.
|
||||
* userp [in] - The username in the format User or Domain\User.
|
||||
* passwdp [in] - The user's password.
|
||||
* service [in] - The service type such as http, smtp, pop or imap.
|
||||
* out [out] - The result storage.
|
||||
|
|
@ -122,7 +122,7 @@ CURLcode Curl_auth_create_digest_md5_message(struct Curl_easy *data,
|
|||
status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT(SP_NAME_DIGEST),
|
||||
&SecurityPackage);
|
||||
if(status != SEC_E_OK) {
|
||||
failf(data, "SSPI: couldn't get auth info");
|
||||
failf(data, "SSPI: could not get auth info");
|
||||
return CURLE_AUTH_ERROR;
|
||||
}
|
||||
|
||||
|
|
@ -291,7 +291,7 @@ CURLcode Curl_override_sspi_http_realm(const char *chlg,
|
|||
}
|
||||
}
|
||||
else
|
||||
break; /* We're done here */
|
||||
break; /* We are done here */
|
||||
|
||||
/* Pass all additional spaces here */
|
||||
while(*chlg && ISBLANK(*chlg))
|
||||
|
|
@ -324,8 +324,8 @@ CURLcode Curl_auth_decode_digest_http_message(const char *chlg,
|
|||
{
|
||||
size_t chlglen = strlen(chlg);
|
||||
|
||||
/* We had an input token before so if there's another one now that means we
|
||||
provided bad credentials in the previous request or it's stale. */
|
||||
/* We had an input token before so if there is another one now that means we
|
||||
provided bad credentials in the previous request or it is stale. */
|
||||
if(digest->input_token) {
|
||||
bool stale = false;
|
||||
const char *p = chlg;
|
||||
|
|
@ -379,7 +379,7 @@ CURLcode Curl_auth_decode_digest_http_message(const char *chlg,
|
|||
* Parameters:
|
||||
*
|
||||
* data [in] - The session handle.
|
||||
* userp [in] - The user name in the format User or Domain\User.
|
||||
* userp [in] - The username in the format User or Domain\User.
|
||||
* passwdp [in] - The user's password.
|
||||
* request [in] - The HTTP request.
|
||||
* uripath [in] - The path of the HTTP uri.
|
||||
|
|
@ -413,7 +413,7 @@ CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data,
|
|||
status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT(SP_NAME_DIGEST),
|
||||
&SecurityPackage);
|
||||
if(status != SEC_E_OK) {
|
||||
failf(data, "SSPI: couldn't get auth info");
|
||||
failf(data, "SSPI: could not get auth info");
|
||||
return CURLE_AUTH_ERROR;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,10 +65,10 @@ bool Curl_auth_is_gssapi_supported(void)
|
|||
* Parameters:
|
||||
*
|
||||
* data [in] - The session handle.
|
||||
* userp [in] - The user name.
|
||||
* userp [in] - The username.
|
||||
* passwdp [in] - The user's password.
|
||||
* service [in] - The service type such as http, smtp, pop or imap.
|
||||
* host [in[ - The host name.
|
||||
* host [in[ - The hostname.
|
||||
* mutual_auth [in] - Flag specifying whether or not mutual authentication
|
||||
* is enabled.
|
||||
* chlg [in] - Optional challenge message.
|
||||
|
|
@ -243,7 +243,7 @@ CURLcode Curl_auth_create_gssapi_security_message(struct Curl_easy *data,
|
|||
/* Process the maximum message size the server can receive */
|
||||
if(max_size > 0) {
|
||||
/* The server has told us it supports a maximum receive buffer, however, as
|
||||
we don't require one unless we are encrypting data, we tell the server
|
||||
we do not require one unless we are encrypting data, we tell the server
|
||||
our receive buffer is zero. */
|
||||
max_size = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,10 +76,10 @@ bool Curl_auth_is_gssapi_supported(void)
|
|||
* Parameters:
|
||||
*
|
||||
* data [in] - The session handle.
|
||||
* userp [in] - The user name in the format User or Domain\User.
|
||||
* userp [in] - The username in the format User or Domain\User.
|
||||
* passwdp [in] - The user's password.
|
||||
* service [in] - The service type such as http, smtp, pop or imap.
|
||||
* host [in] - The host name.
|
||||
* host [in] - The hostname.
|
||||
* mutual_auth [in] - Flag specifying whether or not mutual authentication
|
||||
* is enabled.
|
||||
* chlg [in] - Optional challenge message.
|
||||
|
|
@ -122,7 +122,7 @@ CURLcode Curl_auth_create_gssapi_user_message(struct Curl_easy *data,
|
|||
TEXT(SP_NAME_KERBEROS),
|
||||
&SecurityPackage);
|
||||
if(status != SEC_E_OK) {
|
||||
failf(data, "SSPI: couldn't get auth info");
|
||||
failf(data, "SSPI: could not get auth info");
|
||||
return CURLE_AUTH_ERROR;
|
||||
}
|
||||
|
||||
|
|
@ -335,7 +335,7 @@ CURLcode Curl_auth_create_gssapi_security_message(struct Curl_easy *data,
|
|||
/* Process the maximum message size the server can receive */
|
||||
if(max_size > 0) {
|
||||
/* The server has told us it supports a maximum receive buffer, however, as
|
||||
we don't require one unless we are encrypting data, we tell the server
|
||||
we do not require one unless we are encrypting data, we tell the server
|
||||
our receive buffer is zero. */
|
||||
max_size = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
/* "NTLMSSP" signature is always in ASCII regardless of the platform */
|
||||
#define NTLMSSP_SIGNATURE "\x4e\x54\x4c\x4d\x53\x53\x50"
|
||||
|
||||
/* The fixed host name we provide, in order to not leak our real local host
|
||||
/* The fixed hostname we provide, in order to not leak our real local host
|
||||
name. Copy the name used by Firefox. */
|
||||
#define NTLM_HOSTNAME "WORKSTATION"
|
||||
|
||||
|
|
@ -325,10 +325,10 @@ static void unicodecpy(unsigned char *dest, const char *src, size_t length)
|
|||
* Parameters:
|
||||
*
|
||||
* data [in] - The session handle.
|
||||
* userp [in] - The user name in the format User or Domain\User.
|
||||
* userp [in] - The username in the format User or Domain\User.
|
||||
* passwdp [in] - The user's password.
|
||||
* service [in] - The service type such as http, smtp, pop or imap.
|
||||
* host [in] - The host name.
|
||||
* host [in] - The hostname.
|
||||
* ntlm [in/out] - The NTLM data struct being used and modified.
|
||||
* out [out] - The result storage.
|
||||
*
|
||||
|
|
@ -384,9 +384,9 @@ CURLcode Curl_auth_create_ntlm_type1_message(struct Curl_easy *data,
|
|||
"%c%c" /* 2 zeroes */
|
||||
"%c%c" /* host length */
|
||||
"%c%c" /* host allocated space */
|
||||
"%c%c" /* host name offset */
|
||||
"%c%c" /* hostname offset */
|
||||
"%c%c" /* 2 zeroes */
|
||||
"%s" /* host name */
|
||||
"%s" /* hostname */
|
||||
"%s", /* domain string */
|
||||
0, /* trailing zero */
|
||||
0, 0, 0, /* part of type-1 long */
|
||||
|
|
@ -448,7 +448,7 @@ CURLcode Curl_auth_create_ntlm_type1_message(struct Curl_easy *data,
|
|||
* Parameters:
|
||||
*
|
||||
* data [in] - The session handle.
|
||||
* userp [in] - The user name in the format User or Domain\User.
|
||||
* userp [in] - The username in the format User or Domain\User.
|
||||
* passwdp [in] - The user's password.
|
||||
* ntlm [in/out] - The NTLM data struct being used and modified.
|
||||
* out [out] - The result storage.
|
||||
|
|
@ -470,7 +470,7 @@ CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data,
|
|||
12 LM/LMv2 Response security buffer
|
||||
20 NTLM/NTLMv2 Response security buffer
|
||||
28 Target Name security buffer
|
||||
36 User Name security buffer
|
||||
36 username security buffer
|
||||
44 Workstation Name security buffer
|
||||
(52) Session Key security buffer (*)
|
||||
(60) Flags long (*)
|
||||
|
|
@ -517,7 +517,7 @@ CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data,
|
|||
userlen = strlen(user);
|
||||
|
||||
#ifndef NTLM_HOSTNAME
|
||||
/* Get the machine's un-qualified host name as NTLM doesn't like the fully
|
||||
/* Get the machine's un-qualified hostname as NTLM does not like the fully
|
||||
qualified domain name */
|
||||
if(Curl_gethostname(host, sizeof(host))) {
|
||||
infof(data, "gethostname() failed, continuing without");
|
||||
|
|
@ -722,7 +722,7 @@ CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data,
|
|||
/* Make sure that the domain, user and host strings fit in the
|
||||
buffer before we copy them there. */
|
||||
if(size + userlen + domlen + hostlen >= NTLM_BUFSIZE) {
|
||||
failf(data, "user + domain + host name too big");
|
||||
failf(data, "user + domain + hostname too big");
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -75,10 +75,10 @@ bool Curl_auth_is_ntlm_supported(void)
|
|||
* Parameters:
|
||||
*
|
||||
* data [in] - The session handle.
|
||||
* userp [in] - The user name in the format User or Domain\User.
|
||||
* userp [in] - The username in the format User or Domain\User.
|
||||
* passwdp [in] - The user's password.
|
||||
* service [in] - The service type such as http, smtp, pop or imap.
|
||||
* host [in] - The host name.
|
||||
* host [in] - The hostname.
|
||||
* ntlm [in/out] - The NTLM data struct being used and modified.
|
||||
* out [out] - The result storage.
|
||||
*
|
||||
|
|
@ -106,7 +106,7 @@ CURLcode Curl_auth_create_ntlm_type1_message(struct Curl_easy *data,
|
|||
status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT(SP_NAME_NTLM),
|
||||
&SecurityPackage);
|
||||
if(status != SEC_E_OK) {
|
||||
failf(data, "SSPI: couldn't get auth info");
|
||||
failf(data, "SSPI: could not get auth info");
|
||||
return CURLE_AUTH_ERROR;
|
||||
}
|
||||
|
||||
|
|
@ -233,7 +233,7 @@ CURLcode Curl_auth_decode_ntlm_type2_message(struct Curl_easy *data,
|
|||
* Parameters:
|
||||
*
|
||||
* data [in] - The session handle.
|
||||
* userp [in] - The user name in the format User or Domain\User.
|
||||
* userp [in] - The username in the format User or Domain\User.
|
||||
* passwdp [in] - The user's password.
|
||||
* ntlm [in/out] - The NTLM data struct being used and modified.
|
||||
* out [out] - The result storage.
|
||||
|
|
|
|||
|
|
@ -49,8 +49,8 @@
|
|||
*
|
||||
* Parameters:
|
||||
*
|
||||
* user[in] - The user name.
|
||||
* host[in] - The host name.
|
||||
* user[in] - The username.
|
||||
* host[in] - The hostname.
|
||||
* port[in] - The port(when not Port 80).
|
||||
* bearer[in] - The bearer token.
|
||||
* out[out] - The result storage.
|
||||
|
|
@ -87,7 +87,7 @@ CURLcode Curl_auth_create_oauth_bearer_message(const char *user,
|
|||
*
|
||||
* Parameters:
|
||||
*
|
||||
* user[in] - The user name.
|
||||
* user[in] - The username.
|
||||
* bearer[in] - The bearer token.
|
||||
* out[out] - The result storage.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -65,10 +65,10 @@ bool Curl_auth_is_spnego_supported(void)
|
|||
* Parameters:
|
||||
*
|
||||
* data [in] - The session handle.
|
||||
* userp [in] - The user name in the format User or Domain\User.
|
||||
* userp [in] - The username in the format User or Domain\User.
|
||||
* passwdp [in] - The user's password.
|
||||
* service [in] - The service type such as http, smtp, pop or imap.
|
||||
* host [in] - The host name.
|
||||
* host [in] - The hostname.
|
||||
* chlg64 [in] - The optional base64 encoded challenge message.
|
||||
* nego [in/out] - The Negotiate data struct being used and modified.
|
||||
*
|
||||
|
|
@ -97,8 +97,8 @@ CURLcode Curl_auth_decode_spnego_message(struct Curl_easy *data,
|
|||
|
||||
if(nego->context && nego->status == GSS_S_COMPLETE) {
|
||||
/* We finished successfully our part of authentication, but server
|
||||
* rejected it (since we're again here). Exit with an error since we
|
||||
* can't invent anything better */
|
||||
* rejected it (since we are again here). Exit with an error since we
|
||||
* cannot invent anything better */
|
||||
Curl_auth_cleanup_spnego(nego);
|
||||
return CURLE_LOGIN_DENIED;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,10 +79,10 @@ bool Curl_auth_is_spnego_supported(void)
|
|||
* Parameters:
|
||||
*
|
||||
* data [in] - The session handle.
|
||||
* user [in] - The user name in the format User or Domain\User.
|
||||
* user [in] - The username in the format User or Domain\User.
|
||||
* password [in] - The user's password.
|
||||
* service [in] - The service type such as http, smtp, pop or imap.
|
||||
* host [in] - The host name.
|
||||
* host [in] - The hostname.
|
||||
* chlg64 [in] - The optional base64 encoded challenge message.
|
||||
* nego [in/out] - The Negotiate data struct being used and modified.
|
||||
*
|
||||
|
|
@ -113,8 +113,8 @@ CURLcode Curl_auth_decode_spnego_message(struct Curl_easy *data,
|
|||
|
||||
if(nego->context && nego->status == SEC_E_OK) {
|
||||
/* We finished successfully our part of authentication, but server
|
||||
* rejected it (since we're again here). Exit with an error since we
|
||||
* can't invent anything better */
|
||||
* rejected it (since we are again here). Exit with an error since we
|
||||
* cannot invent anything better */
|
||||
Curl_auth_cleanup_spnego(nego);
|
||||
return CURLE_LOGIN_DENIED;
|
||||
}
|
||||
|
|
@ -132,7 +132,7 @@ CURLcode Curl_auth_decode_spnego_message(struct Curl_easy *data,
|
|||
TEXT(SP_NAME_NEGOTIATE),
|
||||
&SecurityPackage);
|
||||
if(nego->status != SEC_E_OK) {
|
||||
failf(data, "SSPI: couldn't get auth info");
|
||||
failf(data, "SSPI: could not get auth info");
|
||||
return CURLE_AUTH_ERROR;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
* Parameters:
|
||||
*
|
||||
* service [in] - The service type such as http, smtp, pop or imap.
|
||||
* host [in] - The host name.
|
||||
* host [in] - The hostname.
|
||||
* realm [in] - The realm.
|
||||
*
|
||||
* Returns a pointer to the newly allocated SPN.
|
||||
|
|
@ -93,7 +93,7 @@ TCHAR *Curl_auth_build_spn(const char *service, const char *host,
|
|||
return NULL;
|
||||
|
||||
/* Allocate and return a TCHAR based SPN. Since curlx_convert_UTF8_to_tchar
|
||||
must be freed by curlx_unicodefree we'll dupe the result so that the
|
||||
must be freed by curlx_unicodefree we will dupe the result so that the
|
||||
pointer this function returns can be normally free'd. */
|
||||
tchar_spn = curlx_convert_UTF8_to_tchar(utf8_spn);
|
||||
free(utf8_spn);
|
||||
|
|
@ -115,14 +115,14 @@ TCHAR *Curl_auth_build_spn(const char *service, const char *host,
|
|||
* Domain/User (curl Down-level format - for compatibility with existing code)
|
||||
* User@Domain (User Principal Name)
|
||||
*
|
||||
* Note: The user name may be empty when using a GSS-API library or Windows
|
||||
* Note: The username may be empty when using a GSS-API library or Windows
|
||||
* SSPI as the user and domain are either obtained from the credentials cache
|
||||
* when using GSS-API or via the currently logged in user's credentials when
|
||||
* using Windows SSPI.
|
||||
*
|
||||
* Parameters:
|
||||
*
|
||||
* user [in] - The user name.
|
||||
* user [in] - The username.
|
||||
*
|
||||
* Returns TRUE on success; otherwise FALSE.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue