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

January 2024

  • 1 participants
  • 1559 discussions
[M] Change in pysim[master]: TLV: Add DGI encoding of "GP Scripting Language Annex B"
by laforge 14 Jan '24

14 Jan '24
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/35556?usp=email ) Change subject: TLV: Add DGI encoding of "GP Scripting Language Annex B" ...................................................................... Patch Set 2: (1 comment) File pySim/utils.py: https://gerrit.osmocom.org/c/pysim/+/35556/comment/3728ec4b_77eca68a PS1, Line 365: t > `t: int`? Done -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35556?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ie29ab7eb39f3165f3d695fcc1f02051338095697 Gerrit-Change-Number: 35556 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sun, 14 Jan 2024 16:42:58 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[M] Change in pysim[master]: global_platform: More definitions to support key loading
by laforge 14 Jan '24

14 Jan '24
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35564?usp=email ) Change subject: global_platform: More definitions to support key loading ...................................................................... global_platform: More definitions to support key loading With the definitions from this commit, we can build key loading TLVs, which is used to load ECC keys into eUICCs. Change-Id: I853c94d37939ef3dd795f893232b0276a5a4af81 --- M pySim/global_platform.py 1 file changed, 103 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/64/35564/1 diff --git a/pySim/global_platform.py b/pySim/global_platform.py index 7e0493c..bb6506e 100644 --- a/pySim/global_platform.py +++ b/pySim/global_platform.py @@ -114,8 +114,81 @@ class KeyInformation(BER_TLV_IE, tag=0xe0, nested=[KeyInformationData]): pass -# GlobalPlatform v2.3.1 Section H.4 -class ScpInformation(BER_TLV_IE, tag=0xa0): +# GP v2.3 11.1.9 +KeyUsageQualifier = Struct('byte1'/FlagsEnum(Byte, verification_encryption=0x80, + computation_decipherment=0x40, + sm_response=0x20, + sm_command=0x10, + confidentiality=0x08, + crypto_checksum=0x04, + digital_signature=0x02, + crypto_authorization=0x01), + 'byte2'/COptional(FlagsEnum(Byte, key_agreement=0x80))) + +# GP v2.3 11.1.10 +KeyAccess = Enum(Byte, sd_and_any_assoc_app=0x00, sd_only=0x01, any_assoc_app_but_not_sd=0x02, + not_available=0xff) + +class KeyLoading: + # Global Platform Specification v2.3 Section 11.11.4.2.2.3 DGIs for the CC Private Key + + class KeyUsageQualifier(BER_TLV_IE, tag=0x95): + _construct = KeyUsageQualifier + + class KeyAccess(BER_TLV_IE, tag=0x96): + _construct = KeyAccess + + class KeyType(BER_TLV_IE, tag=0x80): + _construct = KeyType + + class KeyLength(BER_TLV_IE, tag=0x81): + _construct = GreedyInteger() + + class KeyIdentifier(BER_TLV_IE, tag=0x82): + _construct = Int8ub + + class KeyVersionNumber(BER_TLV_IE, tag=0x83): + _construct = Int8ub + + class KeyParameterReferenceValue(BER_TLV_IE, tag=0x85): + _construct = Enum(Byte, secp256r1=0x00, secp384r1=0x01, secp521r1=0x02, brainpoolP256r1=0x03, + brainpoolP256t1=0x04, brainpoolP384r1=0x05, brainpoolP384t1=0x06, + brainpoolP512r1=0x07, brainpoolP512t1=0x08) + + class ControlReferenceTemplate(BER_TLV_IE, tag=0xb9, + nested=[KeyUsageQualifier, + KeyAccess, + KeyType, + KeyLength, + KeyIdentifier, + KeyVersionNumber, + KeyParameterReferenceValue]): + pass + + # Table 11-103 + class EccPublicKey(DGI_TLV_IE, tag=0x0036): + _construct = GreedyBytes + + # Table 11-105 + class EccPrivateKey(DGI_TLV_IE, tag=0x8137): + _construct = GreedyBytes + + # Global Platform Specification v2.3 Section 11.11.4 / Table 11-91 + class KeyControlReferenceTemplate(DGI_TLV_IE, tag=0x00b9, nested=[ControlReferenceTemplate]): + pass + + +# GlobalPlatform v2.3.1 Section H.4 / Table H-6 +class ScpType(BER_TLV_IE, tag=0x80): + _construct = HexAdapter(Byte) +class ListOfSupportedOptions(BER_TLV_IE, tag=0x81): + _construct = GreedyBytes +class SupportedKeysForScp03(BER_TLV_IE, tag=0x82): + _construct = FlagsEnum(Byte, aes128=0x01, aes192=0x02, aes256=0x04) +class SupportedTlsCipherSuitesForScp81(BER_TLV_IE, tag=0x83): + _consuruct = GreedyRange(Int16ub) +class ScpInformation(BER_TLV_IE, tag=0xa0, nested=[ScpType, ListOfSupportedOptions, SupportedKeysForScp03, + SupportedTlsCipherSuitesForScp81]): pass class PrivilegesAvailableSSD(BER_TLV_IE, tag=0x81): pass @@ -123,15 +196,24 @@ pass class SupportedLFDBHAlgorithms(BER_TLV_IE, tag=0x83): pass +# GlobalPlatform Card Specification v2.3 / Table H-8 class CiphersForLFDBEncryption(BER_TLV_IE, tag=0x84): - pass + _construct = Enum(Byte, tripledes16=0x01, aes128=0x02, aes192=0x04, aes256=0x08, + icv_supported_for_lfdb=0x80) +CipherSuitesForSignatures = Struct('byte1'/FlagsEnum(Byte, rsa1024_pkcsv15_sha1=0x01, + rsa_gt1024_pss_sha256=0x02, + single_des_plus_final_triple_des_mac_16b=0x04, + cmac_aes128=0x08, cmac_aes192=0x10, cmac_aes256=0x20, + ecdsa_ecc256_sha256=0x40, ecdsa_ecc384_sha384=0x80), + 'byte2'/COptional(FlagsEnum(Byte, ecdsa_ecc512_sha512=0x01, + ecdsa_ecc_521_sha512=0x02))) class CiphersForTokens(BER_TLV_IE, tag=0x85): - pass + _construct = CipherSuitesForSignatures class CiphersForReceipts(BER_TLV_IE, tag=0x86): - pass + _construct = CipherSuitesForSignatures class CiphersForDAPs(BER_TLV_IE, tag=0x87): - pass -class KeyParameterReferenceList(BER_TLV_IE, tag=0x88): + _construct = CipherSuitesForSignatures +class KeyParameterReferenceList(BER_TLV_IE, tag=0x88, nested=[KeyLoading.KeyParameterReferenceValue]): pass class CardCapabilityInformation(BER_TLV_IE, tag=0x67, nested=[ScpInformation, PrivilegesAvailableSSD, PrivilegesAvailableApplication, @@ -253,10 +335,10 @@ pass class IssuerIdentificationNumber(BER_TLV_IE, tag=0x42): - _construct = BcdAdapter(GreedyBytes) + _construct = HexAdapter(GreedyBytes) class CardImageNumber(BER_TLV_IE, tag=0x45): - _construct = BcdAdapter(GreedyBytes) + _construct = HexAdapter(GreedyBytes) class SequenceCounterOfDefaultKvn(BER_TLV_IE, tag=0xc1): _construct = GreedyInteger() -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35564?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I853c94d37939ef3dd795f893232b0276a5a4af81 Gerrit-Change-Number: 35564 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in pysim[master]: TLV: Add DGI encoding of "GP Scripting Language Annex B"
by laforge 14 Jan '24

14 Jan '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/+/35556?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: TLV: Add DGI encoding of "GP Scripting Language Annex B" ...................................................................... TLV: Add DGI encoding of "GP Scripting Language Annex B" The DGI encoding is specified in Annex B of the "GlobalPlatform Systems Scripting Language Specification v1.1.0" which is an "archived" specification that is no longer published by GlobalPlatform, despite it being referenced from the GlobalPlatform Card Specification v2.3, which is the basis of the GSMA eSIM specifications. For some reason it was the belief of the specification authors that yet another format of TLV encoding is needed, in addition to the BER-TLV and COMPREHENSION-TLV used by the very same specifications. The encoding of the tag is not really specified anywhere, but I've only seen 16-bit examples. The encoding of the length is specified and implemented here accordingly. Change-Id: Ie29ab7eb39f3165f3d695fcc1f02051338095697 --- M pySim/tlv.py M pySim/utils.py M tests/test_utils.py 3 files changed, 97 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/56/35556/2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35556?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ie29ab7eb39f3165f3d695fcc1f02051338095697 Gerrit-Change-Number: 35556 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newpatchset
1 0
0 0
[M] Change in pysim[master]: Constrain user input to hex-string in argparse
by laforge 14 Jan '24

14 Jan '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/35551?usp=email ) Change subject: Constrain user input to hex-string in argparse ...................................................................... Constrain user input to hex-string in argparse We do have an is_hexstr function which we should use anywhere where we expect the user to input a string of hex digits. This way we validate the input before running in some random exception. Change-Id: I6426ea864bec82be60554dd125961a48d7751904 --- M pySim/filesystem.py M pySim/ts_102_222.py M pySim/ts_31_102.py M pySim/ts_51_011.py 4 files changed, 31 insertions(+), 22 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve diff --git a/pySim/filesystem.py b/pySim/filesystem.py index c71150a..5d1970a 100644 --- a/pySim/filesystem.py +++ b/pySim/filesystem.py @@ -38,7 +38,7 @@ from smartcard.util import toBytes -from pySim.utils import sw_match, h2b, b2h, i2h, is_hex, auto_int, Hexstr +from pySim.utils import sw_match, h2b, b2h, i2h, is_hex, auto_int, Hexstr, is_hexstr from pySim.construct import filter_dict, parse_construct, build_construct from pySim.exceptions import * from pySim.jsonpath import js_path_find, js_path_modify @@ -579,7 +579,7 @@ dec_hex_parser = argparse.ArgumentParser() dec_hex_parser.add_argument('--oneline', action='store_true', help='No JSON pretty-printing, dump as a single line') - dec_hex_parser.add_argument('HEXSTR', help='Hex-string of encoded data to decode') + dec_hex_parser.add_argument('HEXSTR', type=is_hexstr, help='Hex-string of encoded data to decode') @cmd2.with_argparser(dec_hex_parser) def do_decode_hex(self, opts): @@ -612,8 +612,7 @@ upd_bin_parser = argparse.ArgumentParser() upd_bin_parser.add_argument( '--offset', type=int, default=0, help='Byte offset for start of read') - upd_bin_parser.add_argument( - 'data', help='Data bytes (hex format) to write') + upd_bin_parser.add_argument('data', type=is_hexstr, help='Data bytes (hex format) to write') @cmd2.with_argparser(upd_bin_parser) def do_update_binary(self, opts): @@ -623,8 +622,7 @@ self._cmd.poutput(data) upd_bin_dec_parser = argparse.ArgumentParser() - upd_bin_dec_parser.add_argument( - 'data', help='Abstract data (JSON format) to write') + upd_bin_dec_parser.add_argument('data', type=is_hexstr, help='Abstract data (JSON format) to write') upd_bin_dec_parser.add_argument('--json-path', type=str, help='JSON path to modify specific element of file only') @@ -802,7 +800,7 @@ dec_hex_parser = argparse.ArgumentParser() dec_hex_parser.add_argument('--oneline', action='store_true', help='No JSON pretty-printing, dump as a single line') - dec_hex_parser.add_argument('HEXSTR', help='Hex-string of encoded data to decode') + dec_hex_parser.add_argument('HEXSTR', type=is_hexstr, help='Hex-string of encoded data to decode') @cmd2.with_argparser(dec_hex_parser) def do_decode_hex(self, opts): @@ -872,8 +870,7 @@ upd_rec_parser = argparse.ArgumentParser() upd_rec_parser.add_argument( 'record_nr', type=int, help='Number of record to be read') - upd_rec_parser.add_argument( - 'data', help='Data bytes (hex format) to write') + upd_rec_parser.add_argument('data', type=is_hexstr, help='Data bytes (hex format) to write') @cmd2.with_argparser(upd_rec_parser) def do_update_record(self, opts): @@ -885,8 +882,7 @@ upd_rec_dec_parser = argparse.ArgumentParser() upd_rec_dec_parser.add_argument( 'record_nr', type=int, help='Number of record to be read') - upd_rec_dec_parser.add_argument( - 'data', help='Abstract data (JSON format) to write') + upd_rec_dec_parser.add_argument('data', type=is_hexstr, help='Abstract data (JSON format) to write') upd_rec_dec_parser.add_argument('--json-path', type=str, help='JSON path to modify specific element of record only') @@ -1248,8 +1244,7 @@ set_data_parser = argparse.ArgumentParser() set_data_parser.add_argument( 'tag', type=auto_int, help='BER-TLV Tag of value to set') - set_data_parser.add_argument( - 'data', help='Data bytes (hex format) to write') + set_data_parser.add_argument('data', type=is_hexstr, help='Data bytes (hex format) to write') @cmd2.with_argparser(set_data_parser) def do_set_data(self, opts): diff --git a/pySim/ts_102_222.py b/pySim/ts_102_222.py index 372d67f..bf5e29f 100644 --- a/pySim/ts_102_222.py +++ b/pySim/ts_102_222.py @@ -107,7 +107,7 @@ (data, sw) = self._cmd.lchan.scc.terminate_card_usage() create_parser = argparse.ArgumentParser() - create_parser.add_argument('FILE_ID', type=str, help='File Identifier as 4-character hex string') + create_parser.add_argument('FILE_ID', type=is_hexstr, help='File Identifier as 4-character hex string') create_parser._action_groups.pop() create_required = create_parser.add_argument_group('required arguments') create_optional = create_parser.add_argument_group('optional arguments') @@ -154,7 +154,7 @@ self._cmd.lchan.select_file(self._cmd.lchan.selected_file) createdf_parser = argparse.ArgumentParser() - createdf_parser.add_argument('FILE_ID', type=str, help='File Identifier as 4-character hex string') + createdf_parser.add_argument('FILE_ID', type=is_hexstr, help='File Identifier as 4-character hex string') createdf_parser._action_groups.pop() createdf_required = createdf_parser.add_argument_group('required arguments') createdf_optional = createdf_parser.add_argument_group('optional arguments') @@ -162,7 +162,7 @@ createdf_required.add_argument('--ef-arr-file-id', required=True, type=str, help='Referenced Security: File Identifier of EF.ARR') createdf_required.add_argument('--ef-arr-record-nr', required=True, type=int, help='Referenced Security: Record Number within EF.ARR') createdf_optional.add_argument('--shareable', action='store_true', help='Should the file be shareable?') - createdf_optional.add_argument('--aid', type=str, help='Application ID (creates an ADF, instead of a DF)') + createdf_optional.add_argument('--aid', type=is_hexstr, help='Application ID (creates an ADF, instead of a DF)') # mandatory by spec, but ignored by several OS, so don't force the user createdf_optional.add_argument('--total-file-size', type=int, help='Physical memory allocated for DF/ADi in octets') createdf_sja_optional.add_argument('--permit-rfm-create', action='store_true') diff --git a/pySim/ts_31_102.py b/pySim/ts_31_102.py index 4134650..0614a0c 100644 --- a/pySim/ts_31_102.py +++ b/pySim/ts_31_102.py @@ -39,6 +39,7 @@ from pySim.filesystem import * from pySim.ts_31_102_telecom import DF_PHONEBOOK, EF_UServiceTable from pySim.construct import * +from pySim.utils import is_hexstr from pySim.cat import SMS_TPDU, DeviceIdentities, SMSPPDownload from construct import Optional as COptional from construct import * @@ -1588,8 +1589,8 @@ super().__init__() authenticate_parser = argparse.ArgumentParser() - authenticate_parser.add_argument('rand', help='Random challenge') - authenticate_parser.add_argument('autn', help='Authentication Nonce') + authenticate_parser.add_argument('rand', type=is_hexstr, help='Random challenge') + authenticate_parser.add_argument('autn', type=is_hexstr, help='Authentication Nonce') #authenticate_parser.add_argument('--context', help='Authentication context', default='3G') @cmd2.with_argparser(authenticate_parser) @@ -1599,7 +1600,7 @@ self._cmd.poutput_json(data) term_prof_parser = argparse.ArgumentParser() - term_prof_parser.add_argument('PROFILE', help='Hexstring of encoded terminal profile') + term_prof_parser.add_argument('PROFILE', type=is_hexstr, help='Hexstring of encoded terminal profile') @cmd2.with_argparser(term_prof_parser) def do_terminal_profile(self, opts): @@ -1613,7 +1614,7 @@ self._cmd.poutput('SW: %s, data: %s' % (sw, data)) envelope_parser = argparse.ArgumentParser() - envelope_parser.add_argument('PAYLOAD', help='Hexstring of encoded payload to ENVELOPE') + envelope_parser.add_argument('PAYLOAD', type=is_hexstr, help='Hexstring of encoded payload to ENVELOPE') @cmd2.with_argparser(envelope_parser) def do_envelope(self, opts): @@ -1625,7 +1626,7 @@ self._cmd.poutput('SW: %s, data: %s' % (sw, data)) envelope_sms_parser = argparse.ArgumentParser() - envelope_sms_parser.add_argument('TPDU', help='Hexstring of encoded SMS TPDU') + envelope_sms_parser.add_argument('TPDU', type=is_hexstr, help='Hexstring of encoded SMS TPDU') @cmd2.with_argparser(envelope_sms_parser) def do_envelope_sms(self, opts): diff --git a/pySim/ts_51_011.py b/pySim/ts_51_011.py index 0a6f774..9b56b0e 100644 --- a/pySim/ts_51_011.py +++ b/pySim/ts_51_011.py @@ -1034,7 +1034,7 @@ super().__init__() authenticate_parser = argparse.ArgumentParser() - authenticate_parser.add_argument('rand', help='Random challenge') + authenticate_parser.add_argument('rand', type=is_hexstr, help='Random challenge') @cmd2.with_argparser(authenticate_parser) def do_authenticate(self, opts): -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35551?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I6426ea864bec82be60554dd125961a48d7751904 Gerrit-Change-Number: 35551 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
[M] Change in pysim[master]: euicc: Migrate ECASD + ISD-R over to global_platform.CardApplicationSD
by laforge 14 Jan '24

14 Jan '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/35552?usp=email ) Change subject: euicc: Migrate ECASD + ISD-R over to global_platform.CardApplicationSD ...................................................................... euicc: Migrate ECASD + ISD-R over to global_platform.CardApplicationSD Actually, the GSMA eUICC is a kind of derivative of a GlobalPlatform card, and the ECASD and ISD-R are security domains. As such, we should make them derived classes of global_platform.CardApplicationSD which means they inherit some of the shared shell_commands etc. Change-Id: I660e874d9bcbb8c28a64e4ef82dc53bee97aacfc --- M pySim/euicc.py 1 file changed, 46 insertions(+), 50 deletions(-) Approvals: fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/pySim/euicc.py b/pySim/euicc.py index 81fbd1e..96d95d6 100644 --- a/pySim/euicc.py +++ b/pySim/euicc.py @@ -49,15 +49,6 @@ AID_ISD_P_FILE = "A0000005591010FFFFFFFF8900000D00" AID_ISD_P_MODULE = "A0000005591010FFFFFFFF8900000E00" -sw_isdr = { - 'ISD-R': { - '6a80': 'Incorrect values in command data', - '6a82': 'Profile not found', - '6a88': 'Reference data not found', - '6985': 'Conditions of use not satisfied', - } -} - class SupportedVersionNumber(BER_TLV_IE, tag=0x82): _construct = GreedyBytes @@ -286,11 +277,12 @@ class GetEimConfigurationData(BER_TLV_IE, tag=0xbf55, nested=[EimConfigurationDataSeq]): pass -class ADF_ISDR(CardADF): - def __init__(self, aid=AID_ISD_R, name='ADF.ISD-R', fid=None, sfid=None, - desc='ISD-R (Issuer Security Domain Root) Application'): - super().__init__(aid=aid, fid=fid, sfid=sfid, name=name, desc=desc) - self.shell_commands += [self.AddlShellCommands()] +class CardApplicationISDR(pySim.global_platform.CardApplicationSD): + def __init__(self): + super().__init__(name='ADF.ISD-R', aid=AID_ISD_R, + desc='ISD-R (Issuer Security Domain Root) Application') + self.adf.decode_select_response = self.decode_select_response + self.adf.shell_commands += [self.AddlShellCommands()] @staticmethod def store_data(scc: SimCardCommands, tx_do: Hexstr) -> Tuple[Hexstr, SwHexstr]: @@ -310,7 +302,7 @@ return ValueError('DO > 255 bytes not supported yet') else: cmd_do_enc = b'' - (data, sw) = ADF_ISDR.store_data(scc, b2h(cmd_do_enc)) + (data, sw) = CardApplicationISDR.store_data(scc, b2h(cmd_do_enc)) if data: if resp_cls: resp_do = resp_cls() @@ -336,11 +328,11 @@ @cmd2.with_argparser(es10x_store_data_parser) def do_es10x_store_data(self, opts): """Perform a raw STORE DATA command as defined for the ES10x eUICC interface.""" - (data, sw) = ADF_ISDR.store_data(self._cmd.lchan.scc, opts.TX_DO) + (data, sw) = CardApplicationISDR.store_data(self._cmd.lchan.scc, opts.TX_DO) def do_get_euicc_configured_addresses(self, opts): """Perform an ES10a GetEuiccConfiguredAddresses function.""" - eca = ADF_ISDR.store_data_tlv(self._cmd.lchan.scc, EuiccConfiguredAddresses(), EuiccConfiguredAddresses) + eca = CardApplicationISDR.store_data_tlv(self._cmd.lchan.scc, EuiccConfiguredAddresses(), EuiccConfiguredAddresses) d = eca.to_dict() self._cmd.poutput_json(flatten_dict_lists(d['euicc_configured_addresses'])) @@ -351,31 +343,31 @@ def do_set_default_dp_address(self, opts): """Perform an ES10a SetDefaultDpAddress function.""" sdda_cmd = SetDefaultDpAddress(children=[DefaultDpAddress(decoded=opts.DP_ADDRESS)]) - sdda = ADF_ISDR.store_data_tlv(self._cmd.lchan.scc, sdda_cmd, SetDefaultDpAddress) + sdda = CardApplicationISDR.store_data_tlv(self._cmd.lchan.scc, sdda_cmd, SetDefaultDpAddress) d = sdda.to_dict() self._cmd.poutput_json(flatten_dict_lists(d['set_default_dp_address'])) def do_get_euicc_challenge(self, opts): """Perform an ES10b GetEUICCChallenge function.""" - gec = ADF_ISDR.store_data_tlv(self._cmd.lchan.scc, GetEuiccChallenge(), GetEuiccChallenge) + gec = CardApplicationISDR.store_data_tlv(self._cmd.lchan.scc, GetEuiccChallenge(), GetEuiccChallenge) d = gec.to_dict() self._cmd.poutput_json(flatten_dict_lists(d['get_euicc_challenge'])) def do_get_euicc_info1(self, opts): """Perform an ES10b GetEUICCInfo (1) function.""" - ei1 = ADF_ISDR.store_data_tlv(self._cmd.lchan.scc, EuiccInfo1(), EuiccInfo1) + ei1 = CardApplicationISDR.store_data_tlv(self._cmd.lchan.scc, EuiccInfo1(), EuiccInfo1) d = ei1.to_dict() self._cmd.poutput_json(flatten_dict_lists(d['euicc_info1'])) def do_get_euicc_info2(self, opts): """Perform an ES10b GetEUICCInfo (2) function.""" - ei2 = ADF_ISDR.store_data_tlv(self._cmd.lchan.scc, EuiccInfo2(), EuiccInfo2) + ei2 = CardApplicationISDR.store_data_tlv(self._cmd.lchan.scc, EuiccInfo2(), EuiccInfo2) d = ei2.to_dict() self._cmd.poutput_json(flatten_dict_lists(d['euicc_info2'])) def do_list_notification(self, opts): """Perform an ES10b ListNotification function.""" - ln = ADF_ISDR.store_data_tlv(self._cmd.lchan.scc, ListNotificationReq(), ListNotificationResp) + ln = CardApplicationISDR.store_data_tlv(self._cmd.lchan.scc, ListNotificationReq(), ListNotificationResp) d = ln.to_dict() self._cmd.poutput_json(flatten_dict_lists(d['list_notification_resp'])) @@ -386,13 +378,13 @@ def do_remove_notification_from_list(self, opts): """Perform an ES10b RemoveNotificationFromList function.""" rn_cmd = NotificationSentReq(children=[SeqNumber(decoded=opts.SEQ_NR)]) - rn = ADF_ISDR.store_data_tlv(self._cmd.lchan.scc, rn_cmd, NotificationSentResp) + rn = CardApplicationISDR.store_data_tlv(self._cmd.lchan.scc, rn_cmd, NotificationSentResp) d = rn.to_dict() self._cmd.poutput_json(flatten_dict_lists(d['notification_sent_resp'])) def do_get_profiles_info(self, opts): """Perform an ES10c GetProfilesInfo function.""" - pi = ADF_ISDR.store_data_tlv(self._cmd.lchan.scc, ProfileInfoListReq(), ProfileInfoListResp) + pi = CardApplicationISDR.store_data_tlv(self._cmd.lchan.scc, ProfileInfoListReq(), ProfileInfoListResp) d = pi.to_dict() self._cmd.poutput_json(flatten_dict_lists(d['profile_info_list_resp'])) @@ -411,7 +403,7 @@ p_id = ProfileIdentifier(children=[Iccid(decoded=opts.iccid)]) ep_cmd_contents = [p_id, RefreshFlag(decoded=opts.refresh_required)] ep_cmd = EnableProfileReq(children=ep_cmd_contents) - ep = ADF_ISDR.store_data_tlv(self._cmd.lchan.scc, ep_cmd, EnableProfileResp) + ep = CardApplicationISDR.store_data_tlv(self._cmd.lchan.scc, ep_cmd, EnableProfileResp) d = ep.to_dict() self._cmd.poutput_json(flatten_dict_lists(d['enable_profile_resp'])) @@ -430,7 +422,7 @@ p_id = ProfileIdentifier(children=[Iccid(decoded=opts.iccid)]) dp_cmd_contents = [p_id, RefreshFlag(decoded=opts.refresh_required)] dp_cmd = DisableProfileReq(children=dp_cmd_contents) - dp = ADF_ISDR.store_data_tlv(self._cmd.lchan.scc, dp_cmd, DisableProfileResp) + dp = CardApplicationISDR.store_data_tlv(self._cmd.lchan.scc, dp_cmd, DisableProfileResp) d = dp.to_dict() self._cmd.poutput_json(flatten_dict_lists(d['disable_profile_resp'])) @@ -448,16 +440,16 @@ p_id = Iccid(decoded=opts.iccid) dp_cmd_contents = [p_id] dp_cmd = DeleteProfileReq(children=dp_cmd_contents) - dp = ADF_ISDR.store_data_tlv(self._cmd.lchan.scc, dp_cmd, DeleteProfileResp) + dp = CardApplicationISDR.store_data_tlv(self._cmd.lchan.scc, dp_cmd, DeleteProfileResp) d = dp.to_dict() self._cmd.poutput_json(flatten_dict_lists(d['delete_profile_resp'])) def do_get_eid(self, opts): """Perform an ES10c GetEID function.""" - (data, sw) = ADF_ISDR.store_data(self._cmd.lchan.scc, 'BF3E035C015A') + (data, sw) = CardApplicationISDR.store_data(self._cmd.lchan.scc, 'BF3E035C015A') ged_cmd = GetEuiccData(children=[TagList(decoded=[0x5A])]) - ged = ADF_ISDR.store_data_tlv(self._cmd.lchan.scc, ged_cmd, GetEuiccData) + ged = CardApplicationISDR.store_data_tlv(self._cmd.lchan.scc, ged_cmd, GetEuiccData) d = ged.to_dict() self._cmd.poutput_json(flatten_dict_lists(d['get_euicc_data'])) @@ -471,46 +463,36 @@ nickname = opts.profile_nickname or '' sn_cmd_contents = [Iccid(decoded=opts.ICCID), ProfileNickname(decoded=nickname)] sn_cmd = SetNicknameReq(children=sn_cmd_contents) - sn = ADF_ISDR.store_data_tlv(self._cmd.lchan.scc, sn_cmd, SetNicknameResp) + sn = CardApplicationISDR.store_data_tlv(self._cmd.lchan.scc, sn_cmd, SetNicknameResp) d = sn.to_dict() self._cmd.poutput_json(flatten_dict_lists(d['set_nickname_resp'])) def do_get_certs(self, opts): """Perform an ES10c GetCerts() function on an IoT eUICC.""" - gc = ADF_ISDR.store_data_tlv(self._cmd.lchan.scc, GetCertsReq(), GetCertsResp) + gc = CardApplicationISDR.store_data_tlv(self._cmd.lchan.scc, GetCertsReq(), GetCertsResp) d = gc.to_dict() self._cmd.poutput_json(flatten_dict_lists(d['get_certficiates_resp'])) def do_get_eim_configuration_data(self, opts): """Perform an ES10b GetEimConfigurationData function on an Iot eUICC.""" - gec = ADF_ISDR.store_data_tlv(self._cmd.lchan.scc, GetEimConfigurationData(), - GetEimConfigurationData) + gec = CardApplicationISDR.store_data_tlv(self._cmd.lchan.scc, GetEimConfigurationData(), + GetEimConfigurationData) d = gec.to_dict() self._cmd.poutput_json(flatten_dict_lists(d['get_eim_configuration_data'])) - -class ADF_ECASD(CardADF): - def __init__(self, aid=AID_ECASD, name='ADF.ECASD', fid=None, sfid=None, - desc='ECASD (eUICC Controlling Authority Security Domain) Application'): - super().__init__(aid=aid, fid=fid, sfid=sfid, name=name, desc=desc) - self.shell_commands += [self.AddlShellCommands()] - +class CardApplicationECASD(pySim.global_platform.CardApplicationSD): def decode_select_response(self, data_hex: Hexstr) -> object: t = FciTemplate() t.from_tlv(h2b(data_hex)) d = t.to_dict() return flatten_dict_lists(d['fci_template']) + def __init__(self): + super().__init__(name='ADF.ECASD', aid=AID_ECASD, + desc='ECASD (eUICC Controlling Authority Security Domain) Application') + self.adf.decode_select_response = self.decode_select_response + self.adf.shell_commands += [self.AddlShellCommands()] + @with_default_category('Application-Specific Commands') class AddlShellCommands(CommandSet): pass - - - -class CardApplicationISDR(CardApplication): - def __init__(self): - super().__init__('ISD-R', adf=ADF_ISDR(), sw=sw_isdr) - -class CardApplicationECASD(CardApplication): - def __init__(self): - super().__init__('ECASD', adf=ADF_ECASD(), sw=sw_isdr) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35552?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I660e874d9bcbb8c28a64e4ef82dc53bee97aacfc Gerrit-Change-Number: 35552 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
[M] Change in pysim[master]: global_platform: Implement generic store_data command
by laforge 14 Jan '24

14 Jan '24
Attention is currently required from: dexter, fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/35553?usp=email ) Change subject: global_platform: Implement generic store_data command ...................................................................... Patch Set 1: (1 comment) File pySim/global_platform.py: https://gerrit.osmocom.org/c/pysim/+/35553/comment/403279ab_513ea5a3 PS1, Line 344: opts.response == 'may_be_returned' > Ack Done -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35553?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: If30c5d31b4e7dd60d3a5cfb1d1cbdcf61741a50e Gerrit-Change-Number: 35553 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Sun, 14 Jan 2024 16:33:20 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[M] Change in pysim[master]: global_platform: Implement generic store_data command
by laforge 14 Jan '24

14 Jan '24
Attention is currently required from: dexter, fixeria. Hello Jenkins Builder, dexter, fixeria, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/35553?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Code-Review+1 by fixeria, Verified+1 by Jenkins Builder Change subject: global_platform: Implement generic store_data command ...................................................................... global_platform: Implement generic store_data command Change-Id: If30c5d31b4e7dd60d3a5cfb1d1cbdcf61741a50e --- M pySim/global_platform.py 1 file changed, 50 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/53/35553/2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35553?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: If30c5d31b4e7dd60d3a5cfb1d1cbdcf61741a50e Gerrit-Change-Number: 35553 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[M] Change in pysim[master]: euicc: Migrate ECASD + ISD-R over to global_platform.CardApplicationSD
by laforge 14 Jan '24

14 Jan '24
Attention is currently required from: dexter. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/35552?usp=email ) Change subject: euicc: Migrate ECASD + ISD-R over to global_platform.CardApplicationSD ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35552?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I660e874d9bcbb8c28a64e4ef82dc53bee97aacfc Gerrit-Change-Number: 35552 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Sun, 14 Jan 2024 16:30:15 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in pysim[master]: Constrain user input to hex-string in argparse
by laforge 14 Jan '24

14 Jan '24
Attention is currently required from: dexter. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/35551?usp=email ) Change subject: Constrain user input to hex-string in argparse ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35551?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I6426ea864bec82be60554dd125961a48d7751904 Gerrit-Change-Number: 35551 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Sun, 14 Jan 2024 16:30:07 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in libosmo-abis[master]: Add support for sending and receiving Sa bits, as well as some line s...
by jolly 14 Jan '24

14 Jan '24
Attention is currently required from: laforge, tnt. Hello Jenkins Builder, laforge, tnt, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-abis/+/35563?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: Add support for sending and receiving Sa bits, as well as some line signals ...................................................................... Add support for sending and receiving Sa bits, as well as some line signals The Sa bits are required for osmo-v5. V5.2 interface must alter and detect Sa7 bit on time slot 0. 'Fastlink' multiplexers do not allow to disable link check with Sa7, so that it must be supported by osmo-v5. Requires: osmo-e1d Change-Id I2608af7bbb8092fddd68d4f3bb36b10a1100ce0f Change-Id: Ie7643693c2daac99f5747591decd60e982b8052a --- M src/input/e1d.c 1 file changed, 87 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/63/35563/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/35563?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Ie7643693c2daac99f5747591decd60e982b8052a Gerrit-Change-Number: 35563 Gerrit-PatchSet: 2 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: tnt <tnt(a)246tNt.com> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: tnt <tnt(a)246tNt.com> Gerrit-MessageType: newpatchset
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • ...
  • 156
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.