Skip to content

Conversation

@popovec
Copy link
Member

@popovec popovec commented Feb 7, 2023

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

Checklist
  • PKCS#11 module is tested

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 OpenSC#2694
@frankmorgner frankmorgner merged commit 49379b0 into OpenSC:master Feb 7, 2023
@xhanulik xhanulik mentioned this pull request Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WRAP operation with MyEID driver fails when using T0 protocol.

3 participants