mirror of
https://github.com/curl/curl.git
synced 2026-07-24 18:07:23 +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
|
|
@ -446,21 +446,21 @@ if((! -e pp($hstprvkeyf)) || (! -s pp($hstprvkeyf)) ||
|
|||
my @rsahostkey = do { local $/ = ' '; <$rsakeyfile> };
|
||||
close($rsakeyfile);
|
||||
if(!$rsahostkey[1]) {
|
||||
logmsg "Failed parsing base64 encoded RSA host key\n";
|
||||
logmsg "Failed parsing base64 encoded SSH host key\n";
|
||||
exit 1;
|
||||
}
|
||||
open(my $pubmd5file, ">", pp($hstpubmd5f));
|
||||
print $pubmd5file md5_hex(decode_base64($rsahostkey[1]));
|
||||
close($pubmd5file);
|
||||
if((! -e pp($hstpubmd5f)) || (! -s pp($hstpubmd5f))) {
|
||||
logmsg "Failed writing md5 hash of RSA host key\n";
|
||||
logmsg "Failed writing MD5 hash of SSH host key\n";
|
||||
exit 1;
|
||||
}
|
||||
open(my $pubsha256file, ">", pp($hstpubsha256f));
|
||||
print $pubsha256file sha256_base64(decode_base64($rsahostkey[1]));
|
||||
close($pubsha256file);
|
||||
if((! -e pp($hstpubsha256f)) || (! -s pp($hstpubsha256f))) {
|
||||
logmsg "Failed writing sha256 hash of RSA host key\n";
|
||||
logmsg "Failed writing SHA256 hash of SSH host key\n";
|
||||
exit 1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue