mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-11 19:00:02 +01:00
Properly initialise gcrypt in format call.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@171 36d66b0a-2a48-0410-832c-cd162a569da5
This commit is contained in:
@@ -1134,6 +1134,12 @@ int crypt_format(struct crypt_device *cd,
|
||||
if (!type)
|
||||
return -EINVAL;
|
||||
|
||||
/* Some hash functions need initialized gcrypt library */
|
||||
if (init_crypto()) {
|
||||
log_err(cd, _("Cannot initialize crypto backend.\n"));
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
if (volume_key)
|
||||
cd->volume_key = LUKS_alloc_masterkey(volume_key_size,
|
||||
volume_key);
|
||||
|
||||
Reference in New Issue
Block a user