laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/31453 )


Change subject: Rename OSMO_AUTH_ALG_XOR to OSMO_AUTH_ALG_XOR_3G
......................................................................

Rename OSMO_AUTH_ALG_XOR to OSMO_AUTH_ALG_XOR_3G

Let's disambiguate.  Our existing OSMO_AUTH_ALG_XOR was always only
the XOR-3G algorithm.  Now that we recently introduced XOR-2G,
let's rename (with backwards compatibility #define).

Change-Id: I446e54d0ddf4a18c46ee022b1249af73552e3ce1
---
M include/osmocom/crypt/auth.h
M src/gsm/auth_core.c
M src/gsm/auth_xor.c
3 files changed, 20 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/53/31453/1

diff --git a/include/osmocom/crypt/auth.h b/include/osmocom/crypt/auth.h
index 4af8ca8..d872f64 100644
--- a/include/osmocom/crypt/auth.h
+++ b/include/osmocom/crypt/auth.h
@@ -30,11 +30,14 @@
        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 af03ace..ce6ba7d 100644
--- a/src/gsm/auth_core.c
+++ b/src/gsm/auth_core.c
@@ -208,7 +208,7 @@
        { 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 4507542..81076bd 100644
--- a/src/gsm/auth_xor.c
+++ b/src/gsm/auth_xor.c
@@ -168,8 +168,8 @@
 }

 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,

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31453
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I446e54d0ddf4a18c46ee022b1249af73552e3ce1
Gerrit-Change-Number: 31453
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <[email protected]>
Gerrit-MessageType: newchange

Reply via email to