aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests/mm_auth/mm_auth_test.ok
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-03-30 11:22:25 +0200
committerHarald Welte <laforge@gnumonks.org>2016-03-31 11:56:14 +0200
commit4554a62c4d16bd95ae4fb38ede0fd9f64a4d1429 (patch)
treea9853d69a11bb390cc4b708d8215c9cd30b9ed9d /openbsc/tests/mm_auth/mm_auth_test.ok
parent37984bdb1b507446421e5aa6131ccdf117dd269f (diff)
MM Auth test: add two tests for AUTH_THEN_CIPH
Test two situations for AUTH_DO_AUTH_THEN_CIPH: - when no auth tuple is available - when the key sequence from LU is marked invalid Add convenience auth tuple comparison function using stringification.
Diffstat (limited to 'openbsc/tests/mm_auth/mm_auth_test.ok')
-rw-r--r--openbsc/tests/mm_auth/mm_auth_test.ok16
1 files changed, 16 insertions, 0 deletions
diff --git a/openbsc/tests/mm_auth/mm_auth_test.ok b/openbsc/tests/mm_auth/mm_auth_test.ok
index 5efb3deca..52feb3679 100644
--- a/openbsc/tests/mm_auth/mm_auth_test.ok
+++ b/openbsc/tests/mm_auth/mm_auth_test.ok
@@ -6,3 +6,19 @@ auth_get_tuple_for_subscr(key_seq=0) --> auth_action == (internal error)
* test_auth_not_avail()
wrapped: db_get_authinfo_for_subscr(): rc = -2
auth_get_tuple_for_subscr(key_seq=0) --> auth_action == AUTH_NOT_AVAIL
+
+* test_auth_then_ciph1()
+wrapped: db_get_authinfo_for_subscr(): rc = 0
+wrapped: db_get_lastauthtuple_for_subscr(): rc = -2
+wrapped: db_sync_lastauthtuple_for_subscr(): rc = 0
+auth_get_tuple_for_subscr(key_seq=0) --> auth_action == AUTH_DO_AUTH_THEN_CIPH
+
+* test_auth_then_ciph2()
+wrapped: db_get_authinfo_for_subscr(): rc = 0
+wrapped: db_get_lastauthtuple_for_subscr(): rc = 0
+wrapped: db_sync_lastauthtuple_for_subscr(): rc = 0
+auth_get_tuple_for_subscr(key_seq=7) --> auth_action == AUTH_DO_AUTH_THEN_CIPH
+wrapped: db_get_authinfo_for_subscr(): rc = 0
+wrapped: db_get_lastauthtuple_for_subscr(): rc = 0
+wrapped: db_sync_lastauthtuple_for_subscr(): rc = 0
+auth_get_tuple_for_subscr(key_seq=7) --> auth_action == AUTH_DO_AUTH_THEN_CIPH