Actions
Bug #6287
closedresponse length > 255 bytes not supported / multiple rounds of GET RESPONSE
Start date:
12/04/2023
Due date:
% Done:
100%
Spec Reference:
Description
I'm currently playing with an eUICC and noticing we're only doing one GET_RESPONSE but not multiple rounds:
pySIM-shell (00:MF/ADF.ISD-R)> get_profiles_info -> 80E2910003 bf2d00 <- 6100: -> 80c0000000 <- 6100: bf2d8202eba08202e7e38202e35a0a980010325476981032144f10a0000005591010ffffffff89000010009f70010191095350204e616d652031921a4f7065726174696f6e616c2050726f66696c65204e616d6520319301019482029089504e470d0a1a0a0000000d49484452000000400000004008040000000060b9550000000774494d4507e00b091007364c956f97000000097048597300000b1200000b1201d2dd7efc0000000467414d410000b18f0bfc61050000021f4944415478daed99cd1583200c803d32000b3004abb00ecbb0822338578af559223f49b0a8175f2ec023e1238410db09a667e5e1e55f80bf00f686060b1e66b80420c02a3255 Traceback (most recent call last): File "/space/home/laforge/.local/lib/python3.11/site-packages/cmd2/cmd2.py", line 2129, in onecmd_plus_hooks stop = self.onecmd(statement, add_to_history=add_to_history) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/space/home/laforge/.local/lib/python3.11/site-packages/cmd2/cmd2.py", line 2559, in onecmd stop = func(statement) ^^^^^^^^^^^^^^^ File "/space/home/laforge/projects/git/pysim/pySim/euicc.py", line 394, in do_get_profiles_info pi = ADF_ISDR.store_data_tlv(self._cmd.lchan.scc, ProfileInfoListReq(), ProfileInfoListResp) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/space/home/laforge/projects/git/pysim/pySim/euicc.py", line 312, in store_data_tlv (data, sw) = ADF_ISDR.store_data(scc, b2h(cmd_do_enc)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/space/home/laforge/projects/git/pysim/pySim/euicc.py", line 299, in store_data return scc._tp.send_apdu_checksw(capdu) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/space/home/laforge/projects/git/pysim/pySim/transport/__init__.py", line 217, in send_apdu_checksw raise SwMatchError(rv[1], sw.lower(), self.sw_interpreter) pySim.exceptions.SwMatchError: SW match failed! Expected 9000 and got 6100. EXCEPTION of type 'SwMatchError' occurred with message: 'SW match failed! Expected 9000 and got 6100.'
The card is not responding with 9000 as it still has more data and hence again returns 6100
. If we manually request that data, it finally succeeds with 9000
pySIM-shell (00:MF/ADF.ISD-R)> apdu 80c0000000 -> 80c0000000 <- 61f0: 0d0e966e8cc6f0128d193460635fa66a3b7d511db48dd94788b655d7815071ba26e61b9000acc711841085eb398d84c0cd94f921ebe2ddab18db6b5005b055c3bc752b4038745c5339449cd4950248100e1d4528fac207b228e3101a4bd4ae52ba96a603808b05d44c27adab2af8807a00a6184b228014807566eca13538e5008ac890bf06be809e4dbebe0b808a842a009ffd7b010436af06b04f034c8d47ea46004703e034e4d95b90a98a447300dc353c9f07a843404d9b2d904bca84f62480a7013c39351431225b722de9f6ad591a0047c194e5ae19bd865afc1a26976f088603c0a7ac9117fce131f64200bcdfed8e290ee058906c46f2fad09dac885a -> 80c00000f0 <- 9000: b1550c68d2a8b426dcf69b8e71f76d195b15cd368207463513fd2dea6648476b2500eb999b6250fa5dc0499e0b88b921f2bbaf782e877588930370724e4d3f0dd01d49dbe7e92cb940423172008f3ed3c6011c03b1396bce6ec24800c703b862682480a20142250b8c05c081385186cd65009607d059dd772b80ae3cb963010205b054436414808abb0ff237752480a996fb3702d8334fda0bf002bc002fc0488053b5f5380005dc0a1703f03ffdfdc433a6fa010cf1ef4165c831e602b40134844c66e67fa4c1000618e5ab8f6008c03faab7028c9117e0036baf44917035af0e0000000049454e44ae426082950100 SW: 9000, RESP: b1550c68d2a8b426dcf69b8e71f76d195b15cd368207463513fd2dea6648476b2500eb999b6250fa5dc0499e0b88b921f2bbaf782e877588930370724e4d3f0dd01d49dbe7e92cb940423172008f3ed3c6011c03b1396bce6ec24800c703b862682480a20142250b8c05c081385186cd65009607d059dd772b80ae3cb963010205b054436414808abb0ff237752480a996fb3702d8334fda0bf002bc002fc0488053b5f5380005dc0a1703f03ffdfdc433a6fa010cf1ef4165c831e602b40134844c66e67fa4c1000618e5ab8f6008c03faab7028c9117e0036baf44917035af0e0000000049454e44ae426082950100
I think this may not only be constrained to this eUICC example, but in general we should probably keep calling GET RESPONSE
as long as 6100
is returned?
Actions