lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

June 2026

  • 1 participants
  • 870 discussions
[S] Change in pysim[master]: personalization audit: optionally audit all (unknown) SD keys
by laforge 19 Jun '26

19 Jun '26
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/40209?usp=email ) Change subject: personalization audit: optionally audit all (unknown) SD keys ...................................................................... personalization audit: optionally audit all (unknown) SD keys By a flag, allow to audit also all Security Domain KVN that we have *not* created ConfigurableParameter subclasses for. For example, SCP80 has reserved kvn 0x01..0x0f, but we offer only Scp80Kvn01, Scp80Kvn02, Scp80Kvn03. So we would not show kvn 0x04..0x0f in an audit. This patch includes audits of all SD key kvn there may be in the UPP. This will help to spot SD keys that may already be present in a UPP template, with unexpected / unusual kvn. Change-Id: Icaf6f7b589f117868633c0968a99f2f0252cf612 Jenkins: skip-card-test --- M pySim/esim/saip/batch.py 1 file changed, 26 insertions(+), 3 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/pySim/esim/saip/batch.py b/pySim/esim/saip/batch.py index a8db5c4..1a2b72e 100644 --- a/pySim/esim/saip/batch.py +++ b/pySim/esim/saip/batch.py @@ -21,10 +21,11 @@ import copy import pprint from typing import Generator, Union -from osmocom.utils import b2h from pySim.esim.saip.personalization import ConfigurableParameter from pySim.esim.saip import param_source -from pySim.esim.saip import ProfileElementSequence +from pySim.esim.saip import ProfileElementSequence, ProfileElementSD +from pySim.global_platform import KeyUsageQualifier +from osmocom.utils import b2h # a list of ConfigurableParameter classes and/or ConfigurableParameter class instances ParamList = list[Union[type[ConfigurableParameter], ConfigurableParameter]] @@ -133,7 +134,7 @@ """ @classmethod - def from_der(cls, der: bytes, params: ParamList, der_size=False): + def from_der(cls, der: bytes, params: ParamList, der_size=False, additional_sd_keys=False): """return a dict of parameter name and set of selected parameter values found in a DER encoded profile. Note: some ConfigurableParameter implementations return more than one key-value pair, for example, Imsi returns both 'IMSI' and 'IMSI-ACC' parameters. @@ -150,6 +151,12 @@ For example, params = [Imsi, ] is equivalent to params = [Imsi(), ]. For der_size=True, also include a {'der_size':12345} entry. + + For additional_sd_keys=True, output also all Security Domain KVN that there are *no* ConfigurableParameter + subclasses for. For example, SCP80 has reserved kvn 0x01..0x0f, but we offer only Scp80Kvn01, Scp80Kvn02, + Scp80Kvn03. So we would not show kvn 0x04..0x0f in an audit. additional_sd_keys=True includes audits of all SD + key KVN there may be in the UPP. This helps to spot SD keys that may already be present in a UPP template, with + unexpected / unusual kvn. """ # make an instance of this class @@ -165,6 +172,22 @@ upp_audit.add_values(valdict) except (TypeError, ValueError) as e: raise ValueError(f'Error during audit for parameter {param}: {e}') from e + + if not additional_sd_keys: + return upp_audit + + # additional_sd_keys + for pe in pes.pe_list: + if pe.type != 'securityDomain': + continue + assert isinstance(pe, ProfileElementSD) + + for key in pe.keys: + audit_key = f'SdKey_KVN{key.key_version_number:02x}_ID{key.key_identifier:02x}' + kuq_bin = KeyUsageQualifier.build(key.key_usage_qualifier).hex() + audit_val = f'{key.key_components=!r} key_usage_qualifier=0x{kuq_bin}={key.key_usage_qualifier!r}' + upp_audit.add_values({audit_key: audit_val}) + return upp_audit def get_single_val(self, key, allow_absent=False, absent_val=None): -- To view, visit https://gerrit.osmocom.org/c/pysim/+/40209?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Icaf6f7b589f117868633c0968a99f2f0252cf612 Gerrit-Change-Number: 40209 Gerrit-PatchSet: 14 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[S] Change in pysim[master]: personalization audit: optionally audit all (unknown) SD keys
by laforge 19 Jun '26

19 Jun '26
Attention is currently required from: fixeria, neels. laforge has posted comments on this change by neels. ( https://gerrit.osmocom.org/c/pysim/+/40209?usp=email ) Change subject: personalization audit: optionally audit all (unknown) SD keys ...................................................................... Patch Set 13: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/40209?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Icaf6f7b589f117868633c0968a99f2f0252cf612 Gerrit-Change-Number: 40209 Gerrit-PatchSet: 13 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Fri, 19 Jun 2026 10:37:46 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in pysim[master]: personalization audit: optionally audit all (unknown) SD keys
by laforge 19 Jun '26

19 Jun '26
Attention is currently required from: fixeria, laforge, neels. laforge has uploaded a new patch set (#13) to the change originally created by neels. ( https://gerrit.osmocom.org/c/pysim/+/40209?usp=email ) The following approvals got outdated and were removed: Code-Review+1 by laforge Change subject: personalization audit: optionally audit all (unknown) SD keys ...................................................................... personalization audit: optionally audit all (unknown) SD keys By a flag, allow to audit also all Security Domain KVN that we have *not* created ConfigurableParameter subclasses for. For example, SCP80 has reserved kvn 0x01..0x0f, but we offer only Scp80Kvn01, Scp80Kvn02, Scp80Kvn03. So we would not show kvn 0x04..0x0f in an audit. This patch includes audits of all SD key kvn there may be in the UPP. This will help to spot SD keys that may already be present in a UPP template, with unexpected / unusual kvn. Change-Id: Icaf6f7b589f117868633c0968a99f2f0252cf612 Jenkins: skip-card-test --- M pySim/esim/saip/batch.py 1 file changed, 26 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/09/40209/13 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/40209?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Icaf6f7b589f117868633c0968a99f2f0252cf612 Gerrit-Change-Number: 40209 Gerrit-PatchSet: 13 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[M] Change in pysim[master]: personalization: implement UppAudit and BatchAudit
by laforge 19 Jun '26

19 Jun '26
Attention is currently required from: fixeria, neels. laforge has posted comments on this change by neels. ( https://gerrit.osmocom.org/c/pysim/+/40208?usp=email ) Change subject: personalization: implement UppAudit and BatchAudit ...................................................................... Patch Set 11: Code-Review+2 (1 comment) File pySim/esim/saip/batch.py: https://gerrit.osmocom.org/c/pysim/+/40208/comment/12f10cce_5853678a?usp=em… : PS11, Line 143: {'001010000000023'} > I follow your conclusions, but there is one initial assumption that I'd like to clarify: […] Ok, I failed to realize the "safe-ness" of the code as-is in presence of multiple different IMSI instances, thanks for pointing that out. So we can merge it as-is for now. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/40208?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Iaab336ca91b483ecdddd5c6c8e08dc475dc6bd0a Gerrit-Change-Number: 40208 Gerrit-PatchSet: 11 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Fri, 19 Jun 2026 10:37:22 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de> Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
1 0
0 0
[XL] Change in pysim[master]: generate sdkey classes from a list
by neels 18 Jun '26

18 Jun '26
Attention is currently required from: fixeria. neels has posted comments on this change by neels. ( https://gerrit.osmocom.org/c/pysim/+/41771?usp=email ) Change subject: generate sdkey classes from a list ...................................................................... Patch Set 9: (2 comments) File pySim/esim/saip/personalization.py: https://gerrit.osmocom.org/c/pysim/+/41771/comment/9cc22dc1_3bdc3d0a?usp=em… : PS7, Line 653: reserved_kvn = tuple() > This is defined but never used anywhere? I guess we can drop it then, cruft from an earlier patch version? https://gerrit.osmocom.org/c/pysim/+/41771/comment/d6dc317d_985afb28?usp=em… : PS7, Line 694: NO_OP = (('', {})) > Likewise, defined but not used. we can drop it, this is definitely cruft from an earlier patch version. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/41771?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ic92ddea6e1fad8167ea75baf78ffc3eb419838c4 Gerrit-Change-Number: 41771 Gerrit-PatchSet: 9 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Thu, 18 Jun 2026 13:30:19 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[M] Change in pysim[master]: personalization: implement UppAudit and BatchAudit
by neels 18 Jun '26

18 Jun '26
Attention is currently required from: fixeria, laforge. neels has posted comments on this change by neels. ( https://gerrit.osmocom.org/c/pysim/+/40208?usp=email ) Change subject: personalization: implement UppAudit and BatchAudit ...................................................................... Patch Set 11: (1 comment) File pySim/esim/saip/batch.py: https://gerrit.osmocom.org/c/pysim/+/40208/comment/2682c181_b25146ad?usp=em… : PS11, Line 143: {'001010000000023'} > Just to clarify: I think it's fine to not support multiple USIM NAA and/or multipel ISIM NAA for now […] I follow your conclusions, but there is one initial assumption that I'd like to clarify: "our code should be safe. So if we do not support multiple USIM NAAs or multiple ISIM NAAs from the audit code (or any other part of the code), it should safely abort and refuse to proceed with such a PESequence as input data" The audit code is safe in this way, because it does support multiple occurences. Use cases in pseudo code: UPP{ usim: {imsi: 1234} } --audit--> {IMSI: {1234}} UPP{ usim: {imsi: 1234}, isim: {imsi: 1234} } --audit--> {IMSI: {1234}} UPP{ usim: {imsi: 1234}, isim: {imsi: 1234}, usim2: {imsi: 5678}, isim2: {imsi: 5678}} --audit--> {IMSI: {1234, 5678}} (caller decides about expecting two IMSIs or not) So code that is handling multiple USIM NAAs would expect both IMSIs in the resulting set. The audit would not indicate which IMSI is where exactly, but the aim of BatchAudit is to simplify. If we add an exception as discussed, the last example would not return any result but raise an exception saying "multiple USIM NAAs are not supported". That change would reduce current usefulness, and the code raising the exception would also be a side island of code that has to specifically detect that situation -- it would not arise naturally from the code paths. So, we are now deciding in this patch, to which level of detail the audit result returns its info. It's at this point not about preventing crashes from situations we don't support, because i expect no crashes in any use cases. I can understand that it may be useful to get an indication of where specific data was read from. Currently there is no caller that needs to know this, so I am merely guessing about use cases you have in mind. (IOW, all current callers would ignore the source indication and would always collapse to a single set() before evaluating.) So, what is the next thing that should happen in this patch? IIUC I can make a decision to leave the patch as-is, or to change the set() of values to a dict that has a place to indicate the source of the data? Instead of inventing an xpath like syntax now, I would just put an empty placeholder for future expansion, because there are currently no use cases for it -- so that we can implement a path syntax when we know what exactly the place indication needs to indicate in order to be useful. It may boil down to only a comment: "callers must check via isinstance() whether the result is a set() or a dict()", just to open up a path to future expansion. In summary, I am unfortunately still convinced that the way the current patch returns multiple occurences is a good simplification that matches the use cases well -- "unfortunately" because I am trying to agree in order to reach a conclusion but the logic doesn't match up from my POV. (BTW the argument I make about "this code is already used in production" is more like: "i've already played through all code paths end-to-end such that i have a clear picture of what we need this code to do, and thus i found what i believe is the optimal balance of detail and simplicity. The way this works has helped super well in various situations. I've found and fixed numerous UPP bugs with this: it is stable and useful. If i wrote it from scratch i would end up with exactly the same patch." I am very happy to completely overhaul this code, and then adjust the production code -- if there is an actual use case that i missed.) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/40208?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Iaab336ca91b483ecdddd5c6c8e08dc475dc6bd0a Gerrit-Change-Number: 40208 Gerrit-PatchSet: 11 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Thu, 18 Jun 2026 13:28:24 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de> Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: CCID: Check if reader times out while expecting status words
by laforge 18 Jun '26

18 Jun '26
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42799?usp=email ) Change subject: CCID: Check if reader times out while expecting status words ...................................................................... CCID: Check if reader times out while expecting status words A case 1 APDU is sent toward the reader. The reader expects two status words. If none of these are sent by the SIM the reader must timeout and send an error message back to the host. Change-Id: I054b56a9e2f10e5b984ad0398efb4be5696ce16c --- M ccid/CCID_Tests.ttcn 1 file changed, 35 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/ccid/CCID_Tests.ttcn b/ccid/CCID_Tests.ttcn index a637d10..a06c878 100644 --- a/ccid/CCID_Tests.ttcn +++ b/ccid/CCID_Tests.ttcn @@ -1011,6 +1011,40 @@ f_start_and_wait(); } +/* The SIM does not send the expected status words. */ +private function f_TC_status_word_timeout() runs on CardemSlot_CT +{ + var octetstring req := c_UICC_MANAGE_CHANNEL; + var CCID_PDU ccid_pdu; + + f_cardem_manager(); + + f_ccid_power_on(CCID_PWRSEL_3V0); + + /* Send a request towards reader. */ + CCID.send(ts_CCID_XfrBlock(g_slot_nr, req, 0)); + /* Receive the request by SIM. */ + f_cardem_receive(tr_SIMTRACE_CEMU_RX_DATA(?, req)); + /* Receive the response from reader. */ + ccid_pdu := f_ccid_receive(tr_CCID_DataBlock(g_slot_nr, ?, ?, ?)); + if (ccid_pdu.hdr_in.bError != CCID_ERR_ICC_MUTE) { + setverdict(fail, "Unexpected Response or error code"); + mtc.stop; + } + + /* Stop simtrace emulation, to prevent race condition. */ + vc_Cardem.stop; + vc_Cardem.done; +} +testcase TC_status_word_timeout() runs on Test_CT +{ + f_init(); + + f_start_handler(refers(f_TC_status_word_timeout), mp_simtrace_slot, true); + + f_start_and_wait(); +} + /* TODO */ /* IccPowerOn with wrong voltage (> 0x04) */ @@ -1058,6 +1092,7 @@ execute( TC_truncated() ); execute( TC_truncated_response() ); execute( TC_empty_slot() ); + execute( TC_status_word_timeout() ); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42799?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I054b56a9e2f10e5b984ad0398efb4be5696ce16c Gerrit-Change-Number: 42799 Gerrit-PatchSet: 5 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: CCID: Check if reader times out while expecting status words
by laforge 18 Jun '26

18 Jun '26
Attention is currently required from: Hoernchen, jolly. laforge has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42799?usp=email ) Change subject: CCID: Check if reader times out while expecting status words ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42799?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I054b56a9e2f10e5b984ad0398efb4be5696ce16c Gerrit-Change-Number: 42799 Gerrit-PatchSet: 5 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Comment-Date: Thu, 18 Jun 2026 12:28:23 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in osmo-ttcn3-hacks[master]: CCID: Add testenv.cfg to run tests using testenv
by laforge 18 Jun '26

18 Jun '26
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42827?usp=email ) ( 2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: CCID: Add testenv.cfg to run tests using testenv ...................................................................... CCID: Add testenv.cfg to run tests using testenv Change-Id: I97c9da414facf438aa28d5200c4152730ff763a2 --- A ccid/testenv.cfg 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/ccid/testenv.cfg b/ccid/testenv.cfg new file mode 100644 index 0000000..a895ff3 --- /dev/null +++ b/ccid/testenv.cfg @@ -0,0 +1,5 @@ +[testsuite] +program=CCID_Tests +config=CCID_Tests.cfg +podman_extra=--volume /dev/bus/usb:/dev/bus/usb + -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42827?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I97c9da414facf438aa28d5200c4152730ff763a2 Gerrit-Change-Number: 42827 Gerrit-PatchSet: 4 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: CCID: Check response of reader with empty SIM carrier
by laforge 18 Jun '26

18 Jun '26
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42805?usp=email ) Change subject: CCID: Check response of reader with empty SIM carrier ...................................................................... CCID: Check response of reader with empty SIM carrier The reader has a SIM carrier inserted, but there is no response from the SIM while expecting the ATR. The reader will get a timeout and is expected to respond with a suitable error code. The test uses the slot with the SIMtrace inserted. The SIMtrace will not respond with an ATR. This way there is no (extra) empty slot required for this test. Change-Id: Ifebdcce8f9dd9a51de5a5cb6cf223041d5c38622 --- M ccid/CCID_Tests.ttcn 1 file changed, 41 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/ccid/CCID_Tests.ttcn b/ccid/CCID_Tests.ttcn index 8184bf3..a637d10 100644 --- a/ccid/CCID_Tests.ttcn +++ b/ccid/CCID_Tests.ttcn @@ -971,11 +971,49 @@ f_start_and_wait(); } +/* The SIM slot is empty, but closed. There is no ATR received. */ +private function f_TC_empty_slot() runs on CardemSlot_CT +{ + var octetstring req := c_SIM_SELECT_EF_ICCID; + var octetstring res := '9000'O; + var CCID_PDU ccid_pdu; + var CCID_PDU par; + + /* Do not start SIM emulation, so there is no ATR. */ + f_cardem_transmit(ts_SIMTRACE_CEMU_SET_ATR(''O)); + f_sleep(0.2); + + f_ccid_power_on(CCID_PWRSEL_3V0, tr_CCID_HeaderIN_FAIL(CCID_ERR_ICC_MUTE, CCID_ICC_STATUS_PRES_INACT)); + + /* Send a request towards reader. */ + CCID.send(ts_CCID_XfrBlock(g_slot_nr, req, 0)); + /* Receive the response from reader. */ + ccid_pdu := f_ccid_receive(tr_CCID_DataBlock(g_slot_nr, ?, ?, ?)); + if (ccid_pdu.hdr_in.bError != CCID_ERR_CMD_NOT_SUPPORTED) { + setverdict(fail, "Unexpected Response or error code"); + mtc.stop; + } + /* Send GetParameters on empty slot. */ + par := f_ccid_get_par(); + log(par); + // FIXME: check result code + + /* Stop simtrace emulation, to prevent race condition. */ + vc_Cardem.stop; + vc_Cardem.done; +} +testcase TC_empty_slot() runs on Test_CT +{ + f_init(); + + f_start_handler(refers(f_TC_empty_slot), mp_simtrace_slot, true); + + f_start_and_wait(); +} + /* TODO */ /* IccPowerOn with wrong voltage (> 0x04) */ -/* XfrBlock on empty slot */ -/* GetParameters on empty slot */ /* SetParameters for bProtocolNum > 0x01 */ /* SetParameters: invalid parameters */ /* set unsupported frequency */ @@ -1019,6 +1057,7 @@ execute( TC_unsupp_secure() ); execute( TC_truncated() ); execute( TC_truncated_response() ); + execute( TC_empty_slot() ); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42805?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ifebdcce8f9dd9a51de5a5cb6cf223041d5c38622 Gerrit-Change-Number: 42805 Gerrit-PatchSet: 5 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • ...
  • 87
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.