mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-14 20:30:04 +01:00
Fail if integrity option is used with LUKS1 format.
This commit is contained in:
@@ -999,7 +999,10 @@ static int action_luksFormat(void)
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (luks_version == 2 && opt_integrity) {
|
||||
if (luks_version != 2 && opt_integrity) {
|
||||
log_err(_("Integrity option can be used only for LUKS2 format.\n"));
|
||||
goto out;
|
||||
} if (opt_integrity) {
|
||||
r = crypt_parse_integrity_mode(opt_integrity, integrity, &integrity_keysize);
|
||||
if (r < 0) {
|
||||
log_err(_("No known integrity specification pattern detected.\n"));
|
||||
|
||||
Reference in New Issue
Block a user