From 49d2491d5725260baaa8901343979e95bdead80f Mon Sep 17 00:00:00 2001 From: dmtar Date: Wed, 4 Jun 2025 14:52:05 +0100 Subject: [PATCH] misc --- src/tpm.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/tpm.c b/src/tpm.c index 88c3bc7..4da1627 100644 --- a/src/tpm.c +++ b/src/tpm.c @@ -615,12 +615,16 @@ static int rsu_handle_recv(EI1_TPM_t* tpm_rx, void** security_socket, uint8_t* n break; } + int known_id = 0; for (int i = 0; i < facilities.tolling.infos.length; i++) { - if (info_id != facilities.tolling.z[i]->asn->id) { - log_warn("[tolling] received TPM has unkown info_id"); - return 1; + if (info_id != facilities.tolling.infos.z[i]->asn->id) { + known_id = 1; } } + if (!known_id) { + log_warn("[tolling] received TPM has unkown info_id"); + return 1; + } asn_enc_rval_t enc; EIS_NetworkingRequest_t* nr = NULL;