mirror of
https://github.com/curl/curl.git
synced 2026-08-26 14:53:33 +03:00
tidy-up: miscellaneous
- examples: sync debug output printf masks. - INSTALL-CMAKE.md: tidy up section for some options. - curl_sha512_256: delete comment suggesting an optimization. - vtls/keylog: scope a variable. - vtls/openssl: make a source code URL a permalink. - vtls/schannel: drop redundant parentheses. - test1119.pl: robustify `$1` -> `$s`. - sync arg names in comments to match the code. - tidy up and minor fixes to comments. - fix formatting/indenting/comment/newline/include nits. - move `UNITTEST` protos next to definitions, sync their argument names. - make variables static. - add parentheses to Perl `open()` calls. - drop unnecessary double quotes in Perl. - clang-format. Closes #21000
This commit is contained in:
parent
3512b673dd
commit
e0dd6eb4a4
148 changed files with 612 additions and 684 deletions
|
|
@ -35,10 +35,8 @@ static FILE *keylog_file_fp;
|
|||
|
||||
void Curl_tls_keylog_open(void)
|
||||
{
|
||||
char *keylog_file_name;
|
||||
|
||||
if(!keylog_file_fp) {
|
||||
keylog_file_name = curl_getenv("SSLKEYLOGFILE");
|
||||
char *keylog_file_name = curl_getenv("SSLKEYLOGFILE");
|
||||
if(keylog_file_name) {
|
||||
keylog_file_fp = curlx_fopen(keylog_file_name, FOPEN_APPENDTEXT);
|
||||
if(keylog_file_fp) {
|
||||
|
|
|
|||
|
|
@ -2946,7 +2946,7 @@ static CURLcode ossl_windows_load_anchors(struct Curl_cfilter *cf,
|
|||
/* Import certificates from the Windows root certificate store if
|
||||
requested.
|
||||
https://stackoverflow.com/questions/9507184/
|
||||
https://github.com/d3x0r/SACK/blob/master/src/netlib/ssl_layer.c#L1037
|
||||
https://github.com/d3x0r/SACK/blob/ff15424d3c581b86d40f818532e5a400c516d39d/src/netlib/ssl_layer.c#L1410
|
||||
https://datatracker.ietf.org/doc/html/rfc5280 */
|
||||
const char *win_stores[] = {
|
||||
"ROOT", /* Trusted Root Certification Authorities */
|
||||
|
|
|
|||
|
|
@ -175,20 +175,20 @@ static CURLcode schannel_set_ssl_version_min_max(DWORD *enabled_protocols,
|
|||
for(; i <= (ssl_version_max >> 16); ++i) {
|
||||
switch(i) {
|
||||
case CURL_SSLVERSION_TLSv1_0:
|
||||
(*enabled_protocols) |= SP_PROT_TLS1_0_CLIENT;
|
||||
*enabled_protocols |= SP_PROT_TLS1_0_CLIENT;
|
||||
break;
|
||||
case CURL_SSLVERSION_TLSv1_1:
|
||||
(*enabled_protocols) |= SP_PROT_TLS1_1_CLIENT;
|
||||
*enabled_protocols |= SP_PROT_TLS1_1_CLIENT;
|
||||
break;
|
||||
case CURL_SSLVERSION_TLSv1_2:
|
||||
(*enabled_protocols) |= SP_PROT_TLS1_2_CLIENT;
|
||||
*enabled_protocols |= SP_PROT_TLS1_2_CLIENT;
|
||||
break;
|
||||
case CURL_SSLVERSION_TLSv1_3:
|
||||
|
||||
/* Windows Server 2022 and newer */
|
||||
if(curlx_verify_windows_version(10, 0, 20348, PLATFORM_WINNT,
|
||||
VERSION_GREATER_THAN_EQUAL)) {
|
||||
(*enabled_protocols) |= SP_PROT_TLS1_3_CLIENT;
|
||||
*enabled_protocols |= SP_PROT_TLS1_3_CLIENT;
|
||||
break;
|
||||
}
|
||||
else { /* Windows 10 and older */
|
||||
|
|
@ -277,7 +277,7 @@ static int get_alg_id_by_name(const char *name)
|
|||
return 0; /* not found */
|
||||
}
|
||||
|
||||
#define NUM_CIPHERS 47 /* There are 47 options listed above */
|
||||
#define NUM_CIPHERS 47 /* There are a maximum of 47 options listed above */
|
||||
|
||||
static CURLcode set_ssl_ciphers(SCHANNEL_CRED *schannel_cred, char *ciphers,
|
||||
ALG_ID *algIds)
|
||||
|
|
|
|||
|
|
@ -1684,7 +1684,7 @@ struct Curl_cftype Curl_cft_ssl = {
|
|||
|
||||
struct Curl_cftype Curl_cft_ssl_proxy = {
|
||||
"SSL-PROXY",
|
||||
CF_TYPE_SSL|CF_TYPE_PROXY,
|
||||
CF_TYPE_SSL | CF_TYPE_PROXY,
|
||||
CURL_LOG_LVL_NONE,
|
||||
ssl_cf_destroy,
|
||||
ssl_cf_connect,
|
||||
|
|
|
|||
|
|
@ -403,7 +403,8 @@ static CURLcode utf8asn1str(struct dynbuf *to, int type, const char *from,
|
|||
*
|
||||
* @unittest 1666
|
||||
*/
|
||||
UNITTEST CURLcode encodeOID(struct dynbuf *buf, const char *b, const char *e);
|
||||
UNITTEST CURLcode encodeOID(struct dynbuf *store,
|
||||
const char *beg, const char *end);
|
||||
UNITTEST CURLcode encodeOID(struct dynbuf *store,
|
||||
const char *beg, const char *end)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue