contrib/smpp-ota-tool: warn about mixed up KIC/KIC indexes
Cards usually have multiple sets of KIC, KID (and KIK). The keys are selected through an index. However, mixing keys from different sets is concidered as a security violation and cards should reject such configurations.
Let's print a warning to make users aware that something is off.
(normally KID index and KIC index should be the same since mixing keys is a concidered as a security violation. However, in this tool we want to allow users to specify different indexes for KIC and KIC so that they can make tests to make sure their cards correctly reject mixed up key indexes)
pySim-shell_test/euicc: ensure test-profile is enabled
When testing commands like get_profile_info, enable_profile, disable_profile or the commands to manage notifications, we should ensure that the correct profile is enabled before executing the actual testcase.
The class Iccid uses a BcdAdapter to encoded/decode the ICCID. This works fine for ICCIDs that have an even (20) number of digits. In case the digit count is odd (19), the ICCID the last digit requires padding.
Let's switch to PaddedBcdAdapter for encoding/decoding, to ensure that odd-length ICCIDs are padded automatically.
compile_asn1_subdir: filter compiled files by .asn suffix
When I open the .asn file in vim, pySim should not attempt to read the vim .swp file as asn.1.
File "/home/moi/osmo-dev/src/pysim/pySim/esim/saip/__init__.py", line 45, in <module> asn1 = compile_asn1_subdir('saip') [...] File "<frozen codecs>", line 325, in decode UnicodeDecodeError: 'utf-8' codec can't decode byte 0xad in position 21: invalid start byte
unfortunately the API changes introduced in change
I277aa90fddb5171c4bf6c3436259aa371d30d092
broke the API interface of http_json_api.py. This was taken into account and necessary to introduce add the server functionality next to the already existing client functionality. The changes to the API were minimal and all code locations that use http_json_api.py were re-aligned.
Unfortunately it was not clear at this point in time that there are out-of-tree projects that could be affected by API changes in http_json_api.py
To mitigate the problem this patch introduces an alternative API interface to the JsonHttpApiFunction base class. This alternative API interface works like the old API interface when the class is instantiated in the original way. To make use of the revised client the API use has to pass an additional keyword argument that defines the role.
pySim/esim/saip/__init__.py:docstring of pySim.esim.saip.FsNode.walk:1: WARNING: Inline strong start-string without end-string. [docutils] pySim/esim/saip/__init__.py:docstring of pySim.esim.saip.FsNodeDF.walk:1: WARNING: Inline strong start-string without end-string. [docutils]
At the moment pySim.ota codebase is not covered by any of the integration tests (we have only normal unittests so far). To increase the test coverage, let's add an integration test that sends exchanges an RFM OTA-SMS with a real-world card.
However, there is no tool avaliable that can be used as an SMPP client for pySim-smpp2sim yet. Let's use smpp_ota_apdu2.py on laforge/ota to develop a tool that we can use to exchange SMS-TPDUs that contain remote APDU scripts (RFM/RAM).
Finally let's use the tool we have created as a basis to create an integration test that exchanges an SMS-TPDU with the RFM application of a sysmoISIM-SJA5 card. The testcase shall pass when we get the expected response from the card.