Skip to content

Commit

Permalink
Merge branch '91-workaround_totp15_blocked'
Browse files Browse the repository at this point in the history
Block write to TOTP#15.
This is a temporary workaround for #91.
  • Loading branch information
szszszsz committed Jun 24, 2019
2 parents b127c51 + ad8b36d commit 0b1ed2d
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 0b1ed2d

Please sign in to comment.