Skip to content

apdu_sign.c: simplify handling clearsign data packets

@spalmer25 noticed that one of the conditionals in handle_data_apdu_clear() was always false, because it was comparing against the wrong variable. That is: global.stream.current < 0 cannot be true, but total < 0 does make sense.

After some code analysis, I opted to eliminate the code as it was never getting called. I also simplified further by moving the setting of global.apdu.sign.step into refill() so that we don't need to keep track of whether or not pages change.

Merge request reports