mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-11 19:00:02 +01:00
Add --key-description for luksResume command.
This commit is contained in:
@@ -441,7 +441,7 @@ it is requested.
|
|||||||
Reencrypt only the LUKS1 header and keyslots. Skips data in-place reencryption.
|
Reencrypt only the LUKS1 header and keyslots. Skips data in-place reencryption.
|
||||||
endif::[]
|
endif::[]
|
||||||
|
|
||||||
ifdef::ACTION_OPEN,ACTION_LUKSFORMAT,ACTION_LUKSDUMP,ACTION_RESIZE,ACTION_TOKEN[]
|
ifdef::ACTION_OPEN,ACTION_LUKSFORMAT,ACTION_LUKSDUMP,ACTION_RESIZE,ACTION_LUKSRESUME,ACTION_TOKEN[]
|
||||||
*--key-description <text>*::
|
*--key-description <text>*::
|
||||||
Set key description in keyring that will be used for passphrase retrieval.
|
Set key description in keyring that will be used for passphrase retrieval.
|
||||||
endif::[]
|
endif::[]
|
||||||
|
|||||||
@@ -2913,16 +2913,16 @@ static int action_luksResume(void)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
tries = set_tries_tty(false);
|
tries = set_tries_tty(true);
|
||||||
do {
|
do {
|
||||||
r = tools_get_key(NULL, &password, &passwordLen,
|
r = init_keyslot_context(cd, &password, &passwordLen, verify_passphrase(0), false, false, &kc);
|
||||||
ARG_UINT64(OPT_KEYFILE_OFFSET_ID), ARG_UINT32(OPT_KEYFILE_SIZE_ID), ARG_STR(OPT_KEY_FILE_ID),
|
|
||||||
ARG_UINT32(OPT_TIMEOUT_ID), verify_passphrase(0), 0, cd);
|
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
r = crypt_resume_by_passphrase(cd, action_argv[0], ARG_INT32(OPT_KEY_SLOT_ID),
|
r = crypt_resume_by_keyslot_context(cd, action_argv[0], ARG_INT32(OPT_KEY_SLOT_ID), kc);
|
||||||
password, passwordLen);
|
crypt_keyslot_context_free(kc);
|
||||||
|
kc = NULL;
|
||||||
|
|
||||||
tools_passphrase_msg(r);
|
tools_passphrase_msg(r);
|
||||||
check_signal(&r);
|
check_signal(&r);
|
||||||
tools_keyslot_msg(r, UNLOCKED);
|
tools_keyslot_msg(r, UNLOCKED);
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
#define OPT_ITER_TIME_ACTIONS { BENCHMARK_ACTION, FORMAT_ACTION, ADDKEY_ACTION, CHANGEKEY_ACTION, CONVERTKEY_ACTION, REENCRYPT_ACTION }
|
#define OPT_ITER_TIME_ACTIONS { BENCHMARK_ACTION, FORMAT_ACTION, ADDKEY_ACTION, CHANGEKEY_ACTION, CONVERTKEY_ACTION, REENCRYPT_ACTION }
|
||||||
#define OPT_IV_LARGE_SECTORS_ACTIONS { OPEN_ACTION }
|
#define OPT_IV_LARGE_SECTORS_ACTIONS { OPEN_ACTION }
|
||||||
#define OPT_KEEP_KEY_ACTIONS { REENCRYPT_ACTION }
|
#define OPT_KEEP_KEY_ACTIONS { REENCRYPT_ACTION }
|
||||||
#define OPT_KEY_DESCRIPTION_ACTIONS { TOKEN_ACTION, LUKSDUMP_ACTION, FORMAT_ACTION, RESIZE_ACTION, OPEN_ACTION }
|
#define OPT_KEY_DESCRIPTION_ACTIONS { TOKEN_ACTION, LUKSDUMP_ACTION, FORMAT_ACTION, RESIZE_ACTION, OPEN_ACTION, RESUME_ACTION }
|
||||||
#define OPT_KEY_SIZE_ACTIONS { OPEN_ACTION, BENCHMARK_ACTION, FORMAT_ACTION, REENCRYPT_ACTION, ADDKEY_ACTION }
|
#define OPT_KEY_SIZE_ACTIONS { OPEN_ACTION, BENCHMARK_ACTION, FORMAT_ACTION, REENCRYPT_ACTION, ADDKEY_ACTION }
|
||||||
#define OPT_KEY_SLOT_ACTIONS { OPEN_ACTION, REENCRYPT_ACTION, CONFIG_ACTION, FORMAT_ACTION, ADDKEY_ACTION, CHANGEKEY_ACTION, CONVERTKEY_ACTION, LUKSDUMP_ACTION, TOKEN_ACTION, RESUME_ACTION }
|
#define OPT_KEY_SLOT_ACTIONS { OPEN_ACTION, REENCRYPT_ACTION, CONFIG_ACTION, FORMAT_ACTION, ADDKEY_ACTION, CHANGEKEY_ACTION, CONVERTKEY_ACTION, LUKSDUMP_ACTION, TOKEN_ACTION, RESUME_ACTION }
|
||||||
#define OPT_KEYSLOT_CIPHER_ACTIONS { FORMAT_ACTION, REENCRYPT_ACTION, ADDKEY_ACTION, CHANGEKEY_ACTION, CONVERTKEY_ACTION }
|
#define OPT_KEYSLOT_CIPHER_ACTIONS { FORMAT_ACTION, REENCRYPT_ACTION, ADDKEY_ACTION, CHANGEKEY_ACTION, CONVERTKEY_ACTION }
|
||||||
|
|||||||
Reference in New Issue
Block a user