mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-10-29 20:15:43 +03:00
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
This commit is contained in:
1 parent
1d1ba8e4cc
commit
57df6f6e68
1 file changed
+3
-1
+3
-1
@@ -512,7 +512,7 @@ class CardADF(CardDF):
|
||||
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 @@ class CardApplication:
|
||||
adf : ADF name
|
||||
sw : Dict of status word conversions
|
||||
"""
|
||||
if aid:
|
||||
aid = aid.lower()
|
||||
self.name = name
|
||||
self.adf = adf
|
||||
self.sw = sw or {}
|
||||
|
||||
Reference in new issue
Block a user