Allow keyslot in internal LUKS2 token activation code.

Extends code so that later API may support LUKS2 device
activation via token with specified keyslot.

Also allows testing if specific token is able to unlock specific
keyslot.
This commit is contained in:
Ondrej Kozina
2022-11-24 16:00:27 +01:00
committed by Daniel Zatovic
parent 50207333f1
commit 6751b43424
4 changed files with 61 additions and 28 deletions

View File

@@ -277,6 +277,7 @@ crypt_token_info LUKS2_token_status(struct crypt_device *cd,
int LUKS2_token_open_and_activate(struct crypt_device *cd,
struct luks2_hdr *hdr,
int keyslot,
int token,
const char *name,
const char *type,
@@ -287,6 +288,7 @@ int LUKS2_token_open_and_activate(struct crypt_device *cd,
int LUKS2_token_unlock_key(struct crypt_device *cd,
struct luks2_hdr *hdr,
int keyslot,
int token,
const char *type,
const char *pin,