mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-15 04:40:05 +01:00
Allow to use backup header for tcrypt format.
TrueCrypt/VeraCrypt supports backup header, it seems to have the same format as normal header. Let's use --header option here, it can be used to unlock data partition with header backup (open and dump commands). Fixes: #587.
This commit is contained in:
@@ -458,7 +458,8 @@ static int action_open_tcrypt(void)
|
||||
|
||||
activated_name = ARG_SET(OPT_TEST_PASSPHRASE_ID) ? NULL : action_argv[1];
|
||||
|
||||
if ((r = crypt_init(&cd, action_argv[0])))
|
||||
r = crypt_init_data_device(&cd, ARG_STR(OPT_HEADER_ID) ?: action_argv[0], action_argv[0]);
|
||||
if (r < 0)
|
||||
goto out;
|
||||
|
||||
r = tcrypt_load(cd, ¶ms);
|
||||
@@ -571,8 +572,8 @@ static int action_tcryptDump(void)
|
||||
.veracrypt_pim = ARG_UINT32(OPT_VERACRYPT_PIM_ID)
|
||||
};
|
||||
int r;
|
||||
|
||||
if ((r = crypt_init(&cd, action_argv[0])))
|
||||
r = crypt_init_data_device(&cd, ARG_STR(OPT_HEADER_ID) ?: action_argv[0], action_argv[0]);
|
||||
if (r < 0)
|
||||
goto out;
|
||||
|
||||
r = tcrypt_load(cd, ¶ms);
|
||||
|
||||
Reference in New Issue
Block a user