Add support for verity in crypt_volume_key_get and use it in status

Other APIs use the root hash in place of keys when using verity
devices, so do the same for crypt_volume_key_get to allow users
to retrieve the root hash of an active verity device.
Use it in veritysetup status to print the root hash.

[Patch slightly modified by Milan Broz]
This commit is contained in:
Luca Boccassi
2019-11-27 16:26:54 +00:00
committed by Milan Broz
parent 35c49ababf
commit 188cb114af
6 changed files with 45 additions and 16 deletions

View File

@@ -1360,6 +1360,7 @@ int crypt_deactivate(struct crypt_device *cd, const char *name);
*
* @note For TCRYPT cipher chain is the volume key concatenated
* for all ciphers in chain.
* @note For VERITY the volume key means root hash used for activation.
*/
int crypt_volume_key_get(struct crypt_device *cd,
int keyslot,