From 47acef71c86b1545cab818dc8110035818845532 Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Fri, 21 Jun 2024 21:11:18 +0200 Subject: [PATCH] Only when not emulation. Signed-off-by: Pol Henarejos --- src/hsm/cmd_list_keys.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/hsm/cmd_list_keys.c b/src/hsm/cmd_list_keys.c index d3bc6af..da09a08 100644 --- a/src/hsm/cmd_list_keys.c +++ b/src/hsm/cmd_list_keys.c @@ -60,9 +60,11 @@ int cmd_list_keys() { res_APDU[res_APDU_size++] = f->fid & 0xff; } } - if ((apdu.rlen + 2 + 10) % 64 == 0) { // FIX for strange behaviour with PSCS and multiple of 64 +#if !defined(ENABLE_EMULATION) + if ((apdu.rlen + 2 + 10) % 64 == 0) { // FIX for strange behaviour with PSCS and multiple of 64 + res_APDU[res_APDU_size++] = 0; res_APDU[res_APDU_size++] = 0; - res_APDU[res_APDU_size++] = 0; } +#endif return SW_OK(); }