summaryrefslogtreecommitdiffstats
path: root/tests/comp128
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2016-06-27 15:44:16 +0200
committerHarald Welte <laforge@gnumonks.org>2016-06-29 16:33:40 +0000
commiteb59f241ec571c3bdfcd8b3fa25d8687a1191f39 (patch)
tree366145931db9ef66f0229311155cf93ee0f47ea8 /tests/comp128
parenta337b9c37a9ff561b9c6a2e7c4b2a65dfa3b0e7f (diff)
tests: test actual support status for auth. algo
Check if library actually support Milenage, COMP128 v2 and v3 algorithms instead of just printing enum values or nothing. Change-Id: I2b98481f56a8381058d4b29db5e8a36eb193eee9
Diffstat (limited to 'tests/comp128')
-rw-r--r--tests/comp128/comp128_test.c6
-rw-r--r--tests/comp128/comp128_test.ok4
2 files changed, 6 insertions, 4 deletions
diff --git a/tests/comp128/comp128_test.c b/tests/comp128/comp128_test.c
index eb6fb12c..07c98fa4 100644
--- a/tests/comp128/comp128_test.c
+++ b/tests/comp128/comp128_test.c
@@ -66,8 +66,10 @@ void test_comp128v2(char *rand, char *res)
int main(int argc, char **argv)
{
- printf("COMP128v2 support: %d\n", osmo_auth_alg_parse("COMP128v2"));
- printf("COMP128v3 support: %d\n", osmo_auth_alg_parse("COMP128v3"));
+ printf("COMP128v2 support: %d\n",
+ osmo_auth_supported(osmo_auth_alg_parse("COMP128v2")));
+ printf("COMP128v3 support: %d\n",
+ osmo_auth_supported(osmo_auth_alg_parse("COMP128v3")));
test_comp128v2("00000000000000000000000000000000", "34B4225BF16B96E118A85800");
test_comp128v2("00102030405060708090A0B0C0D0E0F0", "A892A8EFD6D33E3650372C00");
diff --git a/tests/comp128/comp128_test.ok b/tests/comp128/comp128_test.ok
index f9ba7ce2..cdac5f25 100644
--- a/tests/comp128/comp128_test.ok
+++ b/tests/comp128/comp128_test.ok
@@ -1,5 +1,5 @@
-COMP128v2 support: 2
-COMP128v3 support: 3
+COMP128v2 support: 1
+COMP128v3 support: 1
0 OK
0 OK
0 OK