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 -----
  • December
  • 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

August 2024

  • 1 participants
  • 1478 discussions
[M] Change in pysim[master]: pySim-shell: rework startup procedure and introduce non interactive mode
by dexter 28 Aug '24

28 Aug '24
Attention is currently required from: laforge. Hello Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/37932?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Code-Review+1 by laforge, Verified+1 by Jenkins Builder Change subject: pySim-shell: rework startup procedure and introduce non interactive mode ...................................................................... pySim-shell: rework startup procedure and introduce non interactive mode When pySim-shell is used in a scripted environment, we may easily get trapped in the pySim-shell prompt. This may happen in particular in case the script file is not executed due to problem with the reader initialization. In such a case pySim-shell will not exit automatically and the shellscript that was calling pySim-shell will stall indefinetly. To make the use of pySim-shell more reliable in scripted environments, let's add a --noprompt option that ensures the interactive mode is never entered. Let's also exit with an appropriate return code in case of initialization errors, so that the calling script can know that something went wrong. Related: OS#6531 Change-Id: I07ecb27b37e2573629981a0d032cc95cd156be7e --- M pySim-shell.py 1 file changed, 36 insertions(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/32/37932/2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37932?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: I07ecb27b37e2573629981a0d032cc95cd156be7e Gerrit-Change-Number: 37932 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org>
1 0
0 0
[XS] Change in pysim[master]: scp: fix key length in dek_encrypt and dek_decrypt
by dexter 28 Aug '24

28 Aug '24
Attention is currently required from: laforge. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/37931?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: scp: fix key length in dek_encrypt and dek_decrypt ...................................................................... scp: fix key length in dek_encrypt and dek_decrypt When creating the DES cipher object with DES.new, we use the property card_keys.dek. This property may hold a 16 byte key, but DES uses an 8 byte key (56 bit + 8 bit integrity). Pycryptodome does not automatically ignore excess key bytes. Instead it throws an exception. This means we need to make sure to supply only the first 8 bytes of card_keys.dek See also: https://pycryptodome.readthedocs.io/en/latest/src/cipher/des.html Related: OS#6531 Change-Id: I92e0dc6a6196b532bd8b53fca7b9e78070d6903f --- M pySim/global_platform/scp.py 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/31/37931/2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37931?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: I92e0dc6a6196b532bd8b53fca7b9e78070d6903f Gerrit-Change-Number: 37931 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org>
1 0
0 0
[M] Change in pysim[master]: pySim-shell: rework startup procedure and introduce non interactive mode
by dexter 28 Aug '24

28 Aug '24
Attention is currently required from: laforge. dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/37932?usp=email ) Change subject: pySim-shell: rework startup procedure and introduce non interactive mode ...................................................................... Patch Set 2: (1 comment) Patchset: PS1: > I would prefer something like --nointeractive or --noprompt over --headless, but I guess those are s […] I think --noprompt is also fine -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37932?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: I07ecb27b37e2573629981a0d032cc95cd156be7e Gerrit-Change-Number: 37932 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Wed, 28 Aug 2024 12:48:55 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
1 0
0 0
[M] Change in pysim[master]: ara_m: use class byte of current lchan
by dexter 28 Aug '24

28 Aug '24
Attention is currently required from: fixeria, laforge. dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/37840?usp=email ) Change subject: ara_m: use class byte of current lchan ...................................................................... Patch Set 9: (1 comment) Patchset: PS6: > I have now reviewed the code locations where we call send_apdu* methods. […] Done -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37840?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: Ie3e48678f178a488bfaea6cc2b9a3e18145a8d10 Gerrit-Change-Number: 37840 Gerrit-PatchSet: 9 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Wed, 28 Aug 2024 12:09:35 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
1 0
0 0
[XS] Change in pysim[master]: global_platform: use scp_key_identity ICCID for ADF.ISD
by dexter 28 Aug '24

28 Aug '24
dexter has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/37919?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: global_platform: use scp_key_identity ICCID for ADF.ISD ...................................................................... global_platform: use scp_key_identity ICCID for ADF.ISD Related: OS#6531 Change-Id: I73a6f7088321a2b703074aa5228910709050cab2 --- M pySim/global_platform/__init__.py 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/pySim/global_platform/__init__.py b/pySim/global_platform/__init__.py index ecdc6b3..308a32a 100644 --- a/pySim/global_platform/__init__.py +++ b/pySim/global_platform/__init__.py @@ -894,6 +894,7 @@ # application using '00a4040000' and then parse the response FCI to get the ISD AID def __init__(self, aid='a000000003000000'): super().__init__(aid=aid, name='ADF.ISD', desc='Issuer Security Domain') + self.adf.scp_key_identity = 'ICCID' #class CardProfileGlobalPlatform(CardProfile): # ORDER = 23 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37919?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: I73a6f7088321a2b703074aa5228910709050cab2 Gerrit-Change-Number: 37919 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1 0
0 0
[XS] Change in pysim[master]: global_platform: fix help description for establish_scp03
by dexter 28 Aug '24

28 Aug '24
dexter has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/37918?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: global_platform: fix help description for establish_scp03 ...................................................................... global_platform: fix help description for establish_scp03 The argument parser object for establish_scp03 (est_scp03_parser) is copied from est_scp02_parser. This object still has the .description property set, which is the description for establish_scp02. To get the description string that is defined in do_establish_scp03, we must remove the old description string first. Related: OS#6531 Change-Id: Ibb26bddf88b2e644a7f0c6b2a06bde228aa8afc7 --- M pySim/global_platform/__init__.py 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/pySim/global_platform/__init__.py b/pySim/global_platform/__init__.py index 075a189..ecdc6b3 100644 --- a/pySim/global_platform/__init__.py +++ b/pySim/global_platform/__init__.py @@ -830,6 +830,7 @@ self._establish_scp(scp02, host_challenge, opts.security_level) est_scp03_parser = deepcopy(est_scp02_parser) + est_scp03_parser.description = None est_scp03_parser.add_argument('--s16-mode', action='store_true', help='S16 mode (S8 is default)') @cmd2.with_argparser(est_scp03_parser) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37918?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: Ibb26bddf88b2e644a7f0c6b2a06bde228aa8afc7 Gerrit-Change-Number: 37918 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1 0
0 0
[S] Change in pysim[master]: commands: get rid of cla4lchan
by dexter 28 Aug '24

28 Aug '24
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/37936?usp=email ) Change subject: commands: get rid of cla4lchan ...................................................................... commands: get rid of cla4lchan The send_apdu* methods now support lchan patching, so there is no longer a need for computing the class byte manually (which is prone get forgotten) before calling a send_apdu*. It is now enough to supply an APDU that has a class byte with the default channel selected. This also means we do not need cla4lchan anymore, so let's restruture the code and get rid of it completely. Related: OS#6531 Change-Id: Ia795f3c16a8875484fce3b44e61497d5aa52b447 --- M pySim/commands.py M pySim/euicc.py 2 files changed, 11 insertions(+), 24 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/36/37936/1 diff --git a/pySim/commands.py b/pySim/commands.py index 3a7fe47..9e231f1 100644 --- a/pySim/commands.py +++ b/pySim/commands.py @@ -81,8 +81,8 @@ @property def cla_byte(self) -> Hexstr: - """Return the (cached) patched default CLA byte for this card.""" - return self._cla4lchan + """Return the lchan patched default CLA value for this card.""" + return cla_with_lchan(self._cla_byte, self.lchan_nr) @property def max_cmd_len(self) -> int: @@ -96,19 +96,6 @@ def cla_byte(self, new_val: Hexstr): """Set the (raw, without lchan) default CLA value for this card.""" self._cla_byte = new_val - # compute cached result - self._cla4lchan = cla_with_lchan(self._cla_byte, self.lchan_nr) - - def cla4lchan(self, cla: Hexstr) -> Hexstr: - """Compute the lchan-patched value of the given CLA value. If no CLA - value is provided as argument, the lchan-patched version of the SimCardCommands._cla_byte - value is used. Most commands will use the latter, while some wish to override it and - can pass it as argument here.""" - if not cla: - # return cached result to avoid re-computing this over and over again - return self._cla4lchan - else: - return cla_with_lchan(cla, self.lchan_nr) def send_apdu(self, pdu: Hexstr, apply_lchan:bool = True) -> ResTuple: """Sends an APDU and auto fetch response data @@ -122,7 +109,7 @@ sw : string (in hex) of status word (ex. "9000") """ if apply_lchan: - pdu = self.cla4lchan(pdu[0:2]) + pdu[2:] + pdu = cla_with_lchan(pdu[0:2], self.lchan_nr) + pdu[2:] if self.scp: return self.scp.send_apdu_wrapper(self._tp.send_apdu, pdu) else: @@ -142,7 +129,7 @@ sw : string (in hex) of status word (ex. "9000") """ if apply_lchan: - pdu = self.cla4lchan(pdu[0:2]) + pdu[2:] + pdu = cla_with_lchan(pdu[0:2], self.lchan_nr) + pdu[2:] if self.scp: return self.scp.send_apdu_wrapper(self._tp.send_apdu_checksw, pdu, sw) else: @@ -517,9 +504,9 @@ # TS 102 221 Section 11.3.1 low-level helper def _retrieve_data(self, tag: int, first: bool = True) -> ResTuple: if first: - pdu = self.cla4lchan('80') + 'cb008001%02x' % (tag) + pdu = '80cb008001%02x' % (tag) else: - pdu = self.cla4lchan('80') + 'cb000000' + pdu = '80cb000000' return self.send_apdu_checksw(pdu) def retrieve_data(self, ef: Path, tag: int) -> ResTuple: @@ -549,7 +536,7 @@ p1 = 0x00 if isinstance(data, (bytes, bytearray)): data = b2h(data) - pdu = self.cla4lchan('80') + 'db00%02x%02x%s' % (p1, len(data)//2, data) + pdu = '80db00%02x%02x%s' % (p1, len(data)//2, data) return self.send_apdu_checksw(pdu) def set_data(self, ef, tag: int, value: str, verify: bool = False, conserve: bool = False) -> ResTuple: @@ -592,7 +579,7 @@ if len(rand) != 32: raise ValueError('Invalid rand') self.select_path(['3f00', '7f20']) - return self.send_apdu_checksw(self.cla4lchan('a0') + '88000010' + rand, sw='9000') + return self.send_apdu_checksw('a088000010' + rand, sw='9000') def authenticate(self, rand: Hexstr, autn: Hexstr, context: str = '3g') -> ResTuple: """Execute AUTHENTICATE (USIM/ISIM). @@ -625,7 +612,7 @@ def status(self) -> ResTuple: """Execute a STATUS command as per TS 102 221 Section 11.1.2.""" - return self.send_apdu_checksw(self.cla4lchan('80') + 'F2000000') + return self.send_apdu_checksw('80F2000000') def deactivate_file(self) -> ResTuple: """Execute DECATIVATE FILE command as per TS 102 221 Section 11.1.14.""" @@ -645,7 +632,7 @@ def resize_file(self, payload: Hexstr) -> ResTuple: """Execute RESIZE FILE command as per TS 102 222 Section 6.10""" - return self.send_apdu_checksw(self.cla4lchan('80') + 'd40000%02x%s' % (len(payload)//2, payload)) + return self.send_apdu_checksw('80d40000%02x%s' % (len(payload)//2, payload)) def delete_file(self, fid: Hexstr) -> ResTuple: """Execute DELETE FILE command as per TS 102 222 Section 6.4""" diff --git a/pySim/euicc.py b/pySim/euicc.py index d0cb682..8bd1ae4 100644 --- a/pySim/euicc.py +++ b/pySim/euicc.py @@ -322,7 +322,7 @@ def store_data(scc: SimCardCommands, tx_do: Hexstr, exp_sw: SwMatchstr ="9000") -> Tuple[Hexstr, SwHexstr]: """Perform STORE DATA according to Table 47+48 in Section 5.7.2 of SGP.22. Only single-block store supported for now.""" - capdu = '%sE29100%02x%s' % (scc.cla4lchan('80'), len(tx_do)//2, tx_do) + capdu = '80E29100%02x%s' % (len(tx_do)//2, tx_do) return scc.send_apdu_checksw(capdu, exp_sw) @staticmethod -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37936?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ia795f3c16a8875484fce3b44e61497d5aa52b447 Gerrit-Change-Number: 37936 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
1 0
0 0
[S] Change in pysim[master]: commands: avoid double lchan patching
by dexter 28 Aug '24

28 Aug '24
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/37937?usp=email ) Change subject: commands: avoid double lchan patching ...................................................................... commands: avoid double lchan patching The SimCardCommands has a cla_byte @property method, which automatically returns the lchan patched CLA byte. Since we use cla_byte property to build the UICC command APDUs inside SimCardCommands, we do not need to patch the CLA byte again in the send_apdu* methods. This patch is more or less cosmetic since double patching the CLA byte does not cause any problems. Related: OS#6531 Change-Id: I420f8a5f7ff8d9e5ef94d6519fb3716d6c7caf64 --- M pySim/commands.py 1 file changed, 22 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/37/37937/1 diff --git a/pySim/commands.py b/pySim/commands.py index 9e231f1..d8165af 100644 --- a/pySim/commands.py +++ b/pySim/commands.py @@ -257,7 +257,7 @@ if not isinstance(dir_list, list): dir_list = [dir_list] for i in dir_list: - data, sw = self.send_apdu(self.cla_byte + "a4" + self.sel_ctrl + "02" + i) + data, sw = self.send_apdu(self.cla_byte + "a4" + self.sel_ctrl + "02" + i, apply_lchan = False) rv.append((data, sw)) if sw != '9000': return rv @@ -287,11 +287,11 @@ fid : file identifier as hex string """ - return self.send_apdu_checksw(self.cla_byte + "a4" + self.sel_ctrl + "02" + fid) + return self.send_apdu_checksw(self.cla_byte + "a4" + self.sel_ctrl + "02" + fid, apply_lchan = False) def select_parent_df(self) -> ResTuple: """Execute SELECT to switch to the parent DF """ - return self.send_apdu_checksw(self.cla_byte + "a4030400") + return self.send_apdu_checksw(self.cla_byte + "a4030400", apply_lchan = False) def select_adf(self, aid: Hexstr) -> ResTuple: """Execute SELECT a given Applicaiton ADF. @@ -301,7 +301,7 @@ """ aidlen = ("0" + format(len(aid) // 2, 'x'))[-2:] - return self.send_apdu_checksw(self.cla_byte + "a4" + "0404" + aidlen + aid) + return self.send_apdu_checksw(self.cla_byte + "a4" + "0404" + aidlen + aid, apply_lchan = False) def read_binary(self, ef: Path, length: int = None, offset: int = 0) -> ResTuple: """Execute READD BINARY. @@ -326,7 +326,7 @@ pdu = self.cla_byte + \ 'b0%04x%02x' % (offset + chunk_offset, chunk_len) try: - data, sw = self.send_apdu_checksw(pdu) + data, sw = self.send_apdu_checksw(pdu, apply_lchan = False) except Exception as e: e.add_note('failed to read (offset %d)' % offset) raise e @@ -386,7 +386,7 @@ 'd6%04x%02x' % (offset + chunk_offset, chunk_len) + \ data[chunk_offset*2: (chunk_offset+chunk_len)*2] try: - chunk_data, chunk_sw = self.send_apdu_checksw(pdu) + chunk_data, chunk_sw = self.send_apdu_checksw(pdu, apply_lchan = False) except Exception as e: e.add_note('failed to write chunk (chunk_offset %d, chunk_len %d)' % (chunk_offset, chunk_len)) raise e @@ -406,7 +406,7 @@ r = self.select_path(ef) rec_length = self.__record_len(r) pdu = self.cla_byte + 'b2%02x04%02x' % (rec_no, rec_length) - return self.send_apdu_checksw(pdu) + return self.send_apdu_checksw(pdu, apply_lchan = False) def __verify_record(self, ef: Path, rec_no: int, data: str): """Verify record against given data @@ -469,7 +469,7 @@ pass pdu = (self.cla_byte + 'dc%02x04%02x' % (rec_no, rec_length)) + data - res = self.send_apdu_checksw(pdu) + res = self.send_apdu_checksw(pdu, apply_lchan = False) if verify: self.__verify_record(ef, rec_no, data) return res @@ -579,7 +579,7 @@ if len(rand) != 32: raise ValueError('Invalid rand') self.select_path(['3f00', '7f20']) - return self.send_apdu_checksw('a088000010' + rand, sw='9000') + return self.send_apdu_checksw('a088000010' + rand, sw='9000', apply_lchan = False) def authenticate(self, rand: Hexstr, autn: Hexstr, context: str = '3g') -> ResTuple: """Execute AUTHENTICATE (USIM/ISIM). @@ -603,7 +603,7 @@ else: raise ValueError("Unsupported context '%s'" % context) (data, sw) = self.send_apdu_constr_checksw( - self.cla_byte, '88', '00', p2, AuthCmd3G, cmd_data, AuthResp3G) + self.cla_byte, '88', '00', p2, AuthCmd3G, cmd_data, AuthResp3G, apply_lchan = False) if 'auts' in data: ret = {'synchronisation_failure': data} else: @@ -624,11 +624,11 @@ Args: fid : file identifier as hex string """ - return self.send_apdu_checksw(self.cla_byte + '44000002' + fid) + return self.send_apdu_checksw(self.cla_byte + '44000002' + fid, apply_lchan = False) def create_file(self, payload: Hexstr) -> ResTuple: """Execute CREEATE FILE command as per TS 102 222 Section 6.3""" - return self.send_apdu_checksw(self.cla_byte + 'e00000%02x%s' % (len(payload)//2, payload)) + return self.send_apdu_checksw(self.cla_byte + 'e00000%02x%s' % (len(payload)//2, payload), apply_lchan = False) def resize_file(self, payload: Hexstr) -> ResTuple: """Execute RESIZE FILE command as per TS 102 222 Section 6.10""" @@ -636,19 +636,19 @@ def delete_file(self, fid: Hexstr) -> ResTuple: """Execute DELETE FILE command as per TS 102 222 Section 6.4""" - return self.send_apdu_checksw(self.cla_byte + 'e4000002' + fid) + return self.send_apdu_checksw(self.cla_byte + 'e4000002' + fid, apply_lchan = False) def terminate_df(self, fid: Hexstr) -> ResTuple: """Execute TERMINATE DF command as per TS 102 222 Section 6.7""" - return self.send_apdu_checksw(self.cla_byte + 'e6000002' + fid) + return self.send_apdu_checksw(self.cla_byte + 'e6000002' + fid, apply_lchan = False) def terminate_ef(self, fid: Hexstr) -> ResTuple: """Execute TERMINATE EF command as per TS 102 222 Section 6.8""" - return self.send_apdu_checksw(self.cla_byte + 'e8000002' + fid) + return self.send_apdu_checksw(self.cla_byte + 'e8000002' + fid, apply_lchan = False) def terminate_card_usage(self) -> ResTuple: """Execute TERMINATE CARD USAGE command as per TS 102 222 Section 6.9""" - return self.send_apdu_checksw(self.cla_byte + 'fe000000') + return self.send_apdu_checksw(self.cla_byte + 'fe000000', apply_lchan = False) def manage_channel(self, mode: str = 'open', lchan_nr: int =0) -> ResTuple: """Execute MANAGE CHANNEL command as per TS 102 221 Section 11.1.17. @@ -662,7 +662,7 @@ else: p1 = 0x00 pdu = self.cla_byte + '70%02x%02x00' % (p1, lchan_nr) - return self.send_apdu_checksw(pdu) + return self.send_apdu_checksw(pdu, apply_lchan = False) def reset_card(self) -> Hexstr: """Physically reset the card""" @@ -683,7 +683,7 @@ code : chv code as hex string """ fc = rpad(b2h(code), 16) - data, sw = self.send_apdu(self.cla_byte + '2000' + ('%02X' % chv_no) + '08' + fc) + data, sw = self.send_apdu(self.cla_byte + '2000' + ('%02X' % chv_no) + '08' + fc, apply_lchan = False) self._chv_process_sw('verify', chv_no, code, sw) return (data, sw) @@ -696,7 +696,7 @@ pin_code : new chv code as hex string """ fc = rpad(b2h(puk_code), 16) + rpad(b2h(pin_code), 16) - data, sw = self.send_apdu(self.cla_byte + '2C00' + ('%02X' % chv_no) + '10' + fc) + data, sw = self.send_apdu(self.cla_byte + '2C00' + ('%02X' % chv_no) + '10' + fc, apply_lchan = False) self._chv_process_sw('unblock', chv_no, pin_code, sw) return (data, sw) @@ -709,7 +709,7 @@ new_pin_code : new chv code as hex string """ fc = rpad(b2h(pin_code), 16) + rpad(b2h(new_pin_code), 16) - data, sw = self.send_apdu(self.cla_byte + '2400' + ('%02X' % chv_no) + '10' + fc) + data, sw = self.send_apdu(self.cla_byte + '2400' + ('%02X' % chv_no) + '10' + fc, apply_lchan = False) self._chv_process_sw('change', chv_no, pin_code, sw) return (data, sw) @@ -722,7 +722,7 @@ new_pin_code : new chv code as hex string """ fc = rpad(b2h(pin_code), 16) - data, sw = self.send_apdu(self.cla_byte + '2600' + ('%02X' % chv_no) + '08' + fc) + data, sw = self.send_apdu(self.cla_byte + '2600' + ('%02X' % chv_no) + '08' + fc, apply_lchan = False) self._chv_process_sw('disable', chv_no, pin_code, sw) return (data, sw) @@ -734,7 +734,7 @@ pin_code : chv code as hex string """ fc = rpad(b2h(pin_code), 16) - data, sw = self.send_apdu(self.cla_byte + '2800' + ('%02X' % chv_no) + '08' + fc) + data, sw = self.send_apdu(self.cla_byte + '2800' + ('%02X' % chv_no) + '08' + fc, apply_lchan = False) self._chv_process_sw('enable', chv_no, pin_code, sw) return (data, sw) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37937?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I420f8a5f7ff8d9e5ef94d6519fb3716d6c7caf64 Gerrit-Change-Number: 37937 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
1 0
0 0
[XS] Change in pysim[master]: global_platform: use scp_key_identity ICCID for ADF.ISD
by dexter 28 Aug '24

28 Aug '24
Attention is currently required from: dexter. Hello Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/37919?usp=email to look at the new patch set (#3). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder The change is no longer submittable: Verified is unsatisfied now. Change subject: global_platform: use scp_key_identity ICCID for ADF.ISD ...................................................................... global_platform: use scp_key_identity ICCID for ADF.ISD Related: OS#6531 Change-Id: I73a6f7088321a2b703074aa5228910709050cab2 --- M pySim/global_platform/__init__.py 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/19/37919/3 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37919?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: I73a6f7088321a2b703074aa5228910709050cab2 Gerrit-Change-Number: 37919 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
1 0
0 0
[XS] Change in pysim[master]: global_platform: fix help description for establish_scp03
by dexter 28 Aug '24

28 Aug '24
Attention is currently required from: dexter. Hello Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/37918?usp=email to look at the new patch set (#3). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder The change is no longer submittable: Verified is unsatisfied now. Change subject: global_platform: fix help description for establish_scp03 ...................................................................... global_platform: fix help description for establish_scp03 The argument parser object for establish_scp03 (est_scp03_parser) is copied from est_scp02_parser. This object still has the .description property set, which is the description for establish_scp02. To get the description string that is defined in do_establish_scp03, we must remove the old description string first. Related: OS#6531 Change-Id: Ibb26bddf88b2e644a7f0c6b2a06bde228aa8afc7 --- M pySim/global_platform/__init__.py 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/18/37918/3 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37918?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: Ibb26bddf88b2e644a7f0c6b2a06bde228aa8afc7 Gerrit-Change-Number: 37918 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • ...
  • 148
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.