From: Peter P. <no...@gi...> - 2023-02-07 23:39:05
|
Branch: refs/heads/master Home: https://github.com/OpenSC/OpenSC Commit: 49379b0f0fa6895f2ab0e12462cc6ef9f7512b5c https://github.com/OpenSC/OpenSC/commit/49379b0f0fa6895f2ab0e12462cc6ef9f7512b5c Author: Peter Popovec <pop...@gm...> Date: 2023-02-08 (Wed, 08 Feb 2023) Changed paths: M src/libopensc/card-myeid.c Log Message: ----------- WRAP operation fix for MyEID driver (T0 protocol) apdu.le must be greater than 0, because we expect a result (wrapped key). Although the value 0 seems to be correct in this case (function sc_apdu2bytes() generates the correct field 'Le'), the operation fails in sc_get_response() where Le == 0 generates only SW. >From the point of view of the sc_get_response() function, apdu.le here represents the value "Ne" (see ISO 7816-3 section 12.1.2), and thus apdu.le cannot be 0 in this case. Fixes #2694 |