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 osmo-bsc[master]: ctrl: Split bts_trx_ts_ctrl from bts_trx_ctrl
by matanp 31 Jan '24

31 Jan '24
Attention is currently required from: matanp, pespin. Hello Jenkins Builder, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bsc/+/35746?usp=email to look at the new patch set (#3). The following approvals got outdated and were removed: Code-Review+1 by pespin Change subject: ctrl: Split bts_trx_ts_ctrl from bts_trx_ctrl ...................................................................... ctrl: Split bts_trx_ts_ctrl from bts_trx_ctrl Besides from making the ts ctrl interface follow the convention of being in its own file, it will be used in the next patch to add a ctrl interface for lchan. Change-Id: I9840bddd4eae409bc8373912d54b6bbfc9fc1c1a --- M include/osmocom/bsc/ctrl.h M src/osmo-bsc/Makefile.am M src/osmo-bsc/bts_trx_ctrl.c A src/osmo-bsc/bts_trx_ts_ctrl.c 4 files changed, 121 insertions(+), 98 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/46/35746/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/35746?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I9840bddd4eae409bc8373912d54b6bbfc9fc1c1a Gerrit-Change-Number: 35746 Gerrit-PatchSet: 3 Gerrit-Owner: matanp <matan1008(a)gmail.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: matanp <matan1008(a)gmail.com> Gerrit-MessageType: newpatchset
1 0
0 0
[M] Change in pysim[master]: pySim.esim: Add class for parsing/encoding eSIM activation codes
by laforge 30 Jan '24

30 Jan '24
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/35749?usp=email ) Change subject: pySim.esim: Add class for parsing/encoding eSIM activation codes ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35749?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: I2256722c04b56e8d9c16a65e3cd94f6a46f4ed85 Gerrit-Change-Number: 35749 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Tue, 30 Jan 2024 22:14:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-bsc[master]: ctrl: Split bts_trx_ts_ctrl from bts_trx_ctrl
by laforge 30 Jan '24

30 Jan '24
Attention is currently required from: matanp. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/35746?usp=email ) Change subject: ctrl: Split bts_trx_ts_ctrl from bts_trx_ctrl ...................................................................... Patch Set 2: (1 comment) Patchset: PS2: the commit log specifies what is done, but doesn't say *why* -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/35746?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I9840bddd4eae409bc8373912d54b6bbfc9fc1c1a Gerrit-Change-Number: 35746 Gerrit-PatchSet: 2 Gerrit-Owner: matanp <matan1008(a)gmail.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: matanp <matan1008(a)gmail.com> Gerrit-Comment-Date: Tue, 30 Jan 2024 22:13:32 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[S] Change in pysim[master]: osmo-smdpp: Support multiple different profiles
by laforge 30 Jan '24

30 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/+/35748?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: osmo-smdpp: Support multiple different profiles ...................................................................... osmo-smdpp: Support multiple different profiles Let's simply use the matchingId for filesystem lookup of the UPP file. This way we can have any number of profiles by simply creating the respeective files. Change-Id: I0bc3a14b9fdfcc6322917dd0c69d8295de486950 --- M docs/osmo-smdpp.rst M osmo-smdpp.py R smdpp-data/upp/TS48v2_SAIP2.1_NoBERTLV.der R smdpp-data/upp/TS48v2_SAIP2.3_NoBERTLV.der M tests/test_esim_saip.py 5 files changed, 43 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/48/35748/2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35748?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: I0bc3a14b9fdfcc6322917dd0c69d8295de486950 Gerrit-Change-Number: 35748 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in pysim[master]: osmo-smdpp: Add more GSMA TS.48 test profiles
by laforge 30 Jan '24

30 Jan '24
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35750?usp=email ) Change subject: osmo-smdpp: Add more GSMA TS.48 test profiles ...................................................................... osmo-smdpp: Add more GSMA TS.48 test profiles We now have all v1, v2, v3, v4 and v5 profiles from https://github.com/GSMATerminals/Generic-eUICC-Test-Profile-for-Device-Test… Change-Id: Ia204c055b9d04552ae664130ff8ae4fc4163b88c --- A smdpp-data/upp/TS48v1_A.der A smdpp-data/upp/TS48v1_B.der A smdpp-data/upp/TS48v2_SAIP2.1_BERTLV.der A smdpp-data/upp/TS48v2_SAIP2.3_BERTLV.der A smdpp-data/upp/TS48v3_SAIP2.1_BERTLV.der A smdpp-data/upp/TS48v3_SAIP2.1_NoBERTLV.der A smdpp-data/upp/TS48v3_SAIP2.3_BERTLV.der A smdpp-data/upp/TS48v3_SAIP2.3_NoBERTLV.der A smdpp-data/upp/TS48v4_SAIP2.1A_NoBERTLV.der A smdpp-data/upp/TS48v4_SAIP2.1B_NoBERTLV.der A smdpp-data/upp/TS48v4_SAIP2.3_BERTLV.der A smdpp-data/upp/TS48v4_SAIP2.3_NoBERTLV.der A smdpp-data/upp/TS48v5_SAIP2.1A_NoBERTLV.der A smdpp-data/upp/TS48v5_SAIP2.1B_NoBERTLV.der A smdpp-data/upp/TS48v5_SAIP2.3_BERTLV_SUCI.der A smdpp-data/upp/TS48v5_SAIP2.3_NoBERTLV.der 16 files changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/50/35750/1 diff --git a/smdpp-data/upp/TS48v1_A.der b/smdpp-data/upp/TS48v1_A.der new file mode 100644 index 0000000..e1dd1bd --- /dev/null +++ b/smdpp-data/upp/TS48v1_A.der Binary files differ diff --git a/smdpp-data/upp/TS48v1_B.der b/smdpp-data/upp/TS48v1_B.der new file mode 100644 index 0000000..8e17a15 --- /dev/null +++ b/smdpp-data/upp/TS48v1_B.der Binary files differ diff --git a/smdpp-data/upp/TS48v2_SAIP2.1_BERTLV.der b/smdpp-data/upp/TS48v2_SAIP2.1_BERTLV.der new file mode 100644 index 0000000..bf85d76 --- /dev/null +++ b/smdpp-data/upp/TS48v2_SAIP2.1_BERTLV.der Binary files differ diff --git a/smdpp-data/upp/TS48v2_SAIP2.3_BERTLV.der b/smdpp-data/upp/TS48v2_SAIP2.3_BERTLV.der new file mode 100644 index 0000000..802944c --- /dev/null +++ b/smdpp-data/upp/TS48v2_SAIP2.3_BERTLV.der Binary files differ diff --git a/smdpp-data/upp/TS48v3_SAIP2.1_BERTLV.der b/smdpp-data/upp/TS48v3_SAIP2.1_BERTLV.der new file mode 100644 index 0000000..b2dcf71 --- /dev/null +++ b/smdpp-data/upp/TS48v3_SAIP2.1_BERTLV.der Binary files differ diff --git a/smdpp-data/upp/TS48v3_SAIP2.1_NoBERTLV.der b/smdpp-data/upp/TS48v3_SAIP2.1_NoBERTLV.der new file mode 100644 index 0000000..6526fe9 --- /dev/null +++ b/smdpp-data/upp/TS48v3_SAIP2.1_NoBERTLV.der Binary files differ diff --git a/smdpp-data/upp/TS48v3_SAIP2.3_BERTLV.der b/smdpp-data/upp/TS48v3_SAIP2.3_BERTLV.der new file mode 100644 index 0000000..4e07d61 --- /dev/null +++ b/smdpp-data/upp/TS48v3_SAIP2.3_BERTLV.der Binary files differ diff --git a/smdpp-data/upp/TS48v3_SAIP2.3_NoBERTLV.der b/smdpp-data/upp/TS48v3_SAIP2.3_NoBERTLV.der new file mode 100644 index 0000000..e2d7835 --- /dev/null +++ b/smdpp-data/upp/TS48v3_SAIP2.3_NoBERTLV.der Binary files differ diff --git a/smdpp-data/upp/TS48v4_SAIP2.1A_NoBERTLV.der b/smdpp-data/upp/TS48v4_SAIP2.1A_NoBERTLV.der new file mode 100644 index 0000000..edca305 --- /dev/null +++ b/smdpp-data/upp/TS48v4_SAIP2.1A_NoBERTLV.der Binary files differ diff --git a/smdpp-data/upp/TS48v4_SAIP2.1B_NoBERTLV.der b/smdpp-data/upp/TS48v4_SAIP2.1B_NoBERTLV.der new file mode 100644 index 0000000..baac777 --- /dev/null +++ b/smdpp-data/upp/TS48v4_SAIP2.1B_NoBERTLV.der Binary files differ diff --git a/smdpp-data/upp/TS48v4_SAIP2.3_BERTLV.der b/smdpp-data/upp/TS48v4_SAIP2.3_BERTLV.der new file mode 100644 index 0000000..8193d65 --- /dev/null +++ b/smdpp-data/upp/TS48v4_SAIP2.3_BERTLV.der Binary files differ diff --git a/smdpp-data/upp/TS48v4_SAIP2.3_NoBERTLV.der b/smdpp-data/upp/TS48v4_SAIP2.3_NoBERTLV.der new file mode 100644 index 0000000..ae75009 --- /dev/null +++ b/smdpp-data/upp/TS48v4_SAIP2.3_NoBERTLV.der Binary files differ diff --git a/smdpp-data/upp/TS48v5_SAIP2.1A_NoBERTLV.der b/smdpp-data/upp/TS48v5_SAIP2.1A_NoBERTLV.der new file mode 100644 index 0000000..0a6d251 --- /dev/null +++ b/smdpp-data/upp/TS48v5_SAIP2.1A_NoBERTLV.der Binary files differ diff --git a/smdpp-data/upp/TS48v5_SAIP2.1B_NoBERTLV.der b/smdpp-data/upp/TS48v5_SAIP2.1B_NoBERTLV.der new file mode 100644 index 0000000..6dded61 --- /dev/null +++ b/smdpp-data/upp/TS48v5_SAIP2.1B_NoBERTLV.der Binary files differ diff --git a/smdpp-data/upp/TS48v5_SAIP2.3_BERTLV_SUCI.der b/smdpp-data/upp/TS48v5_SAIP2.3_BERTLV_SUCI.der new file mode 100644 index 0000000..6c924c2 --- /dev/null +++ b/smdpp-data/upp/TS48v5_SAIP2.3_BERTLV_SUCI.der Binary files differ diff --git a/smdpp-data/upp/TS48v5_SAIP2.3_NoBERTLV.der b/smdpp-data/upp/TS48v5_SAIP2.3_NoBERTLV.der new file mode 100644 index 0000000..becd4eb --- /dev/null +++ b/smdpp-data/upp/TS48v5_SAIP2.3_NoBERTLV.der Binary files differ -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35750?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: Ia204c055b9d04552ae664130ff8ae4fc4163b88c Gerrit-Change-Number: 35750 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in pysim[master]: osmo-smdpp: Support multiple different profiles
by laforge 30 Jan '24

30 Jan '24
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35748?usp=email ) Change subject: osmo-smdpp: Support multiple different profiles ...................................................................... osmo-smdpp: Support multiple different profiles Let's simply use the matchingId for filesystem lookup of the UPP file. This way we can have any number of profiles by simply creating the respeective files. Change-Id: I0bc3a14b9fdfcc6322917dd0c69d8295de486950 --- M docs/osmo-smdpp.rst M osmo-smdpp.py R smdpp-data/upp/TS48v2_SAIP2.1_NoBERTLV.der R smdpp-data/upp/TS48v2_SAIP2.3_NoBERTLV.der 4 files changed, 42 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/48/35748/1 diff --git a/docs/osmo-smdpp.rst b/docs/osmo-smdpp.rst index a84ebee..ad7d902 100644 --- a/docs/osmo-smdpp.rst +++ b/docs/osmo-smdpp.rst @@ -21,8 +21,9 @@ * uses test certificates copied from GSMA SGP.26 into `./smdpp-data/certs`, assuming that your osmo-smdppp would be running at the host name `testsmdpplus1.example.com` -* always provides the exact same profile to every request. The profile always has the same IMSI and - ICCID. +* doesn't understand profile state. Any profile can always be downloaded any number of times, irrespective + of the EID or whether it was donwloaded before +* doesn't perform any personalization, so the IMSI/ICCID etc. are always identical * **is absolutely insecure**, as it * does not perform any certificate verification @@ -83,7 +84,8 @@ The `smdpp-data/certs`` directory contains the DPtls, DPauth and DPpb as well as CI certificates used; they are copied from GSMA SGP.26 v2. -The `smdpp-data/upp` directory contains the UPP (Unprotected Profile Package) used. +The `smdpp-data/upp` directory contains the UPP (Unprotected Profile Package) used. The file names (without +.der suffix) are looked up by the matchingID parameter from the activation code presented by the LPA. DNS setup for your LPA diff --git a/osmo-smdpp.py b/osmo-smdpp.py index cfcd5f8..8cb0082 100755 --- a/osmo-smdpp.py +++ b/osmo-smdpp.py @@ -135,6 +135,7 @@ def __init__(self, server_hostname: str, ci_certs_path: str, use_brainpool: bool = False): self.server_hostname = server_hostname + self.upp_dir = os.path.realpath(os.path.join(DATA_DIR, 'upp')) self.ci_certs = self.load_certs_from_path(ci_certs_path) # load DPauth cert + key self.dp_auth = CertAndPrivkey(oid.id_rspRole_dp_auth_v2) @@ -344,6 +345,27 @@ if euiccSigned1['serverChallenge'] != ss.serverChallenge: raise ApiError('8.1', '6.1', 'Verification failed') + # If ctxParams1 contains a ctxParamsForCommonAuthentication data object, the SM-DP+ Shall [...] + # TODO: We really do a very simplistic job here, this needs to be properly implemented later, + # considering all the various cases, profile state, etc. + if euiccSigned1['ctxParams1'][0] == 'ctxParamsForCommonAuthentication': + cpca = euiccSigned1['ctxParams1'][1] + matchingId = cpca.get('matchingId', None) + if not matchingId: + # TODO: check if any pending profile downloads for the EID + raise ApiError('8.2.6', '3.8', 'Refused') + if matchingId: + # look up profile based on matchingID. We simply check if a given file exists for now.. + path = os.path.join(self.upp_dir, matchingId) + '.der' + # prevent directory traversal attack + if os.path.commonprefix((os.path.realpath(path),self.upp_dir)) != self.upp_dir: + raise ApiError('8.2.6', '3.8', 'Refused') + if not os.path.isfile(path) or not os.access(path, os.R_OK): + raise ApiError('8.2.6', '3.8', 'Refused') + ss.matchingId = matchingId + + # FIXME: we actually want to perform the profile binding herr, and read the profile metadat from the profile + # Put together profileMetadata + _bin ss.profileMetadata = ProfileMetadata(iccid_bin= h2b(swap_nibbles('89000123456789012358')), spn="OsmocomSPN", profile_name="OsmocomProfile") profileMetadata_bin = ss.profileMetadata.gen_store_metadata_request() @@ -425,7 +447,7 @@ # TODO: Check if this order requires a Confirmation Code verification # Perform actual protection + binding of profile package (or return pre-bound one) - with open(os.path.join(DATA_DIR, 'upp', 'TS48 V2 eSIM_GTP_SAIP2.1_NoBERTLV.rename2der'), 'rb') as f: + with open(os.path.join(self.upp_dir, ss.matchingId)+'.der', 'rb') as f: upp = UnprotectedProfilePackage.from_der(f.read(), metadata=ss.profileMetadata) # HACK: Use empty PPP as we're still debuggin the configureISDP step, and we want to avoid # cluttering the log with stuff happening after the failure diff --git a/smdpp-data/upp/TS48 V2 eSIM_GTP_SAIP2.1_NoBERTLV.rename2der b/smdpp-data/upp/TS48v2_SAIP2.1_NoBERTLV.der similarity index 100% rename from smdpp-data/upp/TS48 V2 eSIM_GTP_SAIP2.1_NoBERTLV.rename2der rename to smdpp-data/upp/TS48v2_SAIP2.1_NoBERTLV.der Binary files differ diff --git a/smdpp-data/upp/TS48 V2 eSIM_GTP_SAIP2.3_NoBERTLV.rename2der b/smdpp-data/upp/TS48v2_SAIP2.3_NoBERTLV.der similarity index 100% rename from smdpp-data/upp/TS48 V2 eSIM_GTP_SAIP2.3_NoBERTLV.rename2der rename to smdpp-data/upp/TS48v2_SAIP2.3_NoBERTLV.der Binary files differ -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35748?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: I0bc3a14b9fdfcc6322917dd0c69d8295de486950 Gerrit-Change-Number: 35748 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in pysim[master]: pySim.esim: Add class for parsing/encoding eSIM activation codes
by laforge 30 Jan '24

30 Jan '24
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35749?usp=email ) Change subject: pySim.esim: Add class for parsing/encoding eSIM activation codes ...................................................................... pySim.esim: Add class for parsing/encoding eSIM activation codes Change-Id: I2256722c04b56e8d9c16a65e3cd94f6a46f4ed85 --- M pySim/esim/__init__.py M tests/test_esim.py 2 files changed, 99 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/49/35749/1 diff --git a/pySim/esim/__init__.py b/pySim/esim/__init__.py index 4d6c609..dfacb83 100644 --- a/pySim/esim/__init__.py +++ b/pySim/esim/__init__.py @@ -1,4 +1,5 @@ import sys +from typing import Optional from importlib import resources import asn1tools @@ -14,3 +15,79 @@ #else: #print(resources.read_text(__name__, 'asn1/rsp.asn')) return asn1tools.compile_string(asn_txt, codec='der') + + +# SGP.22 section 4.1 Activation Code +class ActivationCode: + def __init__(self, hostname:str, token:str, oid: Optional[str] = None, cc_required: Optional[bool] = False): + if '$' in hostname: + raise ValueError('$ sign not permitted in hostname') + self.hostname = hostname + if '$' in token: + raise ValueError('$ sign not permitted in token') + self.token = token + # TODO: validate OID + self.oid = oid + self.cc_required = cc_required + # only format 1 is specified and supported here + self.format = 1 + + @staticmethod + def decode_str(ac: str) -> dict: + if ac[0] != '1': + raise ValueError("Unsupported AC_Format '%s'!" % ac[0]) + ac_elements = ac.split('$') + d = { + 'oid': None, + 'cc_required': False, + } + d['format'] = ac_elements.pop(0) + d['hostname'] = ac_elements.pop(0) + d['token'] = ac_elements.pop(0) + if len(ac_elements): + oid = ac_elements.pop(0) + if oid != '': + d['oid'] = oid + if len(ac_elements): + ccr = ac_elements.pop(0) + if ccr == '1': + d['cc_required'] = True + return d + + @classmethod + def from_string(cls, ac: str) -> 'ActivationCode': + """Create new instance from SGP.22 section 4.1 string representation.""" + d = cls.decode_str(ac) + return cls(d['hostname'], d['token'], d['oid'], d['cc_required']) + + def to_string(self, for_qrcode:bool = False) -> str: + """Convert from internal representation to SGP.22 section 4.1 string representation.""" + if for_qrcode: + ret = 'LPA:' + else: + ret = '' + ret += '%d$%s$%s' % (self.format, self.hostname, self.token) + if self.oid: + ret += '$%s' % (self.oid) + elif self.cc_required: + ret += '$' + if self.cc_required: + ret += '$1' + return ret + + def __str__(self): + return self.to_string() + + def to_qrcode(self): + """Encode internal representation to QR code.""" + import qrcode + qr = qrcode.QRCode() + qr.add_data(self.to_string(for_qrcode=True)) + return qr.make_image() + + def __repr__(self): + return "ActivationCode(format=%u, hostname='%s', token='%s', oid=%s, cc_required=%s)" % (self.format, + self.hostname, + self.token, + self.oid, + self.cc_required) diff --git a/tests/test_esim.py b/tests/test_esim.py index d4b494e..81926e5 100755 --- a/tests/test_esim.py +++ b/tests/test_esim.py @@ -22,9 +22,22 @@ from pySim.utils import b2h, h2b from pySim.esim.bsp import * import pySim.esim.rsp as rsp +from pySim.esim import ActivationCode from cryptography.hazmat.primitives.asymmetric import ec +class TestActivationCode(unittest.TestCase): + def test_de_encode(self): + STRS = ['1$SMDP.GSMA.COM$04386-AGYFT-A74Y8-3F815', + '1$SMDP.GSMA.COM$04386-AGYFT-A74Y8-3F815$$1', + '1$SMDP.GSMA.COM$04386-AGYFT-A74Y8-3F815$1.3.6.1.4.1.31746$1', + '1$SMDP.GSMA.COM$04386-AGYFT-A74Y8-3F815$1.3.6.1.4.1.31746', + '1$SMDP.GSMA.COM$$1.3.6.1.4.1.31746'] + for s in STRS: + ac = ActivationCode.from_string(s) + self.assertEqual(s, ac.to_string()) + + class TestECKA(unittest.TestCase): def test_mode51(self): curve = ec.SECP256R1() -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35749?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: I2256722c04b56e8d9c16a65e3cd94f6a46f4ed85 Gerrit-Change-Number: 35749 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-bsc[master]: ctrl: Remove unused vty includes
by fixeria 30 Jan '24

30 Jan '24
Attention is currently required from: matanp. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/35744?usp=email ) Change subject: ctrl: Remove unused vty includes ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/35744?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ib464d0be9df839740a648ff6747130c18d33455d Gerrit-Change-Number: 35744 Gerrit-PatchSet: 1 Gerrit-Owner: matanp <matan1008(a)gmail.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: matanp <matan1008(a)gmail.com> Gerrit-Comment-Date: Tue, 30 Jan 2024 20:07:52 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-bsc[master]: ctrl: Add ms power
by fixeria 30 Jan '24

30 Jan '24
Attention is currently required from: matanp. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/35747?usp=email ) Change subject: ctrl: Add ms power ...................................................................... Patch Set 3: (2 comments) Commit Message: https://gerrit.osmocom.org/c/osmo-bsc/+/35747/comment/69b475df_cf9f8d5f PS3, Line 7: ctrl: Add ms power Please add at least a brief description for the command(s) you're adding. Something like: "this new command allows you to control MS power level for a specific logical channel". I would also point out that the effect of this command may differ depending on whether you have `static` or `dynamic` MS power control. For `static` it would instruct the MS to transmit at the requested power level. However, for `dynamic` it would simply limit the maximum power level and not necessarily affect the actual MS power level. File src/osmo-bsc/bts_trx_ts_lchan_ctrl.c: https://gerrit.osmocom.org/c/osmo-bsc/+/35747/comment/1b529b9d_4b01533a PS3, Line 2: * (C) 2013-2015 by Holger Hans Peter Freyther : * (C) 2013-2022 by looks like you're missing to update the copyright header -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/35747?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I6f556b66011be6126d6bac31a14101ba37f81cc4 Gerrit-Change-Number: 35747 Gerrit-PatchSet: 3 Gerrit-Owner: matanp <matan1008(a)gmail.com> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: matanp <matan1008(a)gmail.com> Gerrit-Comment-Date: Tue, 30 Jan 2024 20:07:40 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmocore[master]: ctrl: Add lchan node
by matanp 30 Jan '24

30 Jan '24
matanp has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35745?usp=email ) Change subject: ctrl: Add lchan node ...................................................................... ctrl: Add lchan node Change-Id: Ibf2786f668ee7e4f5b6a9ef43f2141cd2d79b4e2 --- M include/osmocom/ctrl/control_cmd.h 1 file changed, 10 insertions(+), 0 deletions(-) Approvals: fixeria: Looks good to me, but someone else must approve matanp: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/include/osmocom/ctrl/control_cmd.h b/include/osmocom/ctrl/control_cmd.h index 1451ffb..d9408be 100644 --- a/include/osmocom/ctrl/control_cmd.h +++ b/include/osmocom/ctrl/control_cmd.h @@ -24,6 +24,7 @@ CTRL_NODE_TS, /* TS specific (net.btsN.trxM.tsI.) */ CTRL_NODE_FSM, /* Finite State Machine (description) */ CTRL_NODE_FSM_INST, /* Finite State Machine (instance) */ + CTRL_NODE_LCHAN, /* LCHAN specific (net.btsN.trxM.tsI.lchanL) */ _LAST_CTRL_NODE }; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35745?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ibf2786f668ee7e4f5b6a9ef43f2141cd2d79b4e2 Gerrit-Change-Number: 35745 Gerrit-PatchSet: 2 Gerrit-Owner: matanp <matan1008(a)gmail.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: matanp <matan1008(a)gmail.com> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • ...
  • 156
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.