cryptsetup: use crypt_token_max if available
New API added upstream: https://gitlab.com/cryptsetup/cryptsetup/-/commit/8a12f6dc2c75f8fd0c4969fbdc421895eb418072
This commit is contained in:
committed by
Luca Boccassi
parent
0a9fb9bad8
commit
3c2c8e62c9
@@ -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;
|
||||
|
||||
|
||||
@@ -180,7 +180,7 @@ int find_pkcs11_auto_data(
|
||||
|
||||
/* Loads PKCS#11 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;
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ int find_tpm2_auto_data(
|
||||
|
||||
assert(cd);
|
||||
|
||||
for (token = start_token; token < LUKS2_TOKENS_MAX; token++) {
|
||||
for (token = start_token; token < sym_crypt_token_max(CRYPT_LUKS2); token++) {
|
||||
_cleanup_(json_variant_unrefp) JsonVariant *v = NULL;
|
||||
JsonVariant *w, *e;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user