summaryrefslogtreecommitdiff
path: root/src/cryptenroll/cryptenroll-list.c
diff options
context:
space:
mode:
authorLuca Boccassi <bluca@debian.org>2020-12-28 23:50:16 +0000
committerLuca Boccassi <luca.boccassi@gmail.com>2021-01-05 12:16:07 +0000
commit3c2c8e62c97cdae75f499a0ed3eb3f07a80034eb (patch)
tree8ae44bfd88452b6c53997d7630d852d446703306 /src/cryptenroll/cryptenroll-list.c
parent0a9fb9bad8b3d245ae4dc27e5fd2675672ddd9ec (diff)
downloadsystemd-3c2c8e62c97cdae75f499a0ed3eb3f07a80034eb.tar.gz
cryptsetup: use crypt_token_max if available
New API added upstream: https://gitlab.com/cryptsetup/cryptsetup/-/commit/8a12f6dc2c75f8fd0c4969fbdc421895eb418072
Diffstat (limited to 'src/cryptenroll/cryptenroll-list.c')
-rw-r--r--src/cryptenroll/cryptenroll-list.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptenroll/cryptenroll-list.c b/src/cryptenroll/cryptenroll-list.c
index 3171973395..d56deaa6b1 100644
--- a/src/cryptenroll/cryptenroll-list.c
+++ b/src/cryptenroll/cryptenroll-list.c
@@ -37,7 +37,7 @@ int list_enrolled(struct crypt_device *cd) {
/* Second step, enumerate through all tokens, and update the slot table, indicating what kind of
* token they are assigned to */
- 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;
const char *type;
JsonVariant *w, *z;