summaryrefslogtreecommitdiff
path: root/ubifs-utils/mkfs.ubifs/fscrypt.c
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2018-10-18 16:37:09 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2018-11-01 12:41:34 +0100
commit2651d8e09509a7614a66a25e6489d943fd93376b (patch)
treef1e4c0986c07f81f27bf9b1089234a8eda20ce61 /ubifs-utils/mkfs.ubifs/fscrypt.c
parentd9421785a18fdfae0ada62ecbfcbbdd28c4e0fde (diff)
mkfs.ubifs: Enable Cipher selection
No longer hard code AES-128-CBC, we support AES-256-XTS too. Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'ubifs-utils/mkfs.ubifs/fscrypt.c')
-rw-r--r--ubifs-utils/mkfs.ubifs/fscrypt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ubifs-utils/mkfs.ubifs/fscrypt.c b/ubifs-utils/mkfs.ubifs/fscrypt.c
index 02132e2..2fc0ae8 100644
--- a/ubifs-utils/mkfs.ubifs/fscrypt.c
+++ b/ubifs-utils/mkfs.ubifs/fscrypt.c
@@ -253,8 +253,8 @@ struct fscrypt_context *init_fscrypt_context(const char *cipher_name,
new_fctx = xmalloc(sizeof(*new_fctx));
new_fctx->format = FS_ENCRYPTION_CONTEXT_FORMAT_V1;
- new_fctx->contents_encryption_mode = FS_ENCRYPTION_MODE_AES_128_CBC;
- new_fctx->filenames_encryption_mode = FS_ENCRYPTION_MODE_AES_128_CTS;
+ new_fctx->contents_encryption_mode = fscrypt_cipher->fscrypt_block_mode;
+ new_fctx->filenames_encryption_mode = fscrypt_cipher->fscrypt_fname_mode;
new_fctx->flags = flags;
memcpy(&new_fctx->nonce, nonce, FS_KEY_DERIVATION_NONCE_SIZE);