Orange-OpenSource / IoT-SAFE-APDU-library

APDU library to communicate with a GSMA IoT SAFE applet ( https://www.gsma.com/iot/iot-safe)
BSD 3-Clause "New" or "Revised" License
21 stars 13 forks source link

Incorrect buffer size in struct iot_safe_application #2

Closed creiter32 closed 3 years ago

creiter32 commented 3 years ago

In https://github.com/Orange-OpenSource/IoT-SAFE-APDU-library/blob/master/src/iot_safe.h#L109 the applet proprietary id is defined as 20 bytes, but the specification says it should be 32 (0x20) bytes.

ffontaine commented 3 years ago

Thanks for spotting this mistake, I'll fix it shortly. Any other comments are welcome on this part. Indeed, this function has been tested on only one applet and the response was not compliant with the standard, so a workaround was added: https://github.com/Orange-OpenSource/IoT-SAFE-APDU-library/blob/362250d9ff728ae83ee7c7f5eccbd22c344717d3/src/iot_safe.c#L159