Commit c35839af authored by Milan Broz's avatar Milan Broz

Use configure for defaults.

parent cd882661
......@@ -343,6 +343,11 @@ CS_NUM_WITH([loopaes-keybits],[key length in bits for loop-AES mode], [256])
CS_NUM_WITH([keyfile-size-maxkb],[maximum keyfile size (in kilobytes)], [8192])
CS_NUM_WITH([passphrase-size-max],[maximum keyfile size (in kilobytes)], [512])
CS_STR_WITH([verity-hash], [hash function for verity mode], [sha256])
CS_NUM_WITH([verity-data-block], [data block size for verity mode], [4096])
CS_NUM_WITH([verity-hash-block], [hash block size for verity mode], [4096])
CS_NUM_WITH([verity-salt-size], [salt size for verity mode], [32])
dnl ==========================================================================
AC_CONFIG_FILES([ Makefile
......
......@@ -23,7 +23,6 @@
* - audit alloc errors / error path
* - change command names (cryptsetup style)
* - extend superblock (UUID)
* - configure.in/config.h defaults
*/
#include <stdio.h>
......@@ -52,13 +51,13 @@ static const char *hash_algorithm = NULL;
static const char *root_hash = NULL;
static int version = 1;
static int data_block_size = 4096;
static int hash_block_size = 4096;
static int data_block_size = DEFAULT_VERITY_DATA_BLOCK;
static int hash_block_size = DEFAULT_VERITY_HASH_BLOCK;
static char *data_blocks_string = NULL;
static uint64_t data_blocks = 0;
static char *hash_start_string = NULL;
static const char *salt_string = NULL;
static unsigned salt_size = 32;
static unsigned salt_size = DEFAULT_VERITY_SALT_SIZE;
static uint64_t hash_start = 0;
static int opt_verbose = 0;
......@@ -209,7 +208,7 @@ static int action_create(void)
if ((r = crypt_init(&cd, hash_device)))
goto out;
params.hash_name = hash_algorithm ?: "sha256";
params.hash_name = hash_algorithm ?: DEFAULT_VERITY_HASH;
params.data_device = data_device;
if (salt_string) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment