forked from canonical/snapd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
s/integrity/dmverity: rework (canonical#14871)
* s/i/dmverity: refactor getRootHashFromOutput * s/i/dmverity/veritysetup: add ability to pass options to veritysetup format also dmverity.Format will simply return the root hash instead of the old Info struct since the new design doesn't have a need for a separate header. * s/i/dmverity/veritysetup: add superblock parsing functionality adding helpers for retrieving and parsing a dm-verity superblock from a dm-verity hash device/file. This will be first consumed by the snap integrity API which will need to detect the salt that was used for the dm-verity data generation. Moreover callers to dmverity.Format will need to have a way to retrieve the parameters used by veritysetup if no parameters are passed (and veritysetup chooses default values). * s/i/dmverity: add default dmverity format version * s/i/dmverity: add default value for superblock version too * s/i/dmverity: name Format()'s return arguments for clarity * s/i/dmverity: rename VeritySuperBlock to VeritySuperblock * s/i/dmverity: change VeritySuperblock fields to camelCase * s/i/dmverity: add clarifying comments for test data generation * s/i/dmverity: tests: fix failing tests * s/i/dmverity: remove json tags from VeritySuperblock * s/i/dmverity: rename field of getFieldFromOutput to val * s/i/dmverity: use osutil.CombineStdOutErr for debug message * s/i/dmverity: create testdisk file programmatically * s/i/dmverity: rename ReadSuperBlock to ReadVeritySuperblock * s/integrity: stop using old APIs and tests for the testsuite to run * s/i/dmverity: rename ReadVeritySuperblock to ReadSuperblock * s/i/dmverity: use errors.New instead of fmt.Errorf for static error messages * s/i/dmverity: fix passing arguments to veritysetup
- Loading branch information
Showing
5 changed files
with
201 additions
and
175 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.