Hoernchen has uploaded this change for review. (
https://gerrit.osmocom.org/c/pysim/+/40576?usp=email )
Change subject: smdpp: map test mode matching id to existing profile for convenience
......................................................................
smdpp: map test mode matching id to existing profile for convenience
Either that, or we have to create actual files we can serve.
Change-Id: I6c8c08343678e9a3b978bc9c43a9b56a8d832d10
---
M osmo-smdpp.py
1 file changed, 7 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/76/40576/1
diff --git a/osmo-smdpp.py b/osmo-smdpp.py
index c1cfa31..918a1fe 100755
--- a/osmo-smdpp.py
+++ b/osmo-smdpp.py
@@ -723,7 +723,8 @@
'download_attempts': 0,
'cc_attempts': 0,
'associated_eid': None,
- 'expiration': None
+ 'expiration': None,
+ 'profile_path': 'TS48v4_SAIP2.3_BERTLV' # Use existing
profile for testing
}
}
@@ -1378,7 +1379,11 @@
raise ApiError('8.2.7', '3.8', 'Confirmation Code is
refused')
# Perform actual protection + binding of profile package (or return pre-bound
one)
- with open(os.path.join(self.upp_dir, ss.matchingId)+'.der', 'rb')
as f:
+ upp_fname = ss.matchingId
+ if self.test_mode:
+ profile_info = self.activation_code_profiles[ss.matchingId]
+ upp_fname = profile_info.get('profile_path', ss.matchingId)
+ with open(os.path.join(self.upp_dir, upp_fname)+'.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
--
To view, visit
https://gerrit.osmocom.org/c/pysim/+/40576?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I6c8c08343678e9a3b978bc9c43a9b56a8d832d10
Gerrit-Change-Number: 40576
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de>