laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/37509?usp=email )
(
3 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)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(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
Jenkins Builder: Verified
dexter: Looks good to me, but someone else must approve
diff --git a/osmo-smdpp.py b/osmo-smdpp.py
index cc4b121..e9638aa 100755
--- a/osmo-smdpp.py
+++ b/osmo-smdpp.py
@@ -376,6 +376,9 @@
# Put together profileMetadata + _bin
ss.profileMetadata = ProfileMetadata(iccid_bin=h2b(swap_nibbles(iccid_str)), spn="OsmocomSPN", profile_name=matchingId)
+ # enable notifications for all operations
+ for event in ['enable', 'disable', 'delete']:
+ ss.profileMetadata.add_notification(event, self.server_hostname)
profileMetadata_bin = ss.profileMetadata.gen_store_metadata_request()
# Put together smdpSigned2 + _bin
diff --git a/pySim/esim/es8p.py b/pySim/esim/es8p.py
index ff266ce..a5c88f0 100644
--- a/pySim/esim/es8p.py
+++ b/pySim/esim/es8p.py
@@ -25,6 +25,7 @@
import pySim.esim.rsp as rsp
from pySim.esim.bsp import BspInstance
+from pySim.esim import PMO
# Given that GSMA RSP uses ASN.1 in a very weird way, we actually cannot encode the full data type before
# signing, but we have to build parts of it separately first, then sign that, so we can put the signature
@@ -78,6 +79,11 @@
self.iccid_bin = iccid_bin
self.spn = spn
self.profile_name = profile_name
+ self.notifications = []
+
+ def add_notification(self, event: str, address: str):
+ """Add an 'other' notification to the notification configuration of the metadata"""
+ self.notifications.append((event, address))
def gen_store_metadata_request(self) -> bytes:
"""Generate encoded (but unsigned) StoreMetadataReqest DO (SGP.22 5.5.3)"""
@@ -86,6 +92,12 @@
'serviceProviderName': self.spn,
'profileName': self.profile_name,
}
+ nci = []
+ for n in self.notifications:
+ pmo = PMO(n[0])
+ nci.append({'profileManagementOperation': pmo.to_bitstring(), 'notificationAddress': n[1]})
+ if len(nci):
+ smr['notificationConfigurationInfo'] = nci
return rsp.asn1.encode('StoreMetadataRequest', smr)
--
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: merged
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/37526?usp=email )
Change subject: ts_31_102: Make use of ts_31_103_shared and add Rel 18 files
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37526?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: I68ca15084f9654468bd37526c02a66322085b25b
Gerrit-Change-Number: 37526
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Fri, 19 Jul 2024 12:10:04 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment