mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-14 12:20:00 +01:00
Add required parameters for changing hash used in LUKS key setup scheme.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@80 36d66b0a-2a48-0410-832c-cd162a569da5
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
|
||||
static int opt_verbose = 1;
|
||||
static char *opt_cipher = NULL;
|
||||
static char *opt_hash = DEFAULT_HASH;
|
||||
static char *opt_hash = NULL;
|
||||
static int opt_verify_passphrase = 0;
|
||||
static char *opt_key_file = NULL;
|
||||
static unsigned int opt_key_size = 0;
|
||||
@@ -153,7 +153,7 @@ static int action_create(int reload)
|
||||
.name = action_argv[0],
|
||||
.device = action_argv[1],
|
||||
.cipher = opt_cipher?opt_cipher:DEFAULT_CIPHER,
|
||||
.hash = opt_hash,
|
||||
.hash = opt_hash ?: DEFAULT_HASH,
|
||||
.key_file = opt_key_file,
|
||||
.key_size = ((opt_key_size)?opt_key_size:DEFAULT_KEY_SIZE)/8,
|
||||
.key_slot = opt_key_slot,
|
||||
@@ -258,6 +258,9 @@ static int action_luksFormat(int arg)
|
||||
.key_slot = opt_key_slot,
|
||||
.device = action_argv[0],
|
||||
.cipher = opt_cipher?opt_cipher:DEFAULT_LUKS_CIPHER,
|
||||
.hash = DEFAULT_LUKS_HASH,
|
||||
// FIXME: enable other hash use here
|
||||
//.hash = opt_hash ?: DEFAULT_LUKS_HASH,
|
||||
.new_key_file = action_argc > 1 ? action_argv[1] : NULL,
|
||||
.flags = opt_verify_passphrase ? CRYPT_FLAG_VERIFY : (!opt_batch_mode?CRYPT_FLAG_VERIFY_IF_POSSIBLE : 0),
|
||||
.iteration_time = opt_iteration_time,
|
||||
|
||||
Reference in New Issue
Block a user