When card returns OkBytesAvailable(), use the returned number of bytes from sw2 when asking for the next response.
This approach solved problems with "GET RESULT" with a "Feitian Java Card D11CR" running the ykneo applet.
This commit is contained in:
parent
921e0d22d9
commit
5eea5c861d
1 changed files with 2 additions and 2 deletions
|
@ -45,7 +45,7 @@ pub(crate) fn send_command(
|
||||||
)?)?;
|
)?)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
while let StatusBytes::OkBytesAvailable(_) = resp.status() {
|
while let StatusBytes::OkBytesAvailable(bytes) = resp.status() {
|
||||||
// More data is available for this command from the card
|
// More data is available for this command from the card
|
||||||
log::debug!(" chained response, getting more data");
|
log::debug!(" chained response, getting more data");
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ pub(crate) fn send_command(
|
||||||
let next = RawResponse::try_from(send_command_low_level(
|
let next = RawResponse::try_from(send_command_low_level(
|
||||||
card_client,
|
card_client,
|
||||||
commands::get_response(),
|
commands::get_response(),
|
||||||
Expect::Some,
|
Expect::Short(bytes),
|
||||||
)?)?;
|
)?)?;
|
||||||
|
|
||||||
match next.status() {
|
match next.status() {
|
||||||
|
|
Loading…
Reference in a new issue