mirror of
https://github.com/curl/curl.git
synced 2026-07-26 08:57:16 +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
|
|
@ -147,7 +147,7 @@ static int myssh_is_known(struct Curl_easy *data, struct ssh_conn *sshc)
|
|||
rc = ssh_get_publickey_hash(pubkey, SSH_PUBLICKEY_HASH_MD5, &hash, &hlen);
|
||||
if(rc != SSH_OK || hlen != 16) {
|
||||
failf(data,
|
||||
"Denied establishing ssh session: md5 fingerprint not available");
|
||||
"Denied establishing ssh session: MD5 fingerprint not available");
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
|
@ -158,7 +158,7 @@ static int myssh_is_known(struct Curl_easy *data, struct ssh_conn *sshc)
|
|||
|
||||
if(!curl_strequal(md5buffer, pubkey_md5)) {
|
||||
failf(data,
|
||||
"Denied establishing ssh session: mismatch md5 fingerprint. "
|
||||
"Denied establishing ssh session: mismatch MD5 fingerprint. "
|
||||
"Remote %s is not equal to %s", md5buffer, pubkey_md5);
|
||||
rc = SSH_ERROR;
|
||||
goto cleanup;
|
||||
|
|
|
|||
|
|
@ -476,7 +476,7 @@ static CURLcode ssh_check_fingerprint(struct Curl_easy *data,
|
|||
LIBSSH2_HOSTKEY_HASH_SHA256);
|
||||
if(!fingerprint) {
|
||||
failf(data,
|
||||
"Denied establishing ssh session: sha256 fingerprint "
|
||||
"Denied establishing ssh session: SHA256 fingerprint "
|
||||
"not available");
|
||||
myssh_to(data, sshc, SSH_SESSION_FREE);
|
||||
return CURLE_PEER_FAILED_VERIFICATION;
|
||||
|
|
@ -491,7 +491,7 @@ static CURLcode ssh_check_fingerprint(struct Curl_easy *data,
|
|||
}
|
||||
|
||||
if(!fingerprint_b64) {
|
||||
failf(data, "sha256 fingerprint could not be encoded");
|
||||
failf(data, "SHA256 fingerprint could not be encoded");
|
||||
myssh_to(data, sshc, SSH_SESSION_FREE);
|
||||
return CURLE_PEER_FAILED_VERIFICATION;
|
||||
}
|
||||
|
|
@ -509,13 +509,13 @@ static CURLcode ssh_check_fingerprint(struct Curl_easy *data,
|
|||
b64_pos++;
|
||||
}
|
||||
|
||||
/* Before we authenticate we check the hostkey's sha256 fingerprint
|
||||
/* Before we authenticate we check the hostkey's SHA256 fingerprint
|
||||
* against a known fingerprint, if available.
|
||||
*/
|
||||
if((pub_pos != b64_pos) ||
|
||||
strncmp(fingerprint_b64, pubkey_sha256, pub_pos)) {
|
||||
failf(data,
|
||||
"Denied establishing ssh session: mismatch sha256 fingerprint. "
|
||||
"Denied establishing ssh session: mismatch SHA256 fingerprint. "
|
||||
"Remote %s is not equal to %s", fingerprint_b64, pubkey_sha256);
|
||||
curlx_free(fingerprint_b64);
|
||||
myssh_to(data, sshc, SSH_SESSION_FREE);
|
||||
|
|
@ -550,12 +550,12 @@ static CURLcode ssh_check_fingerprint(struct Curl_easy *data,
|
|||
if(!fingerprint || !curl_strequal(md5buffer, pubkey_md5)) {
|
||||
if(fingerprint) {
|
||||
failf(data,
|
||||
"Denied establishing ssh session: mismatch md5 fingerprint. "
|
||||
"Denied establishing ssh session: mismatch MD5 fingerprint. "
|
||||
"Remote %s is not equal to %s", md5buffer, pubkey_md5);
|
||||
}
|
||||
else {
|
||||
failf(data,
|
||||
"Denied establishing ssh session: md5 fingerprint "
|
||||
"Denied establishing ssh session: MD5 fingerprint "
|
||||
"not available");
|
||||
}
|
||||
myssh_to(data, sshc, SSH_SESSION_FREE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue