OpenPGP: use updated ushort2bebytes() in pgp_get_pubkey()

Signed-off-by: Peter Marschall <peter@adpm.de>

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5499 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
martin 2011-05-23 17:33:50 +00:00
parent 15cdf5367d
commit 4899f70b4e
1 changed files with 1 additions and 4 deletions

View File

@ -770,12 +770,9 @@ pgp_get_pubkey(sc_card_t *card, unsigned int tag, u8 *buf, size_t buf_len)
sc_log(card->ctx, "called, tag=%04x\n", tag);
idbuf[0] = tag >> 8;
idbuf[1] = tag;
sc_format_apdu(card, &apdu, SC_APDU_CASE_4, 0x47, 0x81, 0);
apdu.lc = 2;
apdu.data = idbuf;
apdu.data = ushort2bebytes(idbuf, tag);
apdu.datalen = 2;
apdu.le = ((buf_len >= 256) && !(card->caps & SC_CARD_CAP_APDU_EXT)) ? 256 : buf_len;
apdu.resp = buf;