Skip to content

Commit

Permalink
cdiff: Replace cdiff-apply feature with Rust implementation
Browse files Browse the repository at this point in the history
Apply both .cdiff and .script CVD patches.

Note: A script is a non-compressed and unsigned file containing cdiff
commands. There is no header or footer that should be processed.

This Rust-based implementation of the cdiff-apply feature includes
equivalent features as found in the C-based implementation:
- cdiff file signature validation against sha256 of the file contents
- Gz decoding of file contents
- File open command
- File close command
- Signature add command
- Line delete command
- Xchg command
- Move command
- Unlink command

This Rust implementation adds cdiff-apply unit tests to verify correct
functionality.
  • Loading branch information
johnh-cisco authored and val-ms committed Jan 10, 2022
1 parent 1fbf6ae commit dda0a70
Show file tree
Hide file tree
Showing 10 changed files with 1,320 additions and 1,090 deletions.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
members = [
"libclamav_rust",
]

[profile.dev.package."*"]
opt-level = 2
2 changes: 0 additions & 2 deletions common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ add_library( common STATIC )
target_sources( common
PRIVATE
cert_util.c
cdiff.c
actions.c
clamdcom.c
getopt.c
Expand All @@ -27,7 +26,6 @@ target_sources( common
tar.c
PUBLIC
cert_util.h
cdiff.h
actions.h
clamdcom.h
fdpassing.h
Expand Down
Loading

0 comments on commit dda0a70

Please sign in to comment.