diff options
-rw-r--r-- | include/osmocom/crypt/auth.h | 5 | ||||
-rw-r--r-- | src/gsm/auth_core.c | 2 | ||||
-rw-r--r-- | src/gsm/auth_xor.c | 4 |
3 files changed, 7 insertions, 4 deletions
diff --git a/include/osmocom/crypt/auth.h b/include/osmocom/crypt/auth.h index 4af8ca8e..d872f642 100644 --- a/include/osmocom/crypt/auth.h +++ b/include/osmocom/crypt/auth.h @@ -30,11 +30,14 @@ enum osmo_auth_algo { OSMO_AUTH_ALG_COMP128v1, OSMO_AUTH_ALG_COMP128v2, OSMO_AUTH_ALG_COMP128v3, - OSMO_AUTH_ALG_XOR, + OSMO_AUTH_ALG_XOR_3G, OSMO_AUTH_ALG_MILENAGE, OSMO_AUTH_ALG_XOR_2G, _OSMO_AUTH_ALG_NUM, }; +/* Backwards-compatibility. We used to call XOR-3G just "XOR" which became ambiguous when + * we started to add XOR-2G support. */ +#define OSMO_AUTH_ALG_XOR OSMO_AUTH_ALG_XOR_3G /*! permanent (secret) subscriber auth data */ struct osmo_sub_auth_data { diff --git a/src/gsm/auth_core.c b/src/gsm/auth_core.c index af03ace1..ce6ba7df 100644 --- a/src/gsm/auth_core.c +++ b/src/gsm/auth_core.c @@ -208,7 +208,7 @@ static const struct value_string auth_alg_vals[] = { { OSMO_AUTH_ALG_COMP128v1, "COMP128v1" }, { OSMO_AUTH_ALG_COMP128v2, "COMP128v2" }, { OSMO_AUTH_ALG_COMP128v3, "COMP128v3" }, - { OSMO_AUTH_ALG_XOR, "XOR" }, + { OSMO_AUTH_ALG_XOR_3G, "XOR-3G" }, { OSMO_AUTH_ALG_MILENAGE, "MILENAGE" }, { OSMO_AUTH_ALG_XOR_2G, "XOR-2G" }, { 0, NULL } diff --git a/src/gsm/auth_xor.c b/src/gsm/auth_xor.c index 45075421..81076bda 100644 --- a/src/gsm/auth_xor.c +++ b/src/gsm/auth_xor.c @@ -168,8 +168,8 @@ static int xor_gen_vec_auts(struct osmo_auth_vector *vec, } static struct osmo_auth_impl xor_alg = { - .algo = OSMO_AUTH_ALG_XOR, - .name = "XOR (libosmogsm built-in)", + .algo = OSMO_AUTH_ALG_XOR_3G, + .name = "XOR-3G (libosmogsm built-in)", .priority = 1000, .gen_vec = &xor_gen_vec, .gen_vec_auts = &xor_gen_vec_auts, |