google / u2f-ref-code

U2F reference implementations
BSD 3-Clause "New" or "Revised" License
588 stars 182 forks source link

Omit zero LC when sending an extended length cAPDU #179

Closed fmeum closed 5 years ago

fmeum commented 5 years ago

The specification of the Extended Length format for cAPDUs mandates that the bytes encoding LC are to be omitted if LC=0. This change fixes the behavior of xchgAPDUExtended in this regard.