mirror of
https://github.com/Cisco-Talos/clamav.git
synced 2025-10-19 10:23:17 +00:00
![]() Change the clean-cache to use SHA2-256 instead of MD5. Note that all references are changed to specify "SHA2-256" now instead of "SHA256", for clarity. But there is no plan to add support for SHA3 algorithms at this time. Significant code cleanup. E.g.: - Implemented goto-done error handling. - Used `uint8_t *` instead of `unsigned char *`. - Use `bool` for boolean checks, rather than `int. - Used `#defines` instead of magic numbers. - Removed duplicate `#defines` for things like hash length. Add new option to calculate and record additional hash types when the "generate metadata JSON" feature is enabled: - libclamav option: `CL_SCAN_GENERAL_STORE_EXTRA_HASHES` - clamscan option: `--json-store-extra-hashes` (default off) - clamd.conf option: `JsonStoreExtraHashes` (default 'no') Renamed the sigtool option `--sha256` to `--sha2-256`. The original option is still functional, but is deprecated. For the "generate metadata JSON" feature, the file hash is now stored as "sha2-256" instead of "FileMD5". If you enable the "extra hashes" option, then it will also record "md5" and "sha1". Deprecate and disable the internal "SHA collect" feature. This option had been hidden behind C #ifdef checks for an option that wasn't exposed through CMake, so it was basically unavailable anyways. Changes to calculate file hashes when they're needed and no sooner. For the FP feature in the matcher module, I have mimiced the optimization in the FMAP scan routine which makes it so that it can calculate multiple hashes in a single pass of the file. The `HandlerType` feature stores a hash of the file in the scan ctx to prevent retyping the exact same data more than once. I removed that hash field and replaced it with an attribute flag that is applied to the new recursion stack layer when retyping a file. This also closes a minor bug that would prevent retyping a file with an all-zero hash. :) The work upgrading cache.c to support SHA2-256 sized hashes thanks to: https://github.com/m-sola CLAM-255 CLAM-1858 CLAM-1859 CLAM-1860 |
||
---|---|---|
.. | ||
7z.h | ||
7zAlloc.c | ||
7zAlloc.h | ||
7zBuf.c | ||
7zBuf.h | ||
7zBuf2.c | ||
7zCrc.c | ||
7zCrc.h | ||
7zCrcOpt.c | ||
7zDec.c | ||
7zFile.c | ||
7zFile.h | ||
7zIn.c | ||
7zStream.c | ||
7zVersion.h | ||
Alloc.h | ||
Bcj2.c | ||
Bcj2.h | ||
Bra.c | ||
Bra.h | ||
Bra86.c | ||
BraIA64.c | ||
CpuArch.c | ||
CpuArch.h | ||
Delta.c | ||
Delta.h | ||
lzma.diff | ||
Lzma2Dec.c | ||
Lzma2Dec.h | ||
LzmaDec.c | ||
LzmaDec.h | ||
Ppmd.h | ||
Ppmd7.c | ||
Ppmd7.h | ||
Ppmd7Dec.c | ||
RotateDefs.h | ||
Types.h | ||
Xz.c | ||
Xz.h | ||
XzCrc64.c | ||
XzCrc64.h | ||
XzDec.c | ||
XzIn.c |