1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

Use bin2hex if possible.

This commit is contained in:
Werner Koch 2008-11-03 10:54:18 +00:00
parent 8997c155e3
commit 338ddd0bb6
8 changed files with 34 additions and 53 deletions

View file

@ -1704,7 +1704,6 @@ cmd_apdu (assuan_context_t ctx, char *line)
{
unsigned char *atr;
size_t atrlen;
int i;
char hexbuf[400];
atr = apdu_get_atr (ctrl->reader_slot, &atrlen);
@ -1713,8 +1712,7 @@ cmd_apdu (assuan_context_t ctx, char *line)
rc = gpg_error (GPG_ERR_INV_CARD);
goto leave;
}
for (i=0; i < atrlen; i++)
sprintf (hexbuf+2*i, "%02X", atr[i]);
bin2hex (atr, atrlen, hexbuf);
xfree (atr);
send_status_info (ctrl, "CARD-ATR", hexbuf, strlen (hexbuf), NULL, 0);
}