Change in pysim[master]: filesystem.py: Introduce place-holder for BER-TLV files

laforge gerrit-no-reply at lists.osmocom.org
Thu Apr 22 07:12:39 UTC 2021


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/23852 )


Change subject: filesystem.py: Introduce place-holder for BER-TLV files
......................................................................

filesystem.py: Introduce place-holder for BER-TLV files

I always assumed BER-TLV files are transparent EF with BER-TLV contents.

However, this is wrong. ETS TS 102 221 Section 8.2.2.4 specifies them.

TS 102 221 Section 11.3 describes the specific RETRIEVE DATA, SET DATA
commands, which are not yet implemented in pySim.

Change-Id: Ie4701d9f72b05c8a5810e287e55a20f6ea86a574
---
M pySim/filesystem.py
M pySim/ts_31_103.py
2 files changed, 9 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/52/23852/1

diff --git a/pySim/filesystem.py b/pySim/filesystem.py
index 1068930..dec521e 100644
--- a/pySim/filesystem.py
+++ b/pySim/filesystem.py
@@ -917,7 +917,13 @@
         return b''.join(chunks)
 
 
+class BerTlvEF(TransparentEF):
+    """BER-TLV EF (Entry File) in the smart card filesystem.
+    A BER-TLV EF is a binary file with a BER (Basic Encoding Rules) TLV structure
 
+    NOTE: We currently don't really support those, this class is simply a wrapper
+    around TransparentEF as a place-holder, so we can already define EFs of BER-TLV
+    type without fully supporting them."""
 
 
 class RuntimeState(object):
diff --git a/pySim/ts_31_103.py b/pySim/ts_31_103.py
index baa4d25..d5641b3 100644
--- a/pySim/ts_31_103.py
+++ b/pySim/ts_31_103.py
@@ -146,12 +146,12 @@
         super().__init__(fid=fid, sfid=sfid, name=name, desc=desc)
 
 # TS 31.103 Section 4.2.18
-class EF_IMSConfigData(TransparentEF):
+class EF_IMSConfigData(BerTlvEF):
     def __init__(self, fid='6ff8', sfid=None, name='EF.IMSConfigData', desc='IMS Configuration Data'):
         super().__init__(fid=fid, sfid=sfid, name=name, desc=desc)
 
 # TS 31.103 Section 4.2.19
-class EF_XCAPConfigData(TransparentEF):
+class EF_XCAPConfigData(BerTlvEF):
     def __init__(self, fid='6ffc', sfid=None, name='EF.XCAPConfigData', desc='XCAP Configuration Data'):
         super().__init__(fid=fid, sfid=sfid, name=name, desc=desc)
 
@@ -161,7 +161,7 @@
         super().__init__(fid=fid, sfid=sfid, name=name, desc=desc)
 
 # TS 31.103 Section 4.2.21
-class EF_MuDMiDConfigData(TransparentEF):
+class EF_MuDMiDConfigData(BerTlvEF):
     def __init__(self, fid='6ffe', sfid=None, name='EF.MuDMiDConfigData',
                  desc='MuD and MiD Configuration Data'):
         super().__init__(fid=fid, sfid=sfid, name=name, desc=desc)

-- 
To view, visit https://gerrit.osmocom.org/c/pysim/+/23852
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ie4701d9f72b05c8a5810e287e55a20f6ea86a574
Gerrit-Change-Number: 23852
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210422/56be0fd4/attachment.htm>


More information about the gerrit-log mailing list