mirror of
https://github.com/curl/curl.git
synced 2026-07-24 12:27:16 +03:00
tidy-up: miscellaneous
- gnutls, mbedtls: fix casing in log messages. - src/tool_cfgable.h: drop unused header. - appveyor.sh: variable style. - cmakelint.sh: sync with libssh2, catch `.cmake.in` explicitly. - examples: drop obsolete comments, exclamation marks. - fix comment typos, casing. Closes #19839
This commit is contained in:
parent
0476e4fc65
commit
dfd781ff62
11 changed files with 28 additions and 34 deletions
|
|
@ -276,13 +276,13 @@ struct ssl_config_data {
|
|||
char *key_type; /* format for private key (default: PEM) */
|
||||
char *key_passwd; /* plain text private key password */
|
||||
BIT(certinfo); /* gather lots of certificate info */
|
||||
BIT(earlydata); /* use tls1.3 early data */
|
||||
BIT(earlydata); /* use TLS 1.3 early data */
|
||||
BIT(enable_beast); /* allow this flaw for interoperability's sake */
|
||||
BIT(no_revoke); /* disable SSL certificate revocation checks */
|
||||
BIT(no_partialchain); /* do not accept partial certificate chains */
|
||||
BIT(revoke_best_effort); /* ignore SSL revocation offline/missing revocation
|
||||
list errors */
|
||||
BIT(native_ca_store); /* use the native ca store of operating system */
|
||||
BIT(native_ca_store); /* use the native CA store of operating system */
|
||||
BIT(auto_client_cert); /* automatically locate and use a client
|
||||
certificate for authentication (Schannel) */
|
||||
BIT(custom_cafile); /* application has set custom CA file */
|
||||
|
|
@ -1159,7 +1159,7 @@ enum dupstring {
|
|||
STRING_SSL_PINNEDPUBLICKEY, /* public key file to verify peer against */
|
||||
STRING_SSL_CIPHER_LIST, /* list of ciphers to use */
|
||||
STRING_SSL_CIPHER13_LIST, /* list of TLS 1.3 ciphers to use */
|
||||
STRING_SSL_CRLFILE, /* crl file to check certificate */
|
||||
STRING_SSL_CRLFILE, /* CRL file to check certificate */
|
||||
STRING_SSL_ISSUERCERT, /* issuer cert file to check certificate */
|
||||
STRING_SERVICE_NAME, /* Service name */
|
||||
#ifndef CURL_DISABLE_PROXY
|
||||
|
|
@ -1173,7 +1173,7 @@ enum dupstring {
|
|||
STRING_SSL_PINNEDPUBLICKEY_PROXY, /* public key file to verify proxy */
|
||||
STRING_SSL_CIPHER_LIST_PROXY, /* list of ciphers to use */
|
||||
STRING_SSL_CIPHER13_LIST_PROXY, /* list of TLS 1.3 ciphers to use */
|
||||
STRING_SSL_CRLFILE_PROXY, /* crl file to check certificate */
|
||||
STRING_SSL_CRLFILE_PROXY, /* CRL file to check certificate */
|
||||
STRING_SSL_ISSUERCERT_PROXY, /* issuer cert file to check certificate */
|
||||
STRING_PROXY_SERVICE_NAME, /* Proxy service name */
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -386,7 +386,7 @@ gnutls_set_ssl_version_min_max(struct Curl_easy *data,
|
|||
return CURLE_OK;
|
||||
}
|
||||
|
||||
failf(data, "GnuTLS: cannot set ssl protocol");
|
||||
failf(data, "GnuTLS: cannot set TLS protocol");
|
||||
return CURLE_SSL_CONNECT_ERROR;
|
||||
}
|
||||
|
||||
|
|
@ -460,7 +460,7 @@ static CURLcode gtls_populate_creds(struct Curl_cfilter *cf,
|
|||
#else
|
||||
rc = gnutls_certificate_set_x509_system_trust(creds);
|
||||
if(rc < 0)
|
||||
infof(data, "error reading native ca store (%s), continuing anyway",
|
||||
infof(data, "error reading native CA store (%s), continuing anyway",
|
||||
gnutls_strerror(rc));
|
||||
else {
|
||||
infof(data, " Native: %d certificates from system trust", rc);
|
||||
|
|
@ -483,7 +483,7 @@ static CURLcode gtls_populate_creds(struct Curl_cfilter *cf,
|
|||
GNUTLS_X509_FMT_PEM);
|
||||
creds_are_empty = creds_are_empty && (rc <= 0);
|
||||
if(rc < 0) {
|
||||
infof(data, "error reading ca cert blob (%s)%s", gnutls_strerror(rc),
|
||||
infof(data, "error reading CA cert blob (%s)%s", gnutls_strerror(rc),
|
||||
(creds_are_empty ? "" : ", continuing anyway"));
|
||||
if(creds_are_empty) {
|
||||
ssl_config->certverifyresult = rc;
|
||||
|
|
@ -504,7 +504,7 @@ static CURLcode gtls_populate_creds(struct Curl_cfilter *cf,
|
|||
GNUTLS_X509_FMT_PEM);
|
||||
creds_are_empty = creds_are_empty && (rc <= 0);
|
||||
if(rc < 0) {
|
||||
infof(data, "error reading ca cert file %s (%s)%s",
|
||||
infof(data, "error reading CA cert file %s (%s)%s",
|
||||
config->CAfile, gnutls_strerror(rc),
|
||||
(creds_are_empty ? "" : ", continuing anyway"));
|
||||
if(creds_are_empty) {
|
||||
|
|
@ -522,7 +522,7 @@ static CURLcode gtls_populate_creds(struct Curl_cfilter *cf,
|
|||
GNUTLS_X509_FMT_PEM);
|
||||
creds_are_empty = creds_are_empty && (rc <= 0);
|
||||
if(rc < 0) {
|
||||
infof(data, "error reading ca cert file %s (%s)%s",
|
||||
infof(data, "error reading CA cert file %s (%s)%s",
|
||||
config->CApath, gnutls_strerror(rc),
|
||||
(creds_are_empty ? "" : ", continuing anyway"));
|
||||
if(creds_are_empty) {
|
||||
|
|
@ -542,7 +542,7 @@ static CURLcode gtls_populate_creds(struct Curl_cfilter *cf,
|
|||
rc = gnutls_certificate_set_x509_crl_file(creds, config->CRLfile,
|
||||
GNUTLS_X509_FMT_PEM);
|
||||
if(rc < 0) {
|
||||
failf(data, "error reading crl file %s (%s)",
|
||||
failf(data, "error reading CRL file %s (%s)",
|
||||
config->CRLfile, gnutls_strerror(rc));
|
||||
return CURLE_SSL_CRL_BADFILE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -597,7 +597,7 @@ static CURLcode mbed_connect_step1(struct Curl_cfilter *cf,
|
|||
curlx_free(newblob);
|
||||
if(ret < 0) {
|
||||
mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
|
||||
failf(data, "Error importing ca cert blob - mbedTLS: (-0x%04X) %s",
|
||||
failf(data, "Error importing CA cert blob - mbedTLS: (-0x%04X) %s",
|
||||
-ret, errorbuf);
|
||||
return CURLE_SSL_CERTPROBLEM;
|
||||
}
|
||||
|
|
@ -609,12 +609,12 @@ static CURLcode mbed_connect_step1(struct Curl_cfilter *cf,
|
|||
|
||||
if(ret < 0) {
|
||||
mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
|
||||
failf(data, "Error reading ca cert file %s - mbedTLS: (-0x%04X) %s",
|
||||
failf(data, "Error reading CA cert file %s - mbedTLS: (-0x%04X) %s",
|
||||
ssl_cafile, -ret, errorbuf);
|
||||
return CURLE_SSL_CACERT_BADFILE;
|
||||
}
|
||||
#else
|
||||
failf(data, "mbedtls: functions that use the file system not built in");
|
||||
failf(data, "mbedTLS: functions that use the file system not built in");
|
||||
return CURLE_NOT_BUILT_IN;
|
||||
#endif
|
||||
}
|
||||
|
|
@ -625,14 +625,14 @@ static CURLcode mbed_connect_step1(struct Curl_cfilter *cf,
|
|||
|
||||
if(ret < 0) {
|
||||
mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
|
||||
failf(data, "Error reading ca cert path %s - mbedTLS: (-0x%04X) %s",
|
||||
failf(data, "Error reading CA cert path %s - mbedTLS: (-0x%04X) %s",
|
||||
ssl_capath, -ret, errorbuf);
|
||||
|
||||
if(verifypeer)
|
||||
return CURLE_SSL_CACERT_BADFILE;
|
||||
}
|
||||
#else
|
||||
failf(data, "mbedtls: functions that use the file system not built in");
|
||||
failf(data, "mbedTLS: functions that use the file system not built in");
|
||||
return CURLE_NOT_BUILT_IN;
|
||||
#endif
|
||||
}
|
||||
|
|
@ -652,7 +652,7 @@ static CURLcode mbed_connect_step1(struct Curl_cfilter *cf,
|
|||
return CURLE_SSL_CERTPROBLEM;
|
||||
}
|
||||
#else
|
||||
failf(data, "mbedtls: functions that use the file system not built in");
|
||||
failf(data, "mbedTLS: functions that use the file system not built in");
|
||||
return CURLE_NOT_BUILT_IN;
|
||||
#endif
|
||||
}
|
||||
|
|
@ -710,7 +710,7 @@ static CURLcode mbed_connect_step1(struct Curl_cfilter *cf,
|
|||
return CURLE_SSL_CERTPROBLEM;
|
||||
}
|
||||
#else
|
||||
failf(data, "mbedtls: functions that use the file system not built in");
|
||||
failf(data, "mbedTLS: functions that use the file system not built in");
|
||||
return CURLE_NOT_BUILT_IN;
|
||||
#endif
|
||||
}
|
||||
|
|
@ -766,13 +766,13 @@ static CURLcode mbed_connect_step1(struct Curl_cfilter *cf,
|
|||
return CURLE_SSL_CRL_BADFILE;
|
||||
}
|
||||
#else
|
||||
failf(data, "mbedtls: functions that use the file system not built in");
|
||||
failf(data, "mbedTLS: functions that use the file system not built in");
|
||||
return CURLE_NOT_BUILT_IN;
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
if(ssl_crlfile) {
|
||||
failf(data, "mbedtls: crl support not built in");
|
||||
failf(data, "mbedTLS: CRL support not built in");
|
||||
return CURLE_NOT_BUILT_IN;
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1161,7 +1161,7 @@ static CURLcode mbed_send(struct Curl_cfilter *cf, struct Curl_easy *data,
|
|||
DEBUGASSERT(backend);
|
||||
*pnwritten = 0;
|
||||
connssl->io_need = CURL_SSL_IO_NEED_NONE;
|
||||
/* mbedtls is picky when a mbedtls_ssl_write) was previously blocked.
|
||||
/* mbedTLS is picky when a mbedtls_ssl_write() was previously blocked.
|
||||
* It requires to be called with the same amount of bytes again, or it
|
||||
* will lose bytes, e.g. reporting all was sent but they were not.
|
||||
* Remember the blocked length and use that when set. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue