mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-16 13:20:11 +01:00
Move cipher_null check in internal function crypt_is_cipher_null.
Also removes tools helper so that we keep check in one place.
This commit is contained in:
@@ -1327,7 +1327,7 @@ static int _luksFormat(struct crypt_device **r_cd, char **r_password, size_t *r_
|
||||
}
|
||||
|
||||
/* Never call pwquality if using null cipher */
|
||||
if (tools_is_cipher_null(cipher))
|
||||
if (crypt_is_cipher_null(cipher))
|
||||
ARG_SET_TRUE(OPT_FORCE_PASSWORD_ID);
|
||||
|
||||
if ((r = crypt_init(&cd, header_device))) {
|
||||
@@ -1732,7 +1732,7 @@ static int luksAddUnboundKey(void)
|
||||
goto out;
|
||||
|
||||
/* Never call pwquality if using null cipher */
|
||||
if (tools_is_cipher_null(crypt_get_cipher(cd)))
|
||||
if (crypt_is_cipher_null(crypt_get_cipher(cd)))
|
||||
ARG_SET_TRUE(OPT_FORCE_PASSWORD_ID);
|
||||
|
||||
keysize = ARG_UINT32(OPT_KEY_SIZE_ID) / 8;
|
||||
@@ -1797,7 +1797,7 @@ static int action_luksAddKey(void)
|
||||
goto out;
|
||||
|
||||
/* Never call pwquality if using null cipher */
|
||||
if (tools_is_cipher_null(crypt_get_cipher(cd)))
|
||||
if (crypt_is_cipher_null(crypt_get_cipher(cd)))
|
||||
ARG_SET_TRUE(OPT_FORCE_PASSWORD_ID);
|
||||
|
||||
keysize = crypt_get_volume_key_size(cd);
|
||||
@@ -1900,7 +1900,7 @@ static int action_luksChangeKey(void)
|
||||
goto out;
|
||||
|
||||
/* Never call pwquality if using null cipher */
|
||||
if (tools_is_cipher_null(crypt_get_cipher(cd)))
|
||||
if (crypt_is_cipher_null(crypt_get_cipher(cd)))
|
||||
ARG_SET_TRUE(OPT_FORCE_PASSWORD_ID);
|
||||
|
||||
r = set_pbkdf_params(cd, crypt_get_type(cd));
|
||||
|
||||
Reference in New Issue
Block a user