diff options
author | Harald Welte <laforge@osmocom.org> | 2023-05-30 16:57:27 +0200 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2023-05-30 21:43:14 +0200 |
commit | 829713a69d26df1d1c7bb83dcdf370353175b296 (patch) | |
tree | 35a88e364fa41b8c8f026408848091679c609cb1 /tests/db/db_test.c | |
parent | 5edf387353b1b684a695aa09c5d91815ecf24981 (diff) |
Introduce support for XOR-2G algorithm
So far we supported a "xor" algorithm in osmo-hlr, without specifying
whether it's the XOR-3G or the (different) XOR-2G algorithm.
Furthermore, it was buggy in the sense that it permitted the XOR[-3G]
for 2G authentication data in the database.
This patch
* renames existing "xor" to "xor-3g"
* disallows "xor-3g" usage with 2G authentication data
* introduces support for XOR-2G as "xor-2g" in the VTY
Change-Id: I039a1f84fda54a908a82fe621e7fd078cb85e4c6
Depends: libosmocore.git I0ee0565382c1e4515d44ff9b1752685c0a66ae39
Diffstat (limited to 'tests/db/db_test.c')
-rw-r--r-- | tests/db/db_test.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/db/db_test.c b/tests/db/db_test.c index ab997bf..6727812 100644 --- a/tests/db/db_test.c +++ b/tests/db/db_test.c @@ -586,7 +586,7 @@ static void test_subscr_aud(void) ASSERT_SEL_AUD(imsi0, 0, id); ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, - mk_aud_2g(OSMO_AUTH_ALG_XOR, "CededEffacedAceFacedBadFadedBeef")), + mk_aud_2g(OSMO_AUTH_ALG_XOR_2G, "CededEffacedAceFacedBadFadedBeef")), 0); ASSERT_SEL_AUD(imsi0, 0, id); @@ -604,7 +604,7 @@ static void test_subscr_aud(void) -ENOENT); ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, - mk_aud_2g(OSMO_AUTH_ALG_XOR, "CededEffacedAceFacedBadFadedBeef")), + mk_aud_2g(OSMO_AUTH_ALG_XOR_2G, "CededEffacedAceFacedBadFadedBeef")), 0); ASSERT_SEL_AUD(imsi0, 0, id); @@ -707,12 +707,12 @@ static void test_subscr_aud(void) ASSERT_SEL_AUD(imsi0, 0, id); ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, - mk_aud_2g(OSMO_AUTH_ALG_XOR, "f000000000000f00000000000f000000f00000000")), + mk_aud_2g(OSMO_AUTH_ALG_XOR_2G, "f000000000000f00000000000f000000f00000000")), -EINVAL); ASSERT_SEL_AUD(imsi0, 0, id); ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, - mk_aud_2g(OSMO_AUTH_ALG_XOR, "f00")), + mk_aud_2g(OSMO_AUTH_ALG_XOR_2G, "f00")), -EINVAL); ASSERT_SEL_AUD(imsi0, 0, id); |