summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2017-08-22 19:10:20 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2017-08-23 12:55:43 +0000
commitcd6ad9d5198a721c6472c57065e5e4e83935a746 (patch)
tree4f6556ad2378570bc91f0a8e5e12de96dd70a07b
parentca126b1d82fb34d469dfcb1cdd659fc3acd9e884 (diff)
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
-rw-r--r--src/osmo_gsm_tester/ofono_client.py6
1 files changed, 6 insertions, 0 deletions
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 @@ class Modem(log.Origin):
'convenience for ofono Modem interaction'
msisdn = None
sms_received_list = None
+ _ki = None
def __init__(self, conf):
self.conf = conf
@@ -394,7 +395,12 @@ class Modem(log.Origin):
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):