mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-12 03:10:08 +01:00
Check if provided cipher and mode is usable before writing LUKS header to disk.
If user provided unusable cipher-mode string, LUKS header was written and keyslot creation failed later. Better check early (by creating fake dmcrypt device) if cipher is usable and fail early (without writing LUKS header to device). Fixes Issue#176
This commit is contained in:
@@ -1842,7 +1842,7 @@ static void NonFIPSAlg(void)
|
||||
struct crypt_device *cd;
|
||||
struct crypt_params_luks1 params = {0};
|
||||
char key[128] = "";
|
||||
size_t key_size = 128;
|
||||
size_t key_size = 128 / 8;
|
||||
const char *cipher = "aes";
|
||||
const char *cipher_mode = "cbc-essiv:sha256";
|
||||
int ret;
|
||||
|
||||
Reference in New Issue
Block a user