-
Notifications
You must be signed in to change notification settings - Fork 594
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
asserts: snap integrity assertion (#14870)
* asserts/header_checks.go: add checkDigestWhatDec checkDigestWhatDec also accepts a function used for the decoding. * asserts/snap_asserts*: change format of snap-revision's snap integrity stanza With the new design, dm-verity data can be generated on installation using the parameters from the snap-revision assertion which also contains the dm-verity root hash. Multiple variants of integrity data are possible for a single snap-revision to allow for future per-device optimization and configuration. * asserts/snap_asserts*: add support for separate block sizes for data/hash dm-verity devices * asserts: change function argument's name in checkDigestWhatDec helper * asserts: rename checkDigest{WhatDec,DecWhat} and remove checkDigestWhat * asserts: modify checkDigestDecWhat to return the encoded string * asserts: change argument order in check checkDigestDecWhat * asserts: rename snap integrity's field hash-alg to hash-algorithm * asserts: minor refactor in integrity related checks and more consistent error messages * asserts: reduced list of supported algorithms to only sha256 * asserts: remove unused algorithms from toHash helper and address minor comment
- Loading branch information
Showing
3 changed files
with
221 additions
and
64 deletions.
There are no files selected for viewing
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