From: Martin P. <no...@gi...> - 2019-04-01 10:51:10
|
Branch: refs/heads/master Home: https://github.com/OpenSC/OpenSC Commit: ea74308512b40359eed0b0fe2daaef0869c94604 https://github.com/OpenSC/OpenSC/commit/ea74308512b40359eed0b0fe2daaef0869c94604 Author: Martin Paljak <ma...@ma...> Date: 2019-04-01 (Mon, 01 Apr 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 |