diff options
author | Max <max.suraev@fairwaves.co> | 2014-06-06 16:36:40 +0200 |
---|---|---|
committer | Sylvain Munaut <tnt@246tNt.com> | 2014-06-15 19:00:13 +0200 |
commit | d7b69212f8c7a230102a1313d74fdaa99b86dc9b (patch) | |
tree | 452d58bdefcc17d78141811441081987433ceeb9 /src/host/layer23/src/mobile/vty_interface.c | |
parent | a903b3c1ee27047c79728b18ff6340d23d1aad2e (diff) |
mobile: Use osmocom auth API instead of direct calls
Submitted-by: Max <max.suraev@fairwaves.co>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'src/host/layer23/src/mobile/vty_interface.c')
-rw-r--r-- | src/host/layer23/src/mobile/vty_interface.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 22ef7ae5..5782a173 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -29,6 +29,7 @@ #include <osmocom/gsm/gsm48.h> #include <osmocom/core/talloc.h> #include <osmocom/core/signal.h> +#include <osmocom/crypt/auth.h> #include <osmocom/bb/common/osmocom_data.h> #include <osmocom/bb/common/networks.h> @@ -1453,11 +1454,11 @@ static void config_write_ms(struct vty *vty, struct osmocom_ms *ms) vty_out(vty, " test-sim%s", VTY_NEWLINE); vty_out(vty, " imsi %s%s", set->test_imsi, VTY_NEWLINE); switch (set->test_ki_type) { - case GSM_SIM_KEY_XOR: + case OSMO_AUTH_ALG_XOR: vty_out(vty, " ki xor %s%s", osmo_hexdump(set->test_ki, 12), VTY_NEWLINE); break; - case GSM_SIM_KEY_COMP128: + case OSMO_AUTH_ALG_COMP128v1: vty_out(vty, " ki comp128 %s%s", osmo_hexdump(set->test_ki, 16), VTY_NEWLINE); break; @@ -2500,7 +2501,7 @@ DEFUN(cfg_test_ki_xor, cfg_test_ki_xor_cmd, "ki xor HEX HEX HEX HEX HEX HEX " ki[i] = strtoul(p, NULL, 16); } - set->test_ki_type = GSM_SIM_KEY_XOR; + set->test_ki_type = OSMO_AUTH_ALG_XOR; memcpy(set->test_ki, ki, 12); return CMD_SUCCESS; } @@ -2529,7 +2530,7 @@ DEFUN(cfg_test_ki_comp128, cfg_test_ki_comp128_cmd, "ki comp128 HEX HEX HEX " ki[i] = strtoul(p, NULL, 16); } - set->test_ki_type = GSM_SIM_KEY_COMP128; + set->test_ki_type = OSMO_AUTH_ALG_COMP128v1; memcpy(set->test_ki, ki, 16); return CMD_SUCCESS; } |