pysim/pySim
Philipp Maier 37e57e0c45 filesystem: add attribute "leftpad" to class LinFixedEF
In some cases, the specs do not specify an absolute record length.
Instead there may be only a minimum record length specified. The card
vendor may then chose to use larger record length at will. This usually
is no problem since the data is usually written from the left and the
remaining bytes are padded at the end (right side) of the data. However
in some rare cases (EF.MSISDN, see also 3GPP TS 51.011, section 10.5.5)
the data must be written right-aligned towards the physical record
length. This means that the data is padded from the left in this case.

To fix this: Let's add a "leftpad" flag to LinFixedEF, which we set to
true in those corner cases. The code that updates the record in
commands.py must then check this flag and padd the data accordingly.

Change-Id: I241d9fd656f9064a3ebb4e8e01a52b6b030f9923
Related: OS#5714
2023-09-07 14:19:26 +02:00
..
apdu pySim-trace: mark card reset in the trace 2023-07-28 10:14:19 +02:00
apdu_source pySim-trace: mark card reset in the trace 2023-07-28 10:14:19 +02:00
legacy cards: get rid of method read_iccid 2023-08-21 18:36:10 +00:00
transport pySim/transport: Use newly-defined ResTuple type 2023-07-11 08:42:12 +02:00
__init__.py cosmetic: Switch to consistent four-spaces indent; run autopep8 2022-02-11 13:32:58 +01:00
ara_m.py ARA-M: fix encoding of the PkgRefDO when using aram_store_ref_ar_do 2023-07-29 06:23:15 +00:00
card_handler.py cosmetic: Switch to consistent four-spaces indent; run autopep8 2022-02-11 13:32:58 +01:00
card_key_provider.py cosmetic: Switch to consistent four-spaces indent; run autopep8 2022-02-11 13:32:58 +01:00
cards.py cards: get rid of method read_iccid 2023-08-21 18:36:10 +00:00
cat.py Add TLV definitions for *a lot more* CAT / USAT data objects 2022-08-06 18:56:42 +02:00
cdma_ruim.py Introduce concept of CardProfileAddon 2023-07-12 22:05:14 +02:00
commands.py filesystem: add attribute "leftpad" to class LinFixedEF 2023-09-07 14:19:26 +02:00
construct.py construct: add adapter Utf8Adapter to safely interpret utf8 text 2023-07-26 17:13:54 +02:00
exceptions.py Fix printing of SwMatchError after introduction of logical channels 2022-07-30 16:37:01 +02:00
filesystem.py filesystem: add attribute "leftpad" to class LinFixedEF 2023-09-07 14:19:26 +02:00
global_platform.py GlobalPlatform ADF.SD: Add command line reference + error message 2023-07-11 08:54:04 +02:00
gsm_r.py Introduce concept of CardProfileAddon 2023-07-12 22:05:14 +02:00
gsmtap.py Introduce APDU/TPDU trace decoder 2022-07-23 12:18:57 +02:00
iso7816_4.py cosmetic: Remove extraneous empty lines between spec-section-comment and class 2022-02-14 00:51:27 +01:00
jsonpath.py cosmetic: Switch to consistent four-spaces indent; run autopep8 2022-02-11 13:32:58 +01:00
ota.py Switch from pycryptodome to pycryptodomex 2023-06-05 20:58:11 +02:00
profile.py Introduce concept of CardProfileAddon 2023-07-12 22:05:14 +02:00
runtime.py filesystem: add attribute "leftpad" to class LinFixedEF 2023-09-07 14:19:26 +02:00
sms.py work-around what appears to be a pylint bug 2023-06-27 09:26:28 +02:00
sysmocom_sja2.py move Runtime{State,Lchan} from pySim.filesystem to new pySim.runtime 2023-07-12 22:05:14 +02:00
tlv.py pySim/tlv.py: Fix TLV_IE_Collection from_dict with nested collections 2023-07-11 08:42:12 +02:00
ts_31_102.py Fix the remaining functions using the broken Card.update_ust() call 2023-07-29 06:23:15 +00:00
ts_31_102_telecom.py Reimplement ust_service_activate and ust_service_deactivate for USIM/EF.UST 2023-07-28 15:34:40 +00:00
ts_31_103.py Fix the remaining functions using the broken Card.update_ust() call 2023-07-29 06:23:15 +00:00
ts_31_104.py HPSIM application support 2023-06-06 17:36:39 +02:00
ts_51_011.py filesystem: add attribute "leftpad" to class LinFixedEF 2023-09-07 14:19:26 +02:00
ts_102_221.py ts_102_221: Remove CardProfileUICCSIM 2023-07-12 22:05:14 +02:00
ts_102_222.py ts_102_222: Remove unneeded imports 2023-07-11 08:42:12 +02:00
utils.py utils.py: remove superfluous import from itself 2023-07-29 06:21:54 +00:00