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/vty_interface_layer3.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/vty_interface_layer3.c')
-rw-r--r-- | openbsc/src/libmsc/vty_interface_layer3.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index b88c139b0..a97e1ece4 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -775,11 +775,13 @@ DEFUN(ena_subscr_handover, return CMD_SUCCESS; } -#define A3A8_ALG_TYPES "(none|xor|comp128v1)" +#define A3A8_ALG_TYPES "(none|xor|comp128v1|comp128v2|comp128v3)" #define A3A8_ALG_HELP \ "Use No A3A8 algorithm\n" \ "Use XOR algorithm\n" \ - "Use COMP128v1 algorithm\n" + "Use COMP128v1 algorithm\n" \ + "Use COMP128v2 algorithm\n" \ + "Use COMP128v3 algorithm\n" DEFUN(ena_subscr_a3a8, ena_subscr_a3a8_cmd, @@ -811,6 +813,12 @@ DEFUN(ena_subscr_a3a8, } else if (!strcasecmp(alg_str, "comp128v1")) { ainfo.auth_algo = AUTH_ALGO_COMP128v1; minlen = maxlen = A38_COMP128_KEY_LEN; + } else if (!strcasecmp(alg_str, "comp128v2")) { + ainfo.auth_algo = AUTH_ALGO_COMP128v2; + minlen = maxlen = A38_COMP128_KEY_LEN; + } else if (!strcasecmp(alg_str, "comp128v3")) { + ainfo.auth_algo = AUTH_ALGO_COMP128v3; + minlen = maxlen = A38_COMP128_KEY_LEN; } else { /* Unknown method */ subscr_put(subscr); |