mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-12 03:10:08 +01:00
Fix api test on kernels with capi format support.
This commit is contained in:
@@ -1727,6 +1727,7 @@ static void ResizeDeviceLuks2(void)
|
||||
OK_(crypt_deactivate(cd, CDEVICE_1));
|
||||
CRYPT_FREE(cd);
|
||||
|
||||
if (t_dm_capi_string_supported()) {
|
||||
OK_(crypt_init(&cd, DMDIR L_DEVICE_OK));
|
||||
OK_(crypt_set_pbkdf_type(cd, &min_pbkdf2));
|
||||
OK_(crypt_format(cd, CRYPT_LUKS2, capi_cipher, capi_cipher_mode, NULL, key, key_size, NULL));
|
||||
@@ -1736,6 +1737,7 @@ static void ResizeDeviceLuks2(void)
|
||||
EQ_(8, r_size >> TST_SECTOR_SHIFT);
|
||||
OK_(crypt_deactivate(cd, CDEVICE_1));
|
||||
CRYPT_FREE(cd);
|
||||
}
|
||||
|
||||
_cleanup_dmdevices();
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ int t_dm_crypt_cpu_switch_support(void);
|
||||
int t_dm_crypt_discard_support(void);
|
||||
int t_dm_integrity_resize_support(void);
|
||||
int t_dm_integrity_recalculate_support(void);
|
||||
int t_dm_capi_string_supported(void);
|
||||
int t_set_readahead(const char *device, unsigned value);
|
||||
|
||||
int fips_mode(void);
|
||||
|
||||
@@ -685,6 +685,11 @@ int t_dm_integrity_recalculate_support(void)
|
||||
return t_dm_crypt_flags & T_DM_INTEGRITY_RECALC_SUPPORTED;
|
||||
}
|
||||
|
||||
int t_dm_capi_string_supported(void)
|
||||
{
|
||||
return t_dm_crypt_flags & T_DM_CAPI_STRING_SUPPORTED;
|
||||
}
|
||||
|
||||
/* loop helpers */
|
||||
|
||||
#define LOOP_DEV_MAJOR 7
|
||||
|
||||
Reference in New Issue
Block a user