mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-12 19:30:04 +01:00
integrity: Fix integrity_key_size for algorithms without keys
INTEGRITY_key_size returns -EINVAL for algorithms without a key and because crypt_params_integrity.integrity_key_size is an unsigned integer we get key size 4294967274 instead of more appropriate 0 for these algorithms.
This commit is contained in:
@@ -2007,6 +2007,7 @@ static void IntegrityTest(void)
|
||||
EQ_(ip.interleave_sectors, params.interleave_sectors);
|
||||
EQ_(ip.journal_size, params.journal_size);
|
||||
EQ_(ip.journal_watermark, params.journal_watermark);
|
||||
EQ_(ip.integrity_key_size, 0);
|
||||
OK_(strcmp(ip.integrity,params.integrity));
|
||||
FAIL_(crypt_set_uuid(cd,DEVICE_1_UUID),"can't set uuid to integrity device");
|
||||
CRYPT_FREE(cd);
|
||||
|
||||
Reference in New Issue
Block a user