mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-15 21:00:05 +01:00
There was a bug in both crypt_token_assign_keyslot and crypt_token_unsassign_keyslot where CRYPT_ANY_TOKEN special value could be passed in token parameter. It would correctly assign/unassign all tokens to/from the specified keyslot (or from any in case of CRYPT_ANY_SLOT), but it returned -1 (CRYPT_ANY_TOKEN) which fited error return values as per API documentation. We fixed that by not supporting CRYPT_ANY_TOKEN since it does not make much sense. It can be workarounded by iterating over all available tokens and calling crypt_token_assign_keyslot or crypt_token_unassign_keyslot accodingly. Fixes: #914.
262 KiB
262 KiB