Skip to content

Commit

Permalink
Fix a missing BGT delay in T=1 loop (see issue #13).
Browse files Browse the repository at this point in the history
Thanks @ijsf for reporting this and testing.
  • Loading branch information
rben-dev committed Feb 28, 2024
1 parent 95a644a commit 9e21449
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions smartcard_iso7816.c
Original file line number Diff line number Diff line change
Expand Up @@ -1888,6 +1888,8 @@ static int SC_send_APDU_T1(SC_APDU_cmd *apdu, SC_APDU_resp *resp, SC_ATR *atr){
log_printf("[Smartcard T=1] Unexpected case: received other block than expected RBLOCK, or bad sequence number ...\n");
goto err;
}
/* Wait for BGT as we will send the next block after looping */
SC_delay_etu(BGT_block_guard_time); /* Wait for the standardized Block Guard Time (22 ETU by default) */
}
else{
/* This is the last block, we should receive at least one I type block with a last I Block received sequence + 1 value
Expand Down

0 comments on commit 9e21449

Please sign in to comment.