aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests/mm_auth
AgeCommit message (Collapse)AuthorFilesLines
2016-03-31Fix MM Auth: disallow key_seq mismatchNeels Hofmeyr2-0/+38
In auth_get_tuple_for_subscr(), add missing condition to match incoming key_seq with stored key_seq, so that re-authentication is requested for mismatching key_seqs. Add test for this issue.
2016-03-31MM Auth: introduce AUTH_ERROR constant.Neels Hofmeyr2-2/+2
Instead of using hardcoded -1 for errors, include -1 in the enum auth_action type; apply its use. In the mm_auth test, the string output changes from '(internal error)' to 'AUTH_ERROR', since now the proper enum value is used in auth_action_names[].
2016-03-31MM Auth test: add test to re-use existing authNeels Hofmeyr2-0/+37
2016-03-31MM Auth test: add two tests for AUTH_THEN_CIPHNeels Hofmeyr2-0/+152
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.
2016-03-31Add MM Auth test; add auth_action_str() functionNeels Hofmeyr3-0/+148
Add basic MM Authentication test setup, with fake DB access and RAND_bytes(). So far implement simple tests for IO error during DB access and missing auth entry. To print the auth action during tests, add struct auth_action_names and auth_action_str() inline function in auth.[hc].