mirror of
https://github.com/LedgerHQ/openpgp-card-app
synced 2024-11-09 07:10:30 +00:00
Add debug PRINTF
This commit is contained in:
parent
3e98639670
commit
2d309b8c79
14
src/gpg_io.c
14
src/gpg_io.c
@ -317,6 +317,13 @@ void gpg_io_do(unsigned int io_flags) {
|
||||
break;
|
||||
}
|
||||
|
||||
PRINTF("[IO] - io_do: 1st APDU=0x %02x.%02x.%02x.%02x - %d (0x%x)\n",
|
||||
G_gpg_vstate.io_cla,
|
||||
G_gpg_vstate.io_ins,
|
||||
G_gpg_vstate.io_p1,
|
||||
G_gpg_vstate.io_p2,
|
||||
G_gpg_vstate.io_lc,
|
||||
G_gpg_vstate.io_lc);
|
||||
while (G_gpg_vstate.io_cla & CLA_APP_CHAIN) {
|
||||
G_io_apdu_buffer[0] = ((SW_OK >> 8) & 0xFF);
|
||||
G_io_apdu_buffer[1] = (SW_OK & 0xFF);
|
||||
@ -338,6 +345,13 @@ void gpg_io_do(unsigned int io_flags) {
|
||||
if ((G_gpg_vstate.io_length + G_gpg_vstate.io_lc) > GPG_IO_BUFFER_LENGTH) {
|
||||
return;
|
||||
}
|
||||
PRINTF("[IO] - io_do: Next APDU=0x %02x.%02x.%02x.%02x - %d (0x%x)\n",
|
||||
G_gpg_vstate.io_cla,
|
||||
G_gpg_vstate.io_ins,
|
||||
G_gpg_vstate.io_p1,
|
||||
G_gpg_vstate.io_p2,
|
||||
G_gpg_vstate.io_lc,
|
||||
G_gpg_vstate.io_lc);
|
||||
memmove(G_gpg_vstate.work.io_buffer + G_gpg_vstate.io_length,
|
||||
G_io_apdu_buffer + OFFSET_CDATA,
|
||||
G_gpg_vstate.io_lc);
|
||||
|
Loading…
Reference in New Issue
Block a user