summaryrefslogtreecommitdiffstats
path: root/src/cryptsetup/cryptsetup-tpm2.c
diff options
context:
space:
mode:
authorLuca Boccassi <bluca@debian.org>2020-12-29 00:50:16 +0100
committerLuca Boccassi <luca.boccassi@gmail.com>2021-01-05 13:16:07 +0100
commit3c2c8e62c97cdae75f499a0ed3eb3f07a80034eb (patch)
tree8ae44bfd88452b6c53997d7630d852d446703306 /src/cryptsetup/cryptsetup-tpm2.c
parentnetwork: Allow to set device's receive queues and transmit queues (diff)
downloadsystemd-3c2c8e62c97cdae75f499a0ed3eb3f07a80034eb.tar.xz
systemd-3c2c8e62c97cdae75f499a0ed3eb3f07a80034eb.zip
cryptsetup: use crypt_token_max if available
New API added upstream: https://gitlab.com/cryptsetup/cryptsetup/-/commit/8a12f6dc2c75f8fd0c4969fbdc421895eb418072
Diffstat (limited to 'src/cryptsetup/cryptsetup-tpm2.c')
-rw-r--r--src/cryptsetup/cryptsetup-tpm2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptsetup/cryptsetup-tpm2.c b/src/cryptsetup/cryptsetup-tpm2.c
index af176c8806..c22f63d973 100644
--- a/src/cryptsetup/cryptsetup-tpm2.c
+++ b/src/cryptsetup/cryptsetup-tpm2.c
@@ -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;