Skip to content

Commit

Permalink
Silently ignore write to slot TOTP#15
Browse files Browse the repository at this point in the history
Workaround for issue #91
To be removed in the further release.

Signed-off-by: Szczepan Zalega <[email protected]>
  • Loading branch information
szszszsz committed Jun 24, 2019
1 parent b127c51 commit ad8b36d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/OTP/report_protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down

0 comments on commit ad8b36d

Please sign in to comment.