cryptsetup: use crypt_token_max if available

New API added upstream:

https://gitlab.com/cryptsetup/cryptsetup/-/commit/8a12f6dc2c75f8fd0c4969fbdc421895eb418072
This commit is contained in:
Luca Boccassi
2021-01-05 12:16:07 +00:00
committed by Luca Boccassi
parent 0a9fb9bad8
commit 3c2c8e62c9
9 changed files with 25 additions and 11 deletions
+1 -1
View File
@@ -119,7 +119,7 @@ int find_fido2_auto_data(
/* Loads FIDO2 metadata from LUKS2 JSON token headers. */
for (int token = 0; token < LUKS2_TOKENS_MAX; token ++) {
for (int token = 0; token < sym_crypt_token_max(CRYPT_LUKS2); token ++) {
_cleanup_(json_variant_unrefp) JsonVariant *v = NULL;
JsonVariant *w;