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

Keyboard Shortcuts

Thread View

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

gerrit-log

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

July 2024

  • 1 participants
  • 1379 discussions
[S] Change in osmo-bts[master]: doc/examples: set 'oml remote-ip' to '127.0.0.1'
by laforge 17 Jul '24

17 Jul '24
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/37516?usp=email ) Change subject: doc/examples: set 'oml remote-ip' to '127.0.0.1' ...................................................................... Patch Set 1: (1 comment) Commit Message: https://gerrit.osmocom.org/c/osmo-bts/+/37516/comment/b4a70a08_254bc513 PS1, Line 9: n a typical lab setup the BSC is co-located on the same host with : the BTS process. > that is only really true for osmo-bts-trx. for lc15/sysmo/oc2g it is very unlikely that you'd have 127.0.0.1 for BTS+BSC. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/37516?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I41b8de14c19088ef614ce751c738e4fc5969f0da Gerrit-Change-Number: 37516 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Wed, 17 Jul 2024 16:39:17 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-bts[master]: doc/examples: set 'oml remote-ip' to '127.0.0.1'
by laforge 17 Jul '24

17 Jul '24
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/37516?usp=email ) Change subject: doc/examples: set 'oml remote-ip' to '127.0.0.1' ...................................................................... Patch Set 1: (1 comment) Commit Message: https://gerrit.osmocom.org/c/osmo-bts/+/37516/comment/aa643064_a0638ca6 PS1, Line 9: n a typical lab setup the BSC is co-located on the same host with : the BTS process. that is only really true for osmo-bts-trx. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/37516?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I41b8de14c19088ef614ce751c738e4fc5969f0da Gerrit-Change-Number: 37516 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Wed, 17 Jul 2024 16:38:38 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[S] Change in pysim[master]: osmo-smdpp + es9p_client: HTTP status 204 is used for handleNotification
by laforge 17 Jul '24

17 Jul '24
Attention is currently required from: dexter. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/37511?usp=email ) Change subject: osmo-smdpp + es9p_client: HTTP status 204 is used for handleNotification ...................................................................... Patch Set 5: (1 comment) File osmo-smdpp.py: https://gerrit.osmocom.org/c/pysim/+/37511/comment/1edbeec9_34510ea0 PS3, Line 494: return > I still see that osmo-smdpp. […] done. I forgot that 204 should also be sent in the erroneous case. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37511?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: I890bdbd3e1c4578d2d5f0367958fdce26e338cac Gerrit-Change-Number: 37511 Gerrit-PatchSet: 5 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Wed, 17 Jul 2024 16:37:40 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in pysim[master]: osmo-smdpp + es9p_client: HTTP status 204 is used for handleNotification
by laforge 17 Jul '24

17 Jul '24
Attention is currently required from: dexter, laforge. Hello Jenkins Builder, dexter, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/37511?usp=email to look at the new patch set (#5). The following approvals got outdated and were removed: Code-Review+1 by dexter, Verified+1 by Jenkins Builder Change subject: osmo-smdpp + es9p_client: HTTP status 204 is used for handleNotification ...................................................................... osmo-smdpp + es9p_client: HTTP status 204 is used for handleNotification As SGP.22 states, the handleNotification endpoint uses HTTP status 204, not 200 (due to its empty body). Change-Id: I890bdbd3e1c4578d2d5f0367958fdce26e338cac --- M osmo-smdpp.py M pySim/esim/es9p.py 2 files changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/11/37511/5 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37511?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: I890bdbd3e1c4578d2d5f0367958fdce26e338cac Gerrit-Change-Number: 37511 Gerrit-PatchSet: 5 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in pysim[master]: osmo-smdpp: Request enable/disable/delete notifications in metadata
by laforge 17 Jul '24

17 Jul '24
Hello Jenkins Builder, dexter, fixeria, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/37509?usp=email to look at the new patch set (#4). 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: osmo-smdpp: Request enable/disable/delete notifications in metadata ...................................................................... osmo-smdpp: Request enable/disable/delete notifications in metadata this way, the eUICC will send us notifications whenever our profiles are enabled/disabled/deleted. Change-Id: I2861290864522b691b30b079c7c2e1466904df2d --- M osmo-smdpp.py M pySim/esim/es8p.py 2 files changed, 27 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/09/37509/4 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37509?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: I2861290864522b691b30b079c7c2e1466904df2d Gerrit-Change-Number: 37509 Gerrit-PatchSet: 4 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: newpatchset
1 0
0 0
[S] Change in pysim[master]: pySim.ts_31_103: update to spec v18.1.0 Release 18
by laforge 17 Jul '24

17 Jul '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/+/37523?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: pySim.ts_31_103: update to spec v18.1.0 Release 18 ...................................................................... pySim.ts_31_103: update to spec v18.1.0 Release 18 This adds two new EFs and one new IST service. Change-Id: Iced1700046b459399a3e8305e1387ec65eeb3536 --- M pySim/ts_31_103.py M pysim-testdata/pySim-trace_test_gsmtap.pcapng.ok 2 files changed, 40 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/23/37523/2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37523?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: Iced1700046b459399a3e8305e1387ec65eeb3536 Gerrit-Change-Number: 37523 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
[M] Change in pysim[master]: contrib/es9p_client: Add support for reporting notifications to SM-DP+
by laforge 17 Jul '24

17 Jul '24
Attention is currently required from: dexter, fixeria. Hello Jenkins Builder, dexter, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/37499?usp=email to look at the new patch set (#6). Change subject: contrib/es9p_client: Add support for reporting notifications to SM-DP+ ...................................................................... contrib/es9p_client: Add support for reporting notifications to SM-DP+ The ES9+ interface is not only used for downloading eSIM profiles, but it is also used to report back the installation result as well as profile management operations like enable/disable/delete. Change-Id: Iefba7fa0471b34eae30700ed43531a515af0eb93 --- M contrib/es9p_client.py M pySim/esim/__init__.py 2 files changed, 132 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/99/37499/6 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37499?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: Iefba7fa0471b34eae30700ed43531a515af0eb93 Gerrit-Change-Number: 37499 Gerrit-PatchSet: 6 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-CC: 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]: contrib/es9p_client: Add support for reporting notifications to SM-DP+
by laforge 17 Jul '24

17 Jul '24
Attention is currently required from: dexter, fixeria. Hello Jenkins Builder, dexter, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/37499?usp=email to look at the new patch set (#5). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: contrib/es9p_client: Add support for reporting notifications to SM-DP+ ...................................................................... contrib/es9p_client: Add support for reporting notifications to SM-DP+ The ES9+ interface is not only used for downloading eSIM profiles, but it is also used to report back the installation result as well as profile management operations like enable/disable/delete. Change-Id: Iefba7fa0471b34eae30700ed43531a515af0eb93 --- M contrib/es9p_client.py M pySim/esim/__init__.py 2 files changed, 132 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/99/37499/5 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37499?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: Iefba7fa0471b34eae30700ed43531a515af0eb93 Gerrit-Change-Number: 37499 Gerrit-PatchSet: 5 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-CC: 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]: contrib/es9p_client: Add support for reporting notifications to SM-DP+
by laforge 17 Jul '24

17 Jul '24
Attention is currently required from: dexter, fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/37499?usp=email ) Change subject: contrib/es9p_client: Add support for reporting notifications to SM-DP+ ...................................................................... Patch Set 4: (4 comments) File pySim/esim/__init__.py: https://gerrit.osmocom.org/c/pysim/+/37499/comment/f286c822_7f0588ae PS3, Line 7: pmo4operation > Looks like you want this to be an `enum.IntEnum`? […] I just played a bit with the idea, but decided against it. First of all, I want lowercase string names as we use lowercase strings everywhere in our json (and all enum.Enum seems to use uppercase). Second, I'm not entirely sure how I can implement the bitstring-compatibility to it, as enum.Enum and derived classes seems to normally work with static/class members and not instances? https://gerrit.osmocom.org/c/pysim/+/37499/comment/3e8ea6c0_b58e2ed3 PS3, Line 23: _num_bits > FYI, this can be implemented as: […] Thanks. Hoewever, I'm not sure I want to introduce python version checks... it's not performance critical. https://gerrit.osmocom.org/c/pysim/+/37499/comment/3165eed2_4a32cdfe PS3, Line 35: from_int > If this class was an `enum.IntEnum`, this API would look like: […] decided against enum https://gerrit.osmocom.org/c/pysim/+/37499/comment/f6396316_770c3a44 PS3, Line 35: str > `str` is not a valid type hint for this function, should be `-> 'PMO'` I think Done -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37499?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: Iefba7fa0471b34eae30700ed43531a515af0eb93 Gerrit-Change-Number: 37499 Gerrit-PatchSet: 4 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Wed, 17 Jul 2024 16:04:04 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[L] Change in pysim[master]: es9p_client: Move code into a class; do common steps in constructor
by laforge 17 Jul '24

17 Jul '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/37498?usp=email ) Change subject: es9p_client: Move code into a class; do common steps in constructor ...................................................................... es9p_client: Move code into a class; do common steps in constructor This is in preparation of supporting more than just 'download' Change-Id: I5a165efcb97d9264369a9c6571cd92022cbcdfb0 --- M contrib/es9p_client.py 1 file changed, 175 insertions(+), 157 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve diff --git a/contrib/es9p_client.py b/contrib/es9p_client.py index 987b85e..5e72e7b 100755 --- a/contrib/es9p_client.py +++ b/contrib/es9p_client.py @@ -41,19 +41,21 @@ parser.add_argument('--url', required=True, help='Base URL of ES9+ API endpoint') parser.add_argument('--server-ca-cert', help="""X.509 CA certificates acceptable for the server side. In production use cases, this would be the GSMA Root CA (CI) certificate.""") +parser.add_argument('--certificate-path', default='.', + help="Path in which to look for certificate and key files.") +parser.add_argument('--euicc-certificate', default='CERT_EUICC_ECDSA_NIST.der', + help="File name of DER-encoded eUICC certificate file.") +parser.add_argument('--euicc-private-key', default='SK_EUICC_ECDSA_NIST.pem', + help="File name of PEM-format eUICC secret key file.") +parser.add_argument('--eum-certificate', default='CERT_EUM_ECDSA_NIST.der', + help="File name of DER-encoded EUM certificate file.") +parser.add_argument('--ci-certificate', default='CERT_CI_ECDSA_NIST.der', + help="File name of DER-encoded CI certificate file.") + subparsers = parser.add_subparsers(dest='command',help="The command (API function) to call", required=True) +# download parser_dl = subparsers.add_parser('download', help="ES9+ download") -parser_dl.add_argument('--certificate-path', default='.', - help="Path in which to look for certificate and key files.") -parser_dl.add_argument('--euicc-certificate', default='CERT_EUICC_ECDSA_NIST.der', - help="File name of DER-encoded eUICC certificate file.") -parser_dl.add_argument('--euicc-private-key', default='SK_EUICC_ECDSA_NIST.pem', - help="File name of PEM-format eUICC secret key file.") -parser_dl.add_argument('--eum-certificate', default='CERT_EUM_ECDSA_NIST.der', - help="File name of DER-encoded EUM certificate file.") -parser_dl.add_argument('--ci-certificate', default='CERT_CI_ECDSA_NIST.der', - help="File name of DER-encoded CI certificate file.") parser_dl.add_argument('--matchingId', required=True, help='MatchingID that shall be used by profile download') parser_dl.add_argument('--output-path', default='.', @@ -61,178 +63,183 @@ parser_dl.add_argument('--confirmation-code', help="Confirmation Code for the eSIM download") +class Es9pClient: + def __init__(self, opts): + self.opts = opts + self.cert_and_key = CertAndPrivkey() + self.cert_and_key.cert_from_der_file(os.path.join(opts.certificate_path, opts.euicc_certificate)) + self.cert_and_key.privkey_from_pem_file(os.path.join(opts.certificate_path, opts.euicc_private_key)) -def do_download(opts): + with open(os.path.join(opts.certificate_path, opts.eum_certificate), 'rb') as f: + self.eum_cert = x509.load_der_x509_certificate(f.read()) - cert_and_key = CertAndPrivkey() - cert_and_key.cert_from_der_file(os.path.join(opts.certificate_path, opts.euicc_certificate)) - cert_and_key.privkey_from_pem_file(os.path.join(opts.certificate_path, opts.euicc_private_key)) + with open(os.path.join(opts.certificate_path, opts.ci_certificate), 'rb') as f: + self.ci_cert = x509.load_der_x509_certificate(f.read()) + subject_exts = list(filter(lambda x: isinstance(x.value, x509.SubjectKeyIdentifier), self.ci_cert.extensions)) + subject_pkid = subject_exts[0].value + self.ci_pkid = subject_pkid.key_identifier - with open(os.path.join(opts.certificate_path, opts.eum_certificate), 'rb') as f: - eum_cert = x509.load_der_x509_certificate(f.read()) + print("EUICC: %s" % self.cert_and_key.cert.subject) + print("EUM: %s" % self.eum_cert.subject) + print("CI: %s" % self.ci_cert.subject) - with open(os.path.join(opts.certificate_path, opts.ci_certificate), 'rb') as f: - ci_cert = x509.load_der_x509_certificate(f.read()) - subject_exts = list(filter(lambda x: isinstance(x.value, x509.SubjectKeyIdentifier), ci_cert.extensions)) - subject_pkid = subject_exts[0].value - ci_pkid = subject_pkid.key_identifier + self.eid = self.cert_and_key.cert.subject.get_attributes_for_oid(x509.oid.NameOID.SERIAL_NUMBER)[0].value + print("EID: %s" % self.eid) + print("CI PKID: %s" % b2h(self.ci_pkid)) + print() - print("EUICC: %s" % cert_and_key.cert.subject) - print("EUM: %s" % eum_cert.subject) - print("CI: %s" % ci_cert.subject) + self.peer = es9p.Es9pApiClient(opts.url, server_cert_verify=opts.server_ca_cert) - eid = cert_and_key.cert.subject.get_attributes_for_oid(x509.oid.NameOID.SERIAL_NUMBER)[0].value - print("EID: %s" % eid) - print("CI PKID: %s" % b2h(ci_pkid)) - print() - peer = es9p.Es9pApiClient(opts.url, server_cert_verify=opts.server_ca_cert) + def do_download(self): - print("Step 1: InitiateAuthentication...") + print("Step 1: InitiateAuthentication...") - euiccInfo1 = { - 'svn': b'\x02\x04\x00', - 'euiccCiPKIdListForVerification': [ - ci_pkid, - ], - 'euiccCiPKIdListForSigning': [ - ci_pkid, - ], - } + euiccInfo1 = { + 'svn': b'\x02\x04\x00', + 'euiccCiPKIdListForVerification': [ + self.ci_pkid, + ], + 'euiccCiPKIdListForSigning': [ + self.ci_pkid, + ], + } - data = { - 'euiccChallenge': os.urandom(16), - 'euiccInfo1': euiccInfo1, - 'smdpAddress': urlparse(opts.url).netloc, - } - init_auth_res = peer.call_initiateAuthentication(data) - print(init_auth_res) + data = { + 'euiccChallenge': os.urandom(16), + 'euiccInfo1': euiccInfo1, + 'smdpAddress': urlparse(self.opts.url).netloc, + } + init_auth_res = self.peer.call_initiateAuthentication(data) + print(init_auth_res) - print("Step 2: AuthenticateClient...") + print("Step 2: AuthenticateClient...") - #res['serverSigned1'] - #res['serverSignature1'] - print("TODO: verify serverSignature1 over serverSigned1") - #res['transactionId'] - print("TODO: verify transactionId matches the signed one in serverSigned1") - #res['euiccCiPKIdToBeUsed'] - # TODO: select eUICC certificate based on CI - #res['serverCertificate'] - # TODO: verify server certificate against CI + #res['serverSigned1'] + #res['serverSignature1'] + print("TODO: verify serverSignature1 over serverSigned1") + #res['transactionId'] + print("TODO: verify transactionId matches the signed one in serverSigned1") + #res['euiccCiPKIdToBeUsed'] + # TODO: select eUICC certificate based on CI + #res['serverCertificate'] + # TODO: verify server certificate against CI - euiccInfo2 = { - 'profileVersion': b'\x02\x03\x01', - 'svn': euiccInfo1['svn'], - 'euiccFirmwareVer': b'\x23\x42\x00', - 'extCardResource': b'\x81\x01\x00\x82\x04\x00\x04\x9ch\x83\x02"#', - 'uiccCapability': (b'k6\xd3\xc3', 32), - 'javacardVersion': b'\x11\x02\x00', - 'globalplatformVersion': b'\x02\x03\x00', - 'rspCapability': (b'\x9c', 6), - 'euiccCiPKIdListForVerification': euiccInfo1['euiccCiPKIdListForVerification'], - 'euiccCiPKIdListForSigning': euiccInfo1['euiccCiPKIdListForSigning'], - #'euiccCategory': - #'forbiddenProfilePolicyRules': - 'ppVersion': b'\x01\x00\x00', - 'sasAcreditationNumber': 'OSMOCOM-TEST-1', #TODO: make configurable - #'certificationDataObject': - } + euiccInfo2 = { + 'profileVersion': b'\x02\x03\x01', + 'svn': euiccInfo1['svn'], + 'euiccFirmwareVer': b'\x23\x42\x00', + 'extCardResource': b'\x81\x01\x00\x82\x04\x00\x04\x9ch\x83\x02"#', + 'uiccCapability': (b'k6\xd3\xc3', 32), + 'javacardVersion': b'\x11\x02\x00', + 'globalplatformVersion': b'\x02\x03\x00', + 'rspCapability': (b'\x9c', 6), + 'euiccCiPKIdListForVerification': euiccInfo1['euiccCiPKIdListForVerification'], + 'euiccCiPKIdListForSigning': euiccInfo1['euiccCiPKIdListForSigning'], + #'euiccCategory': + #'forbiddenProfilePolicyRules': + 'ppVersion': b'\x01\x00\x00', + 'sasAcreditationNumber': 'OSMOCOM-TEST-1', #TODO: make configurable + #'certificationDataObject': + } - euiccSigned1 = { - 'transactionId': h2b(init_auth_res['transactionId']), - 'serverAddress': init_auth_res['serverSigned1']['serverAddress'], - 'serverChallenge': init_auth_res['serverSigned1']['serverChallenge'], - 'euiccInfo2': euiccInfo2, - 'ctxParams1': - ('ctxParamsForCommonAuthentication', { - 'matchingId': opts.matchingId, - 'deviceInfo': { - 'tac': b'\x35\x23\x01\x45', # same as lpac - 'deviceCapabilities': {}, - #imei: - } - }), - } - euiccSigned1_bin = rsp.asn1.encode('EuiccSigned1', euiccSigned1) - euiccSignature1 = cert_and_key.ecdsa_sign(euiccSigned1_bin) - auth_clnt_req = { - 'transactionId': init_auth_res['transactionId'], - 'authenticateServerResponse': - ('authenticateResponseOk', { - 'euiccSigned1': euiccSigned1, - 'euiccSignature1': euiccSignature1, - 'euiccCertificate': rsp.asn1.decode('Certificate', cert_and_key.get_cert_as_der()), - 'eumCertificate': rsp.asn1.decode('Certificate', eum_cert.public_bytes(Encoding.DER)) - }) - } - auth_clnt_res = peer.call_authenticateClient(auth_clnt_req) - print(auth_clnt_res) - #auth_clnt_res['transactionId'] - print("TODO: verify transactionId matches previous ones") - #auth_clnt_res['profileMetadata'] - # TODO: what's in here? - #auth_clnt_res['smdpSigned2']['bppEuiccOtpk'] - #auth_clnt_res['smdpSignature2'] - print("TODO: verify serverSignature2 over smdpSigned2") + euiccSigned1 = { + 'transactionId': h2b(init_auth_res['transactionId']), + 'serverAddress': init_auth_res['serverSigned1']['serverAddress'], + 'serverChallenge': init_auth_res['serverSigned1']['serverChallenge'], + 'euiccInfo2': euiccInfo2, + 'ctxParams1': + ('ctxParamsForCommonAuthentication', { + 'matchingId': self.opts.matchingId, + 'deviceInfo': { + 'tac': b'\x35\x23\x01\x45', # same as lpac + 'deviceCapabilities': {}, + #imei: + } + }), + } + euiccSigned1_bin = rsp.asn1.encode('EuiccSigned1', euiccSigned1) + euiccSignature1 = self.cert_and_key.ecdsa_sign(euiccSigned1_bin) + auth_clnt_req = { + 'transactionId': init_auth_res['transactionId'], + 'authenticateServerResponse': + ('authenticateResponseOk', { + 'euiccSigned1': euiccSigned1, + 'euiccSignature1': euiccSignature1, + 'euiccCertificate': rsp.asn1.decode('Certificate', self.cert_and_key.get_cert_as_der()), + 'eumCertificate': rsp.asn1.decode('Certificate', self.eum_cert.public_bytes(Encoding.DER)) + }) + } + auth_clnt_res = self.peer.call_authenticateClient(auth_clnt_req) + print(auth_clnt_res) + #auth_clnt_res['transactionId'] + print("TODO: verify transactionId matches previous ones") + #auth_clnt_res['profileMetadata'] + # TODO: what's in here? + #auth_clnt_res['smdpSigned2']['bppEuiccOtpk'] + #auth_clnt_res['smdpSignature2'] + print("TODO: verify serverSignature2 over smdpSigned2") - smdp_cert = x509.load_der_x509_certificate(auth_clnt_res['smdpCertificate']) + smdp_cert = x509.load_der_x509_certificate(auth_clnt_res['smdpCertificate']) - print("Step 3: GetBoundProfilePackage...") - # Generate a one-time ECKA key pair (ot{PK,SK}.DP.ECKA) using the curve indicated by the Key Parameter - # Reference value of CERT.DPpb.ECDSA - euicc_ot = ec.generate_private_key(smdp_cert.public_key().public_numbers().curve) + print("Step 3: GetBoundProfilePackage...") + # Generate a one-time ECKA key pair (ot{PK,SK}.DP.ECKA) using the curve indicated by the Key Parameter + # Reference value of CERT.DPpb.ECDSA + euicc_ot = ec.generate_private_key(smdp_cert.public_key().public_numbers().curve) - # extract the public key in (hopefully) the right format for the ES8+ interface - euicc_otpk = euicc_ot.public_key().public_bytes(Encoding.X962, PublicFormat.UncompressedPoint) + # extract the public key in (hopefully) the right format for the ES8+ interface + euicc_otpk = euicc_ot.public_key().public_bytes(Encoding.X962, PublicFormat.UncompressedPoint) - euiccSigned2 = { - 'transactionId': h2b(auth_clnt_res['transactionId']), - 'euiccOtpk': euicc_otpk, - #hashCC - } - # check for smdpSigned2 ccRequiredFlag, and send it in PrepareDownloadRequest hashCc - if auth_clnt_res['smdpSigned2']['ccRequiredFlag']: - if not opts.confirmation_code: - raise ValueError('Confirmation Code required but not provided') - cc_hash = hashlib.sha256(opts.confirmation_code.encode('ascii')).digest() - euiccSigned2['hashCc'] = hashlib.sha256(cc_hash + euiccSigned2['transactionId']).digest() - euiccSigned2_bin = rsp.asn1.encode('EUICCSigned2', euiccSigned2) - euiccSignature2 = cert_and_key.ecdsa_sign(euiccSigned2_bin + auth_clnt_res['smdpSignature2']) - gbp_req = { - 'transactionId': auth_clnt_res['transactionId'], - 'prepareDownloadResponse': - ('downloadResponseOk', { - 'euiccSigned2': euiccSigned2, - 'euiccSignature2': euiccSignature2, - }) - } - gbp_res = peer.call_getBoundProfilePackage(gbp_req) - print(gbp_res) - #gbp_res['transactionId'] - # TODO: verify transactionId - print("TODO: verify transactionId matches previous ones") - bpp_bin = gbp_res['boundProfilePackage'] - print("TODO: verify boundProfilePackage smdpSignature") + euiccSigned2 = { + 'transactionId': h2b(auth_clnt_res['transactionId']), + 'euiccOtpk': euicc_otpk, + #hashCC + } + # check for smdpSigned2 ccRequiredFlag, and send it in PrepareDownloadRequest hashCc + if auth_clnt_res['smdpSigned2']['ccRequiredFlag']: + if not self.opts.confirmation_code: + raise ValueError('Confirmation Code required but not provided') + cc_hash = hashlib.sha256(self.opts.confirmation_code.encode('ascii')).digest() + euiccSigned2['hashCc'] = hashlib.sha256(cc_hash + euiccSigned2['transactionId']).digest() + euiccSigned2_bin = rsp.asn1.encode('EUICCSigned2', euiccSigned2) + euiccSignature2 = self.cert_and_key.ecdsa_sign(euiccSigned2_bin + auth_clnt_res['smdpSignature2']) + gbp_req = { + 'transactionId': auth_clnt_res['transactionId'], + 'prepareDownloadResponse': + ('downloadResponseOk', { + 'euiccSigned2': euiccSigned2, + 'euiccSignature2': euiccSignature2, + }) + } + gbp_res = self.peer.call_getBoundProfilePackage(gbp_req) + print(gbp_res) + #gbp_res['transactionId'] + # TODO: verify transactionId + print("TODO: verify transactionId matches previous ones") + bpp_bin = gbp_res['boundProfilePackage'] + print("TODO: verify boundProfilePackage smdpSignature") - bpp = BoundProfilePackage() - upp_bin = bpp.decode(euicc_ot, eid, bpp_bin) + bpp = BoundProfilePackage() + upp_bin = bpp.decode(euicc_ot, self.eid, bpp_bin) - iccid = swap_nibbles(b2h(bpp.storeMetadataRequest['iccid'])) - base_name = os.path.join(opts.output_path, '%s' % iccid) + iccid = swap_nibbles(b2h(bpp.storeMetadataRequest['iccid'])) + base_name = os.path.join(self.opts.output_path, '%s' % iccid) - print("SUCCESS: Storing files as %s.*.der" % base_name) + print("SUCCESS: Storing files as %s.*.der" % base_name) - # write various output files - with open(base_name+'.upp.der', 'wb') as f: - f.write(bpp.upp) - with open(base_name+'.isdp.der', 'wb') as f: - f.write(bpp.encoded_configureISDPRequest) - with open(base_name+'.smr.der', 'wb') as f: - f.write(bpp.encoded_storeMetadataRequest) + # write various output files + with open(base_name+'.upp.der', 'wb') as f: + f.write(bpp.upp) + with open(base_name+'.isdp.der', 'wb') as f: + f.write(bpp.encoded_configureISDPRequest) + with open(base_name+'.smr.der', 'wb') as f: + f.write(bpp.encoded_storeMetadataRequest) if __name__ == '__main__': opts = parser.parse_args() + c = Es9pClient(opts) + if opts.command == 'download': - do_download(opts) + c.do_download() -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37498?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: I5a165efcb97d9264369a9c6571cd92022cbcdfb0 Gerrit-Change-Number: 37498 Gerrit-PatchSet: 3 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
  • ← Newer
  • 1
  • ...
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • ...
  • 138
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.