From a823ce89f6c79f4212e7cf52655e88cf38570eee Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 26 May 2024 10:45:06 +0200 Subject: [PATCH] pySim/commands: STATUS: Use indeterminate length Le/P3 == '00' Let's have the card tell us what the length is by indicating '00' instead of stating 'FF'. This is better aligned with general practice and won't break assumptions in other parts of the code like SCP transport. Change-Id: Ied63c6e1970e3dfc675da5e5f94579fbb06fea51 --- pySim/commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pySim/commands.py b/pySim/commands.py index 7b21fafd..c0ac1d70 100644 --- a/pySim/commands.py +++ b/pySim/commands.py @@ -618,7 +618,7 @@ class SimCardCommands: def status(self) -> ResTuple: """Execute a STATUS command as per TS 102 221 Section 11.1.2.""" - return self.send_apdu_checksw(self.cla4lchan('80') + 'F20000ff') + return self.send_apdu_checksw(self.cla4lchan('80') + 'F2000000') def deactivate_file(self) -> ResTuple: """Execute DECATIVATE FILE command as per TS 102 221 Section 11.1.14."""