laforge has submitted this change. (
https://gerrit.osmocom.org/c/pysim/+/36776?usp=email
)
Change subject: filesystem: Enforce lower-case hex AID
......................................................................
filesystem: Enforce lower-case hex AID
our utils.b2h() returns values in lower-case hex string notation,
so let's make sure the CardADF and CardApplication AID values are also
stored in lower case notation, othewise the matching baesd on AIDs
returned from the card will not work, specifically as we use uppercase
AIDs in pySim.euicc for CardApplicationECASD and CardApplicationISDR.
Rather than change those two instances, let's solve it in a generic way.
We already do the same for the CardFile.fid member.
Change-Id: Ie42392412d9eb817fbc563d9165faab198ffa7a9
---
M pySim/filesystem.py
1 file changed, 22 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/pySim/filesystem.py b/pySim/filesystem.py
index 4d5fde9..77482cc 100644
--- a/pySim/filesystem.py
+++ b/pySim/filesystem.py
@@ -512,7 +512,7 @@
super().__init__(**kwargs)
# reference to CardApplication may be set from CardApplication constructor
self.application = None # type: Optional[CardApplication]
- self.aid = aid # Application Identifier
+ self.aid = aid.lower() # Application Identifier
self.has_fs = has_fs # Flag to tell whether the ADF supports a filesystem or
not
mf = self.get_mf()
if mf:
@@ -1294,6 +1294,8 @@
adf : ADF name
sw : Dict of status word conversions
"""
+ if aid:
+ aid = aid.lower()
self.name = name
self.adf = adf
self.sw = sw or {}
--
To view, visit
https://gerrit.osmocom.org/c/pysim/+/36776?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ie42392412d9eb817fbc563d9165faab198ffa7a9
Gerrit-Change-Number: 36776
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged