mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-06 00:10:04 +01:00
Fix api test to use proper key size.
LUKS format now reuires correct kernel parameters always, so validation test must use different but still correct key size.
This commit is contained in:
@@ -1310,8 +1310,8 @@ static void LuksHeaderRestore(void)
|
||||
|
||||
// volume key_size mismatch
|
||||
OK_(crypt_init(&cd, DMDIR L_DEVICE_OK));
|
||||
memcpy(key2, key, key_size - 1);
|
||||
OK_(crypt_format(cd, CRYPT_LUKS1, cipher, cipher_mode, NULL, key2, key_size - 1, ¶ms));
|
||||
memcpy(key2, key, key_size / 2);
|
||||
OK_(crypt_format(cd, CRYPT_LUKS1, cipher, cipher_mode, NULL, key2, key_size / 2, ¶ms));
|
||||
FAIL_(crypt_header_restore(cd, CRYPT_LUKS1, VALID_HEADER), "Volume keysize mismatch");
|
||||
crypt_free(cd);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user