mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-11 19:00:02 +01:00
Initialize crypto in crypt_format_luks2_opal
Without this random isn't initialized and crypt_format_luks2_opal is aborted.
This commit is contained in:
committed by
Milan Broz
parent
d5fb76a3b4
commit
42f4a68705
@@ -2355,6 +2355,10 @@ int crypt_format_luks2_opal(struct crypt_device *cd,
|
||||
|
||||
log_dbg(cd, "Formatting device %s as type LUKS2 with OPAL HW encryption.", mdata_device_path(cd) ?: "(none)");
|
||||
|
||||
r = init_crypto(cd);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
if (volume_keys_size < opal_params->user_key_size)
|
||||
return -EINVAL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user