From: Martin P. <no...@gi...> - 2019-03-21 20:13:09
|
Branch: refs/heads/read-binary-empty-response-fix Home: https://github.com/OpenSC/OpenSC Commit: 22eb0f5f59e2cddc1716ec111a0b24b7b8626ecb https://github.com/OpenSC/OpenSC/commit/22eb0f5f59e2cddc1716ec111a0b24b7b8626ecb Author: Martin Paljak <ma...@ma...> Date: 2019-03-21 (Thu, 21 Mar 2019) Changed paths: M src/libopensc/iso7816.c Log Message: ----------- iso7816_read_binary: do not assume that 6282 is returned with data Instead of a double check_sw call in case there is no data, assume that a SW is properly sent by the card and do not expose SC_ERROR_FILE_END_REACHED outside of the function (like sc_pkcs15_read_file) This is to facilitate Estonian eID 2018+ that instead of properly returning 6282 with trunkated data, 9000 is returned and next READ BINARY returns 6b00 (invalid p1/p2). The change should be generally harmless for well-behaving cards. Change-Id: I7511ab4841d3bcdf8d6f4a37a9315ea4ac569b10 |