diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2018-01-12 03:13:33 +0600 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2018-01-12 03:13:33 +0600 |
commit | 82cfa3945c35be251dff168260d30756bc3d60db (patch) | |
tree | 5ce43fc3a2ac8486f20787232f96ccdca8734ae5 /openbsc/src/libmsc/ctrl_commands.c | |
parent | e44a5687c4728a3ef1f730ec7349cef135cf174a (diff) |
libmsc: add support for both comp128v2 and comp128v3
This change adds support for both comp128v2 and comp128v3 GSM
A3/A8 algorithms. Since they already implemented in libosmocore,
the corresponding it's API is used.
Change-Id: Ic761be0220397d100c9e6345d4d01af4889dc7c1
Diffstat (limited to 'openbsc/src/libmsc/ctrl_commands.c')
-rw-r--r-- | openbsc/src/libmsc/ctrl_commands.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/openbsc/src/libmsc/ctrl_commands.c b/openbsc/src/libmsc/ctrl_commands.c index c99dde44c..8e4e8b634 100644 --- a/openbsc/src/libmsc/ctrl_commands.c +++ b/openbsc/src/libmsc/ctrl_commands.c @@ -41,6 +41,10 @@ static bool alg_supported(const char *alg) return true; if (strcasecmp(alg, "comp128v1") == 0) return true; + if (strcasecmp(alg, "comp128v2") == 0) + return true; + if (strcasecmp(alg, "comp128v3") == 0) + return true; return false; } @@ -118,6 +122,10 @@ static int set_subscriber_modify(struct ctrl_cmd *cmd, void *data) ainfo.auth_algo = AUTH_ALGO_XOR; else if (strcasecmp(alg, "comp128v1") == 0) ainfo.auth_algo = AUTH_ALGO_COMP128v1; + else if (strcasecmp(alg, "comp128v2") == 0) + ainfo.auth_algo = AUTH_ALGO_COMP128v2; + else if (strcasecmp(alg, "comp128v3") == 0) + ainfo.auth_algo = AUTH_ALGO_COMP128v3; rc = osmo_hexparse(ki, ainfo.a3a8_ki, sizeof(ainfo.a3a8_ki)); if (rc < 0) { |