lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

June 2023

  • 1 participants
  • 2480 discussions
[S] Change in osmo-hlr[master]: Add VTY support for TUAK algorithm
by laforge 03 Jun '23

03 Jun '23
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/33099 ) Change subject: Add VTY support for TUAK algorithm ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/33099 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: If2611658f7cb990b484d7429ab2f944f56fd2eb6 Gerrit-Change-Number: 33099 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Comment-Date: Sat, 03 Jun 2023 17:37:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-hlr[master]: db: extend database schema to support 256bit K and/or OP[c] values
by Jenkins Builder 03 Jun '23

03 Jun '23
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/33098 ) Change subject: db: extend database schema to support 256bit K and/or OP[c] values ...................................................................... Patch Set 2: (1 comment) File src/db.c: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-7797): https://gerrit.osmocom.org/c/osmo-hlr/+/33098/comment/0f8bc4db_531c6ac2 PS2, Line 533: const char *statements[] = { char * array declaration might be better as static const -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/33098 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ibbde68484c904507a15c35cbfdf88cd47d0c7039 Gerrit-Change-Number: 33098 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Comment-Date: Sat, 03 Jun 2023 17:37:17 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[L] Change in osmo-hlr[master]: Port to new libosmogsm 'struct osmo_sub_auth_data2'
by laforge 03 Jun '23

03 Jun '23
Attention is currently required from: laforge. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/33097 to look at the new patch set (#2). Change subject: Port to new libosmogsm 'struct osmo_sub_auth_data2' ...................................................................... Port to new libosmogsm 'struct osmo_sub_auth_data2' libosmogsm has recently introdcued a 'struct osmo_sub_auth_data2' as successor to 'struct osmo_sub_auth_data', together with updated osmo_auth_gen_vec2/osmo_auth_gen_vec_auts2 API. The rationale of this new API is to enable * support for AKA algorithms which use K and/or OP[c] values of 256bit (instead of the classic 128bit) * support for RES length sizes of 4 and 16 bytes (instead of the classic 8 bytes) This commit just jumps over to the new API without adding any related functionality to osmo-hlr. The latter is left for subsequent commits. Change-Id: I3207c7bfb73e9ff5471e5c26b66639549e4d48a2 Depends: libosmocore.git Ie775fedba4a3fa12314c0f7c8a369662ef6a40df --- M TODO-RELEASE M include/osmocom/hlr/auc.h M include/osmocom/hlr/db.h M src/auc.c M src/ctrl.c M src/db_auc.c M src/db_hlr.c M src/hlr.c M src/hlr_vty_subscr.c M tests/auc/auc_test.c M tests/auc/gen_ts_55_205_test_sets/func_template.c M tests/db/db_test.c M tests/db/db_test.err 13 files changed, 194 insertions(+), 137 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/97/33097/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/33097 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I3207c7bfb73e9ff5471e5c26b66639549e4d48a2 Gerrit-Change-Number: 33097 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in osmo-hlr[master]: cosmetic: gen_ts_55_205_test_sets/main_template tabs istead of spaces
by laforge 03 Jun '23

03 Jun '23
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/33162 ) Change subject: cosmetic: gen_ts_55_205_test_sets/main_template tabs istead of spaces ...................................................................... cosmetic: gen_ts_55_205_test_sets/main_template tabs istead of spaces Let's consistently use our normal tab indent style Change-Id: I4172b59131ac4166174c1860fcb07b7bee3df728 --- M tests/auc/gen_ts_55_205_test_sets/main_template.c 1 file changed, 13 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/62/33162/1 diff --git a/tests/auc/gen_ts_55_205_test_sets/main_template.c b/tests/auc/gen_ts_55_205_test_sets/main_template.c index ffdfa78..d810ba9 100644 --- a/tests/auc/gen_ts_55_205_test_sets/main_template.c +++ b/tests/auc/gen_ts_55_205_test_sets/main_template.c @@ -55,7 +55,7 @@ if (pos >= end) \ return buf; \ pos += snprintf(pos, sizeof(buf) - (pos - buf), \ - " " #what ": %s\n", \ + " " #what ": %s\n", \ osmo_hexdump_nospc((void*)&vec->what, sizeof(vec->what))) append(rand); @@ -71,7 +71,7 @@ #define VEC_IS(vec, expect) do { \ char *_is = vec_str(vec); \ - if (strcmp(_is, expect)) { \ + if (strcmp(_is, expect)) { \ fprintf(stderr, "MISMATCH! expected ==\n%s\n", \ expect); \ char *a = _is; \ -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/33162 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I4172b59131ac4166174c1860fcb07b7bee3df728 Gerrit-Change-Number: 33162 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-hlr[master]: cosmetic: gen_ts_55_205_test_sets/func_template.c: Use tab-indent
by laforge 03 Jun '23

03 Jun '23
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/33161 ) Change subject: cosmetic: gen_ts_55_205_test_sets/func_template.c: Use tab-indent ...................................................................... cosmetic: gen_ts_55_205_test_sets/func_template.c: Use tab-indent This templates is used for generating C code, so it should use our normal tab-based code indenting. Change-Id: I0be7eb2d7b551d7eaaee15994ef37262694819f6 --- M tests/auc/gen_ts_55_205_test_sets/func_template.c 1 file changed, 39 insertions(+), 27 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/61/33161/1 diff --git a/tests/auc/gen_ts_55_205_test_sets/func_template.c b/tests/auc/gen_ts_55_205_test_sets/func_template.c index 0865432..c244dd8 100644 --- a/tests/auc/gen_ts_55_205_test_sets/func_template.c +++ b/tests/auc/gen_ts_55_205_test_sets/func_template.c @@ -24,43 +24,43 @@ static void {func_name}(void) {{ - struct osmo_sub_auth_data aud2g; - struct osmo_sub_auth_data aud3g; - struct osmo_auth_vector vec; - int rc; + struct osmo_sub_auth_data aud2g; + struct osmo_sub_auth_data aud3g; + struct osmo_auth_vector vec; + int rc; - comment_start(); + comment_start(); - aud2g = (struct osmo_sub_auth_data){{ 0 }}; + aud2g = (struct osmo_sub_auth_data){{ 0 }}; - aud3g = (struct osmo_sub_auth_data){{ - .type = OSMO_AUTH_TYPE_UMTS, - .algo = OSMO_AUTH_ALG_MILENAGE, + aud3g = (struct osmo_sub_auth_data){{ + .type = OSMO_AUTH_TYPE_UMTS, + .algo = OSMO_AUTH_ALG_MILENAGE, .u.umts.sqn = 31, - }}; + }}; - osmo_hexparse("{Ki}", - aud3g.u.umts.k, sizeof(aud3g.u.umts.k)); - osmo_hexparse("{OPc}", - aud3g.u.umts.opc, sizeof(aud3g.u.umts.opc)); + osmo_hexparse("{Ki}", + aud3g.u.umts.k, sizeof(aud3g.u.umts.k)); + osmo_hexparse("{OPc}", + aud3g.u.umts.opc, sizeof(aud3g.u.umts.opc)); - osmo_hexparse("{RAND}", - fake_rand, sizeof(fake_rand)); + osmo_hexparse("{RAND}", + fake_rand, sizeof(fake_rand)); - vec = (struct osmo_auth_vector){{ {{0}} }}; + vec = (struct osmo_auth_vector){{ {{0}} }}; VERBOSE_ASSERT(aud3g.u.umts.sqn, == 31, "%"PRIu64); - rc = auc_compute_vectors(&vec, 1, &aud2g, &aud3g, NULL, NULL); - VERBOSE_ASSERT(rc, == 1, "%d"); + rc = auc_compute_vectors(&vec, 1, &aud2g, &aud3g, NULL, NULL); + VERBOSE_ASSERT(rc, == 1, "%d"); VERBOSE_ASSERT(aud3g.u.umts.sqn, == 32, "%"PRIu64); - VEC_IS(&vec, - " rand: {RAND}\n" - " ck: {MIL3G-CK}\n" - " ik: {MIL3G-IK}\n" - " res: {MIL3G-RES}0000000000000000\n" - " kc: {Kc}\n" - " sres: {SRES#1}\n" - ); + VEC_IS(&vec, + " rand: {RAND}\n" + " ck: {MIL3G-CK}\n" + " ik: {MIL3G-IK}\n" + " res: {MIL3G-RES}0000000000000000\n" + " kc: {Kc}\n" + " sres: {SRES#1}\n" + ); comment_end(); }} -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/33161 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I0be7eb2d7b551d7eaaee15994ef37262694819f6 Gerrit-Change-Number: 33161 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-hlr[master]: db: extend database schema to support 256bit K and/or OP[c] values
by laforge 03 Jun '23

03 Jun '23
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/33098 ) Change subject: db: extend database schema to support 256bit K and/or OP[c] values ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/33098 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ibbde68484c904507a15c35cbfdf88cd47d0c7039 Gerrit-Change-Number: 33098 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Comment-Date: Sat, 03 Jun 2023 17:26:00 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[L] Change in osmo-hlr[master]: Port to new libosmogsm 'struct osmo_sub_auth_data2'
by Jenkins Builder 03 Jun '23

03 Jun '23
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/33097 ) Change subject: Port to new libosmogsm 'struct osmo_sub_auth_data2' ...................................................................... Patch Set 1: (8 comments) File tests/auc/gen_ts_55_205_test_sets/func_template.c: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-7794): https://gerrit.osmocom.org/c/osmo-hlr/+/33097/comment/f4d8027c_c515b682 PS1, Line 27: struct osmo_sub_auth_data2 aud2g; code indent should use tabs where possible Robot Comment from checkpatch (run ID jenkins-gerrit-lint-7794): https://gerrit.osmocom.org/c/osmo-hlr/+/33097/comment/a27374e3_56cb45b2 PS1, Line 27: struct osmo_sub_auth_data2 aud2g; please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-7794): https://gerrit.osmocom.org/c/osmo-hlr/+/33097/comment/3fc72ec1_7ab54ef6 PS1, Line 28: struct osmo_sub_auth_data2 aud3g; code indent should use tabs where possible Robot Comment from checkpatch (run ID jenkins-gerrit-lint-7794): https://gerrit.osmocom.org/c/osmo-hlr/+/33097/comment/8a5af877_a67b8220 PS1, Line 28: struct osmo_sub_auth_data2 aud3g; please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-7794): https://gerrit.osmocom.org/c/osmo-hlr/+/33097/comment/7f13e6b6_eedd9ab6 PS1, Line 34: aud2g = (struct osmo_sub_auth_data2){{ 0 }}; code indent should use tabs where possible Robot Comment from checkpatch (run ID jenkins-gerrit-lint-7794): https://gerrit.osmocom.org/c/osmo-hlr/+/33097/comment/00eaea40_24559a87 PS1, Line 34: aud2g = (struct osmo_sub_auth_data2){{ 0 }}; please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-7794): https://gerrit.osmocom.org/c/osmo-hlr/+/33097/comment/f46e8d93_39a7e46f PS1, Line 36: aud3g = (struct osmo_sub_auth_data2){{ code indent should use tabs where possible Robot Comment from checkpatch (run ID jenkins-gerrit-lint-7794): https://gerrit.osmocom.org/c/osmo-hlr/+/33097/comment/bd3a626a_bc2b69dc PS1, Line 36: aud3g = (struct osmo_sub_auth_data2){{ please, no spaces at the start of a line -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/33097 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I3207c7bfb73e9ff5471e5c26b66639549e4d48a2 Gerrit-Change-Number: 33097 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Comment-Date: Sat, 03 Jun 2023 17:25:52 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[L] Change in osmo-hlr[master]: Port to new libosmogsm 'struct osmo_sub_auth_data2'
by laforge 03 Jun '23

03 Jun '23
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/33097 ) Change subject: Port to new libosmogsm 'struct osmo_sub_auth_data2' ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/33097 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I3207c7bfb73e9ff5471e5c26b66639549e4d48a2 Gerrit-Change-Number: 33097 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Comment-Date: Sat, 03 Jun 2023 17:25:47 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-hlr[master]: Introduce support for XOR-2G algorithm
by laforge 03 Jun '23

03 Jun '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/33096 ) Change subject: Introduce support for XOR-2G algorithm ...................................................................... Introduce support for XOR-2G algorithm So far we supported a "xor" algorithm in osmo-hlr, without specifying whether it's the XOR-3G or the (different) XOR-2G algorithm. Furthermore, it was buggy in the sense that it permitted the XOR[-3G] for 2G authentication data in the database. This patch * renames existing "xor" to "xor-3g" * disallows "xor-3g" usage with 2G authentication data * introduces support for XOR-2G as "xor-2g" in the VTY Change-Id: I039a1f84fda54a908a82fe621e7fd078cb85e4c6 Depends: libosmocore.git I0ee0565382c1e4515d44ff9b1752685c0a66ae39 --- M TODO-RELEASE M include/osmocom/hlr/hlr_vty.h M src/db_hlr.c M src/hlr_vty_subscr.c M tests/auc/auc_test.c M tests/db/db_test.c M tests/db/db_test.err M tests/db_upgrade/create_subscribers.vty M tests/db_upgrade/db_upgrade_test.ok M tests/db_upgrade/hlr_db_v0.sql M tests/test_subscriber.ctrl M tests/test_subscriber.vty M tests/test_subscriber_errors.ctrl 13 files changed, 64 insertions(+), 36 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/TODO-RELEASE b/TODO-RELEASE index cbfda24..62fe828 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,3 +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 I0ee0565382c1e4515d44ff9b1752685c0a66ae39 is released diff --git a/include/osmocom/hlr/hlr_vty.h b/include/osmocom/hlr/hlr_vty.h index 83691b8..771945d 100644 --- a/include/osmocom/hlr/hlr_vty.h +++ b/include/osmocom/hlr/hlr_vty.h @@ -40,6 +40,7 @@ #define A38_XOR_MIN_KEY_LEN 12 #define A38_XOR_MAX_KEY_LEN 16 +#define A38_XOR2G_KEY_LEN 16 #define A38_COMP128_KEY_LEN 16 #define MILENAGE_KEY_LEN 16 diff --git a/src/db_hlr.c b/src/db_hlr.c index 1dc4415..8dfbb15 100644 --- a/src/db_hlr.c +++ b/src/db_hlr.c @@ -238,8 +238,9 @@ case OSMO_AUTH_ALG_COMP128v1: case OSMO_AUTH_ALG_COMP128v2: case OSMO_AUTH_ALG_COMP128v3: - case OSMO_AUTH_ALG_XOR: + case OSMO_AUTH_ALG_XOR_2G: break; + case OSMO_AUTH_ALG_XOR_3G: case OSMO_AUTH_ALG_MILENAGE: LOGP(DAUC, LOGL_ERROR, "Cannot update auth tokens:" " auth algo not suited for 2G: %s\n", @@ -267,11 +268,12 @@ switch (aud->algo) { case OSMO_AUTH_ALG_NONE: case OSMO_AUTH_ALG_MILENAGE: - case OSMO_AUTH_ALG_XOR: + case OSMO_AUTH_ALG_XOR_3G: break; case OSMO_AUTH_ALG_COMP128v1: case OSMO_AUTH_ALG_COMP128v2: case OSMO_AUTH_ALG_COMP128v3: + case OSMO_AUTH_ALG_XOR_2G: LOGP(DAUC, LOGL_ERROR, "Cannot update auth tokens:" " auth algo not suited for 3G: %s\n", osmo_auth_alg_name(aud->algo)); diff --git a/src/hlr_vty_subscr.c b/src/hlr_vty_subscr.c index c851062..60a25bf 100644 --- a/src/hlr_vty_subscr.c +++ b/src/hlr_vty_subscr.c @@ -460,12 +460,12 @@ return false; } -#define AUTH_ALG_TYPES_2G "(comp128v1|comp128v2|comp128v3|xor)" +#define AUTH_ALG_TYPES_2G "(comp128v1|comp128v2|comp128v3|xor-2g)" #define AUTH_ALG_TYPES_2G_HELP \ "Use COMP128v1 algorithm\n" \ "Use COMP128v2 algorithm\n" \ "Use COMP128v3 algorithm\n" \ - "Use XOR algorithm\n" + "Use XOR-2G algorithm\n" #define AUTH_ALG_TYPES_3G "milenage" #define AUTH_ALG_TYPES_3G_HELP \ @@ -486,10 +486,13 @@ } else if (!strcasecmp(alg_str, "comp128v3")) { *algo = OSMO_AUTH_ALG_COMP128v3; *minlen = *maxlen = A38_COMP128_KEY_LEN; - } else if (!strcasecmp(alg_str, "xor")) { - *algo = OSMO_AUTH_ALG_XOR; + } else if (!strcasecmp(alg_str, "xor-3g")) { + *algo = OSMO_AUTH_ALG_XOR_3G; *minlen = A38_XOR_MIN_KEY_LEN; *maxlen = A38_XOR_MAX_KEY_LEN; + } else if (!strcasecmp(alg_str, "xor-2g")) { + *algo = OSMO_AUTH_ALG_XOR_2G; + *minlen = *maxlen = A38_XOR2G_KEY_LEN; } else if (!strcasecmp(alg_str, "milenage")) { *algo = OSMO_AUTH_ALG_MILENAGE; *minlen = *maxlen = MILENAGE_KEY_LEN; @@ -659,11 +662,11 @@ DEFUN(subscriber_aud3g_xor, subscriber_aud3g_xor_cmd, - SUBSCR_UPDATE "aud3g xor k K" + SUBSCR_UPDATE "aud3g xor-3g k K" " [ind-bitlen] [<0-28>]", SUBSCR_UPDATE_HELP "Set UMTS authentication data (3G, and 2G with UMTS AKA)\n" - "Use XOR algorithm\n" + "Use XOR-3G algorithm\n" "Set Encryption Key K\n" "K as 32 hexadecimal characters\n" "Set IND bit length\n" "IND bit length value (default: 5)\n") { @@ -685,8 +688,8 @@ }, }; - if (!auth_algo_parse("xor", &aud3g.algo, &minlen, &maxlen)) { - vty_out(vty, "%% Unknown auth algorithm: '%s'%s", "xor", VTY_NEWLINE); + if (!auth_algo_parse("xor-3g", &aud3g.algo, &minlen, &maxlen)) { + vty_out(vty, "%% Unknown auth algorithm: '%s'%s", "xor-3g", VTY_NEWLINE); return CMD_WARNING; } diff --git a/tests/auc/auc_test.c b/tests/auc/auc_test.c index 61cf82f..f39a5ad 100644 --- a/tests/auc/auc_test.c +++ b/tests/auc/auc_test.c @@ -477,7 +477,7 @@ aud3g = (struct osmo_sub_auth_data){ .type = OSMO_AUTH_TYPE_UMTS, - .algo = OSMO_AUTH_ALG_XOR, + .algo = OSMO_AUTH_ALG_XOR_3G, .u.umts.sqn = 0, }; diff --git a/tests/db/db_test.c b/tests/db/db_test.c index ab997bf..6727812 100644 --- a/tests/db/db_test.c +++ b/tests/db/db_test.c @@ -586,7 +586,7 @@ ASSERT_SEL_AUD(imsi0, 0, id); ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, - mk_aud_2g(OSMO_AUTH_ALG_XOR, "CededEffacedAceFacedBadFadedBeef")), + mk_aud_2g(OSMO_AUTH_ALG_XOR_2G, "CededEffacedAceFacedBadFadedBeef")), 0); ASSERT_SEL_AUD(imsi0, 0, id); @@ -604,7 +604,7 @@ -ENOENT); ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, - mk_aud_2g(OSMO_AUTH_ALG_XOR, "CededEffacedAceFacedBadFadedBeef")), + mk_aud_2g(OSMO_AUTH_ALG_XOR_2G, "CededEffacedAceFacedBadFadedBeef")), 0); ASSERT_SEL_AUD(imsi0, 0, id); @@ -707,12 +707,12 @@ ASSERT_SEL_AUD(imsi0, 0, id); ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, - mk_aud_2g(OSMO_AUTH_ALG_XOR, "f000000000000f00000000000f000000f00000000")), + mk_aud_2g(OSMO_AUTH_ALG_XOR_2G, "f000000000000f00000000000f000000f00000000")), -EINVAL); ASSERT_SEL_AUD(imsi0, 0, id); ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, - mk_aud_2g(OSMO_AUTH_ALG_XOR, "f00")), + mk_aud_2g(OSMO_AUTH_ALG_XOR_2G, "f00")), -EINVAL); ASSERT_SEL_AUD(imsi0, 0, id); diff --git a/tests/db/db_test.err b/tests/db/db_test.err index b4373cd..222d3a1 100644 --- a/tests/db/db_test.err +++ b/tests/db/db_test.err @@ -872,14 +872,14 @@ } 3G: none -db_subscr_update_aud_by_id(dbc, id, mk_aud_2g(OSMO_AUTH_ALG_XOR, "CededEffacedAceFacedBadFadedBeef")) --> 0 +db_subscr_update_aud_by_id(dbc, id, mk_aud_2g(OSMO_AUTH_ALG_XOR_2G, "CededEffacedAceFacedBadFadedBeef")) --> 0 db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> 0 DAUC IMSI='123456789000000': No 3G Auth Data 2G: struct osmo_sub_auth_data { .type = GSM, - .algo = XOR-3G, + .algo = XOR-2G, .u.gsm.ki = 'cededeffacedacefacedbadfadedbeef', } 3G: none @@ -900,14 +900,14 @@ db_subscr_update_aud_by_id(dbc, id, mk_aud_2g(OSMO_AUTH_ALG_NONE, NULL)) --> -ENOENT -db_subscr_update_aud_by_id(dbc, id, mk_aud_2g(OSMO_AUTH_ALG_XOR, "CededEffacedAceFacedBadFadedBeef")) --> 0 +db_subscr_update_aud_by_id(dbc, id, mk_aud_2g(OSMO_AUTH_ALG_XOR_2G, "CededEffacedAceFacedBadFadedBeef")) --> 0 db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> 0 DAUC IMSI='123456789000000': No 3G Auth Data 2G: struct osmo_sub_auth_data { .type = GSM, - .algo = XOR-3G, + .algo = XOR-2G, .u.gsm.ki = 'cededeffacedacefacedbadfadedbeef', } 3G: none @@ -1112,7 +1112,7 @@ .u.umts.ind_bitlen = 5, } -db_subscr_update_aud_by_id(dbc, id, mk_aud_2g(OSMO_AUTH_ALG_XOR, "f000000000000f00000000000f000000f00000000")) --> -EINVAL +db_subscr_update_aud_by_id(dbc, id, mk_aud_2g(OSMO_AUTH_ALG_XOR_2G, "f000000000000f00000000000f000000f00000000")) --> -EINVAL DAUC Cannot update auth tokens: Invalid KI: 'f000000000000f00000000000f000000f00000000' db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> 0 @@ -1132,7 +1132,7 @@ .u.umts.ind_bitlen = 5, } -db_subscr_update_aud_by_id(dbc, id, mk_aud_2g(OSMO_AUTH_ALG_XOR, "f00")) --> -EINVAL +db_subscr_update_aud_by_id(dbc, id, mk_aud_2g(OSMO_AUTH_ALG_XOR_2G, "f00")) --> -EINVAL DAUC Cannot update auth tokens: Invalid KI: 'f00' db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> 0 diff --git a/tests/db_upgrade/create_subscribers.vty b/tests/db_upgrade/create_subscribers.vty index 30eeba6..6e30b37 100644 --- a/tests/db_upgrade/create_subscribers.vty +++ b/tests/db_upgrade/create_subscribers.vty @@ -43,5 +43,5 @@ MSISDN: none OsmoHLR# subscriber imsi 5555555 update msisdn 55555555555555 % Updated subscriber IMSI='5555555' to MSISDN='55555555555555' -OsmoHLR# subscriber imsi 5555555 update aud2g xor ki 55555555555555555555555555555555 +OsmoHLR# subscriber imsi 5555555 update aud2g xor-2g ki 55555555555555555555555555555555 OsmoHLR# subscriber imsi 5555555 update aud3g milenage k 55555555555555555555555555555555 opc 55555555555555555555555555555555 diff --git a/tests/db_upgrade/db_upgrade_test.ok b/tests/db_upgrade/db_upgrade_test.ok index 0a45f7c..ce5b17c 100644 --- a/tests/db_upgrade/db_upgrade_test.ok +++ b/tests/db_upgrade/db_upgrade_test.ok @@ -12,7 +12,7 @@ algo_id_2g|ki|subscriber_id 1|BeefedCafeFaceAcedAddedDecadeFee|1 2|33333333333333333333333333333333|4 -4|55555555555555555555555555555555|6 +6|55555555555555555555555555555555|6 Table: auc_3g name|type|notnull|dflt_value|pk @@ -100,7 +100,7 @@ algo_id_2g|ki|subscriber_id 1|BeefedCafeFaceAcedAddedDecadeFee|1 2|33333333333333333333333333333333|4 -4|55555555555555555555555555555555|6 +6|55555555555555555555555555555555|6 Table: auc_3g name|type|notnull|dflt_value|pk diff --git a/tests/db_upgrade/hlr_db_v0.sql b/tests/db_upgrade/hlr_db_v0.sql index 46c985d..eb24eb5 100644 --- a/tests/db_upgrade/hlr_db_v0.sql +++ b/tests/db_upgrade/hlr_db_v0.sql @@ -61,7 +61,7 @@ ); INSERT INTO auc_2g VALUES(1,1,'BeefedCafeFaceAcedAddedDecadeFee'); INSERT INTO auc_2g VALUES(4,2,'33333333333333333333333333333333'); -INSERT INTO auc_2g VALUES(6,4,'55555555555555555555555555555555'); +INSERT INTO auc_2g VALUES(6,6,'55555555555555555555555555555555'); CREATE TABLE auc_3g ( subscriber_id INTEGER PRIMARY KEY, -- subscriber.id algo_id_3g INTEGER NOT NULL, -- enum osmo_auth_algo value diff --git a/tests/test_subscriber.ctrl b/tests/test_subscriber.ctrl index fba7458..c2f09dc 100644 --- a/tests/test_subscriber.ctrl +++ b/tests/test_subscriber.ctrl @@ -674,11 +674,11 @@ GET 112 subscriber.by-imsi-901991234567891.aud2g GET_REPLY 112 subscriber.by-imsi-901991234567891.aud2g none -SET 113 subscriber.by-imsi-901991234567891.aud2g xor,c01ffedc1cadaeac1d1f1edacac1ab0a +SET 113 subscriber.by-imsi-901991234567891.aud2g xor-2g,c01ffedc1cadaeac1d1f1edacac1ab0a SET_REPLY 113 subscriber.by-imsi-901991234567891.aud2g OK GET 114 subscriber.by-imsi-901991234567891.aud2g -GET_REPLY 114 subscriber.by-imsi-901991234567891.aud2g XOR-3G,c01ffedc1cadaeac1d1f1edacac1ab0a +GET_REPLY 114 subscriber.by-imsi-901991234567891.aud2g XOR-2G,c01ffedc1cadaeac1d1f1edacac1ab0a SET 115 subscriber.by-imsi-901991234567891.aud2g none SET_REPLY 115 subscriber.by-imsi-901991234567891.aud2g OK diff --git a/tests/test_subscriber.vty b/tests/test_subscriber.vty index a119cee..dbe9327 100644 --- a/tests/test_subscriber.vty +++ b/tests/test_subscriber.vty @@ -8,10 +8,10 @@ subscriber (imsi|msisdn|id|imei) IDENT delete subscriber (imsi|msisdn|id|imei) IDENT update msisdn (none|MSISDN) subscriber (imsi|msisdn|id|imei) IDENT update aud2g none - subscriber (imsi|msisdn|id|imei) IDENT update aud2g (comp128v1|comp128v2|comp128v3|xor) ki KI + 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 xor k K [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) show mslookup services @@ -144,7 +144,7 @@ comp128v1 Use COMP128v1 algorithm comp128v2 Use COMP128v2 algorithm comp128v3 Use COMP128v3 algorithm - xor Use XOR algorithm + xor-2g Use XOR-2G algorithm OsmoHLR# subscriber imsi 123456789023000 update aud2g comp128v1 ? ki Set Ki Encryption Key @@ -155,12 +155,12 @@ OsmoHLR# subscriber imsi 123456789023000 update aud2g comp128v1 ki val ? <cr> -OsmoHLR# subscriber imsi 123456789023000 update aud2g xor ki Deaf0ff1ceD0d0DabbedD1ced1ceF00d +OsmoHLR# subscriber imsi 123456789023000 update aud2g xor-2g ki Deaf0ff1ceD0d0DabbedD1ced1ceF00d OsmoHLR# subscriber imsi 123456789023000 show ID: 101 IMSI: 123456789023000 MSISDN: 423 - 2G auth: XOR-3G + 2G auth: XOR-2G KI=deaf0ff1ced0d0dabbedd1ced1cef00d OsmoHLR# subscriber imsi 123456789023000 update aud2g comp128v1 ki BeefedCafeFaceAcedAddedDecadeFee @@ -241,7 +241,7 @@ 2G auth: COMP128v3 KI=c01ffedc1cadaeac1d1f1edacac1ab0a -OsmoHLR# subscriber id 101 update aud2g xor ki CoiffedCicadaeAcidifiedAcaciaBoa +OsmoHLR# subscriber id 101 update aud2g xor-2g ki CoiffedCicadaeAcidifiedAcaciaBoa % Invalid value for KI: 'CoiffedCicadaeAcidifiedAcaciaBoa' OsmoHLR# subscriber id 101 show ID: 101 @@ -250,7 +250,7 @@ 2G auth: COMP128v3 KI=c01ffedc1cadaeac1d1f1edacac1ab0a -OsmoHLR# subscriber id 101 update aud2g xor ki C01ffedC1cadaeAc1d1f1edAcac1aB0aX +OsmoHLR# subscriber id 101 update aud2g xor-2g ki C01ffedC1cadaeAc1d1f1edAcac1aB0aX % Invalid value for KI: 'C01ffedC1cadaeAc1d1f1edAcac1aB0aX' OsmoHLR# subscriber id 101 show ID: 101 @@ -269,7 +269,7 @@ OsmoHLR# subscriber imsi 123456789023000 update aud3g ? none Delete 3G authentication data milenage Use Milenage algorithm - xor Use XOR algorithm + xor-3g Use XOR-3G algorithm OsmoHLR# subscriber imsi 123456789023000 update aud3g milenage ? k Set Encryption Key K diff --git a/tests/test_subscriber_errors.ctrl b/tests/test_subscriber_errors.ctrl index 6b1ade6..4603a77 100644 --- a/tests/test_subscriber_errors.ctrl +++ b/tests/test_subscriber_errors.ctrl @@ -130,7 +130,7 @@ SET 55 subscriber.by-imsi-901990000000003.aud2g foobar,2134 ERROR 55 Unknown auth algorithm. -SET 56 subscriber.by-imsi-901990000000003.aud2g xor,2134 +SET 56 subscriber.by-imsi-901990000000003.aud2g xor-2g,2134 ERROR 56 Invalid KI. SET 57 subscriber.by-imsi-901990000000003.aud3g foobar -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/33096 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I039a1f84fda54a908a82fe621e7fd078cb85e4c6 Gerrit-Change-Number: 33096 Gerrit-PatchSet: 3 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-hlr[master]: Introduce support for XOR-2G algorithm
by laforge 03 Jun '23

03 Jun '23
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/33096 ) Change subject: Introduce support for XOR-2G algorithm ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/33096 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I039a1f84fda54a908a82fe621e7fd078cb85e4c6 Gerrit-Change-Number: 33096 Gerrit-PatchSet: 3 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Sat, 03 Jun 2023 17:25:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 217
  • 218
  • 219
  • 220
  • 221
  • 222
  • 223
  • ...
  • 248
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.