fixeria has uploaded this change for review. (
https://gerrit.osmocom.org/c/pysim/+/42375?usp=email )
Change subject: global_platform: fix store_data() returning last chunk only
......................................................................
global_platform: fix store_data() returning last chunk only
The loop builds up `response` across multiple STORE DATA blocks,
but the function returns only `data` - the response from the
*last* block. It should return the accumulated response instead.
Change-Id: I3e15c8004d1e366e8c3896e559656622f48bb1a2
---
M pySim/global_platform/__init__.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/75/42375/1
diff --git a/pySim/global_platform/__init__.py
b/pySim/global_platform/__init__.py
index 232c383..a836134 100644
--- a/pySim/global_platform/__init__.py
+++ b/pySim/global_platform/__init__.py
@@ -585,7 +585,7 @@
data, _sw = self._cmd.lchan.scc.send_apdu_checksw(hdr +
b2h(chunk) + "00")
block_nr += 1
response += data
- return data
+ return bytes.fromhex(response)
put_key_parser = argparse.ArgumentParser()
put_key_parser.add_argument('--old-key-version-nr', type=auto_uint8,
default=0, help='Old Key Version Number')
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42375?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I3e15c8004d1e366e8c3896e559656622f48bb1a2
Gerrit-Change-Number: 42375
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <[email protected]>