[PATCH] osmo-gsm-tester[master]: modem: Allow tests to change KI

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Tue Aug 22 17:10:57 UTC 2017


Review at  https://gerrit.osmocom.org/3583

modem: Allow tests to change KI

This is useful for tests that wants to fake a bad KI to test if auth and
encryption are working correctly.

Change-Id: I40cfed6f6b9239eea2b97ffa010b98c78f0cb9cb
---
M src/osmo_gsm_tester/ofono_client.py
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/83/3583/1

diff --git a/src/osmo_gsm_tester/ofono_client.py b/src/osmo_gsm_tester/ofono_client.py
index 60f98df..00cfd47 100644
--- a/src/osmo_gsm_tester/ofono_client.py
+++ b/src/osmo_gsm_tester/ofono_client.py
@@ -318,6 +318,7 @@
     'convenience for ofono Modem interaction'
     msisdn = None
     sms_received_list = None
+    _ki = None
 
     def __init__(self, conf):
         self.conf = conf
@@ -394,7 +395,12 @@
             raise log.Error('No IMSI')
         return imsi
 
+    def set_ki(self, ki):
+        self._ki = ki
+
     def ki(self):
+        if self._ki is not None:
+            return self._ki
         return self.conf.get('ki')
 
     def _on_netreg_property_changed(self, name, value):

-- 
To view, visit https://gerrit.osmocom.org/3583
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I40cfed6f6b9239eea2b97ffa010b98c78f0cb9cb
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>



More information about the gerrit-log mailing list