Allow linking multiple VKs (also in reencryption).

If the device is in reencryption, it has two active volume keys. Linking
the VK to keyring is not supported for such devices, because the API
only counts with one key. This commit modifies the API
crypt_set_keyring_to_link to allow passing multiple keyring key names.
This commit is contained in:
Daniel Zatovic
2023-11-22 17:41:11 +01:00
committed by Daniel Zaťovič
parent e0eb4dad95
commit 5814b39cdd
5 changed files with 237 additions and 60 deletions

View File

@@ -30,6 +30,7 @@ struct crypt_device;
#define MAX_CIPHER_LEN 32
#define MAX_CIPHER_LEN_STR "31"
#define MAX_KEYFILES 32
#define MAX_KEYRING_LINKS 2
#define MAX_CAPI_ONE_LEN 2 * MAX_CIPHER_LEN
#define MAX_CAPI_ONE_LEN_STR "63" /* for sscanf length + '\0' */
#define MAX_CAPI_LEN 144 /* should be enough to fit whole capi string */