From 0e054bd61c822c788e46dcbfabf8cf24d077bf14 Mon Sep 17 00:00:00 2001 From: Klas Lindfors Date: Fri, 7 Feb 2014 16:15:15 +0100 Subject: [PATCH] fix bug with continued data in request cert --- yubico-piv-tool.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yubico-piv-tool.c b/yubico-piv-tool.c index cde1a1a..8acf9c0 100644 --- a/yubico-piv-tool.c +++ b/yubico-piv-tool.c @@ -983,9 +983,10 @@ static bool request_certificate(SCARDHANDLE *card, enum enum_key_format key_form if((sw & 0x6100) == 0x6100) { received += recv_len - 2; recv_len = 0xff; + dataptr = data + received; memset(apdu.raw, 0, sizeof(apdu)); apdu.st.ins = 0xc0; - sw = send_data(card, &apdu, data, &recv_len, verbose); + sw = send_data(card, &apdu, dataptr, &recv_len, verbose); if(sw == 0x9000) { received += recv_len - 2; } else {