From ad8b36d6ea36867a787cd596186d73689fff4991 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Mon, 24 Jun 2019 11:09:46 +0200 Subject: [PATCH] Silently ignore write to slot TOTP#15 Workaround for issue https://github.com/Nitrokey/nitrokey-storage-firmware/issues/91 To be removed in the further release. Signed-off-by: Szczepan Zalega --- src/OTP/report_protocol.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/OTP/report_protocol.c b/src/OTP/report_protocol.c index 9c97aa28..f357a054 100644 --- a/src/OTP/report_protocol.c +++ b/src/OTP/report_protocol.c @@ -1480,6 +1480,11 @@ u8 cmd_write_to_slot (u8 * new_slot, u8 * output) else if (is_TOTP_slot_number(slot_no)) // TOTP slot { slot_no = slot_no & 0x0F; + //workaround for issue: https://github.com/Nitrokey/nitrokey-storage-firmware/issues/91 + if (slot_no == NUMBER_OF_TOTP_SLOTS-1){ + output[OUTPUT_CMD_STATUS_OFFSET] = CMD_STATUS_OK; + return 0; + } new_slot_data->slot_number = slot_no; new_slot_data->type = 'T';