Add VTY support for TUAK algorithm
Change-Id: If2611658f7cb990b484d7429ab2f944f56fd2eb6 Depends: libosmocore.git Ib905b8d8bdf248e8299bf50666ee1bca8298433d
This commit is contained in:
parent
ef902afaa3
commit
3982a7d1cf
|
@ -7,4 +7,4 @@
|
|||
# If any interfaces have been added since the last public release: c:r:a + 1.
|
||||
# If any interfaces have been removed or changed since the last public release: c:r:0.
|
||||
#library what description / commit summary line
|
||||
libosmogsm UPDATE_DEP_VER update libosmogsm version dependency after Ie775fedba4a3fa12314c0f7c8a369662ef6a40df is released
|
||||
libosmogsm UPDATE_DEP_VER update libosmogsm version dependency after Ib905b8d8bdf248e8299bf50666ee1bca8298433d is released
|
||||
|
|
|
@ -468,9 +468,10 @@ static bool is_hexkey_valid(struct vty *vty, const char *label,
|
|||
"Use COMP128v3 algorithm\n" \
|
||||
"Use XOR-2G algorithm\n"
|
||||
|
||||
#define AUTH_ALG_TYPES_3G "milenage"
|
||||
#define AUTH_ALG_TYPES_3G "(milenage|tuak)"
|
||||
#define AUTH_ALG_TYPES_3G_HELP \
|
||||
"Use Milenage algorithm\n"
|
||||
"Use Milenage algorithm\n" \
|
||||
"Use TUAK algorithm\n"
|
||||
|
||||
bool auth_algo_parse(const char *alg_str, enum osmo_auth_algo *algo,
|
||||
int *minlen, int *maxlen, int *minlen_opc, int *maxlen_opc)
|
||||
|
@ -508,6 +509,14 @@ bool auth_algo_parse(const char *alg_str, enum osmo_auth_algo *algo,
|
|||
*minlen_opc = MILENAGE_KEY_LEN;
|
||||
if (maxlen_opc)
|
||||
*maxlen_opc = MILENAGE_KEY_LEN;
|
||||
} else if (!strcasecmp(alg_str, "tuak")) {
|
||||
*algo = OSMO_AUTH_ALG_TUAK;
|
||||
*minlen = 16;
|
||||
*maxlen = 32;
|
||||
if (minlen_opc)
|
||||
*minlen_opc = 32;
|
||||
if (maxlen_opc)
|
||||
*maxlen_opc = 32;
|
||||
} else
|
||||
return false;
|
||||
return true;
|
||||
|
@ -632,11 +641,11 @@ DEFUN(subscriber_aud3g,
|
|||
int rc;
|
||||
const char *id_type = argv[0];
|
||||
const char *id = argv[1];
|
||||
const char *alg_type = AUTH_ALG_TYPES_3G;
|
||||
const char *k = argv[2];
|
||||
bool opc_is_op = (strcasecmp("op", argv[3]) == 0);
|
||||
const char *op_opc = argv[4];
|
||||
int ind_bitlen = argc > 6? atoi(argv[6]) : 5;
|
||||
const char *alg_type = argv[2];
|
||||
const char *k = argv[3];
|
||||
bool opc_is_op = (strcasecmp("op", argv[4]) == 0);
|
||||
const char *op_opc = argv[5];
|
||||
int ind_bitlen = argc > 7? atoi(argv[7]) : 5;
|
||||
struct sub_auth_data_str aud3g = {
|
||||
.type = OSMO_AUTH_TYPE_UMTS,
|
||||
.u.umts = {
|
||||
|
|
|
@ -10,7 +10,7 @@ OsmoHLR# list
|
|||
subscriber (imsi|msisdn|id|imei) IDENT update aud2g none
|
||||
subscriber (imsi|msisdn|id|imei) IDENT update aud2g (comp128v1|comp128v2|comp128v3|xor-2g) ki KI
|
||||
subscriber (imsi|msisdn|id|imei) IDENT update aud3g none
|
||||
subscriber (imsi|msisdn|id|imei) IDENT update aud3g milenage k K (op|opc) OP_C [ind-bitlen] [<0-28>]
|
||||
subscriber (imsi|msisdn|id|imei) IDENT update aud3g (milenage|tuak) k K (op|opc) OP_C [ind-bitlen] [<0-28>]
|
||||
subscriber (imsi|msisdn|id|imei) IDENT update aud3g xor-3g k K [ind-bitlen] [<0-28>]
|
||||
subscriber (imsi|msisdn|id|imei) IDENT update imei (none|IMEI)
|
||||
subscriber (imsi|msisdn|id|imei) IDENT update network-access-mode (none|cs|ps|cs+ps)
|
||||
|
@ -269,6 +269,7 @@ OsmoHLR# subscriber id 101 show
|
|||
OsmoHLR# subscriber imsi 123456789023000 update aud3g ?
|
||||
none Delete 3G authentication data
|
||||
milenage Use Milenage algorithm
|
||||
tuak Use TUAK algorithm
|
||||
xor-3g Use XOR-3G algorithm
|
||||
|
||||
OsmoHLR# subscriber imsi 123456789023000 update aud3g milenage ?
|
||||
|
|
Loading…
Reference in New Issue