aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2021-02-06 17:12:20 +0100
committerAlexander Couzens <lynxis@fe80.eu>2021-11-05 01:29:05 +0100
commit505a94a610fc7dfa4baa4fb3d9197d7564cde0d3 (patch)
tree861bf658196a544d394d991252ad36435c6b3194 /tests
parent274b70f1a8d477908f88c262dc67b065b6b6e4dc (diff)
Make UTRAN encryption algorithms configurable
Allow the user fine-grained control over which UMTS encryption algorithms are permitted, rather than always permitting UEA1 and UEA2 or neither. This brings the handling of UEA in line with the handling of A5 for GERAN. Change-Id: I91f9e50f9c1439aa19528f887b83ae9de628fcfd Closes: OS#4144 Depends: osmo-iuh.git I6d2d033b0427bdc84fee61e0f3cb7b29935214bf
Diffstat (limited to 'tests')
-rw-r--r--tests/msc_vlr/msc_vlr_test_umts_authen.c12
-rw-r--r--tests/test_nodes.vty21
2 files changed, 11 insertions, 22 deletions
diff --git a/tests/msc_vlr/msc_vlr_test_umts_authen.c b/tests/msc_vlr/msc_vlr_test_umts_authen.c
index 46f8d98a1..e462ef4df 100644
--- a/tests/msc_vlr/msc_vlr_test_umts_authen.c
+++ b/tests/msc_vlr/msc_vlr_test_umts_authen.c
@@ -50,7 +50,7 @@ static void _test_umts_authen(enum osmo_rat_type via_ran)
"d3d36ff71c949e83c22072799e9687c5ec32a81d96afcbf4b4fb"
"0c7ac3e9e9b7db05";
bool encryption = (via_ran == OSMO_RAT_GERAN_A && net->a5_encryption_mask > 0x1)
- || (via_ran == OSMO_RAT_UTRAN_IU && net->uea_encryption);
+ || (via_ran == OSMO_RAT_UTRAN_IU && net->uea_encryption_mask > 0x1);
net->authentication_required = true;
net->vlr->cfg.assign_tmsi = true;
@@ -333,7 +333,7 @@ static void test_umts_authen_geran()
static void test_umts_authen_utran()
{
comment_start();
- net->uea_encryption = false;
+ net->uea_encryption_mask = 0x01;
_test_umts_authen(OSMO_RAT_UTRAN_IU);
comment_end();
}
@@ -341,7 +341,7 @@ static void test_umts_authen_utran()
static void test_umts_auth_ciph_utran()
{
comment_start();
- net->uea_encryption = true;
+ net->uea_encryption_mask = 0x06;
_test_umts_authen(OSMO_RAT_UTRAN_IU);
comment_end();
}
@@ -361,7 +361,7 @@ static void _test_umts_authen_resync(enum osmo_rat_type via_ran)
struct vlr_subscr *vsub;
const char *imsi = "901700000010650";
bool encryption = (via_ran == OSMO_RAT_GERAN_A && net->a5_encryption_mask > 0x1)
- || (via_ran == OSMO_RAT_UTRAN_IU && net->uea_encryption);
+ || (via_ran == OSMO_RAT_UTRAN_IU && net->uea_encryption_mask > 0x1);
net->authentication_required = true;
net->vlr->cfg.assign_tmsi = true;
@@ -588,7 +588,7 @@ static void test_umts_authen_resync_geran()
static void test_umts_authen_resync_utran()
{
comment_start();
- net->uea_encryption = false;
+ net->uea_encryption_mask = 0x01;
_test_umts_authen_resync(OSMO_RAT_UTRAN_IU);
comment_end();
}
@@ -596,7 +596,7 @@ static void test_umts_authen_resync_utran()
static void test_umts_auth_ciph_resync_utran()
{
comment_start();
- net->uea_encryption = true;
+ net->uea_encryption_mask = 0x06;
_test_umts_authen_resync(OSMO_RAT_UTRAN_IU);
comment_end();
}
diff --git a/tests/test_nodes.vty b/tests/test_nodes.vty
index 315264fd1..14f15a200 100644
--- a/tests/test_nodes.vty
+++ b/tests/test_nodes.vty
@@ -31,7 +31,7 @@ OsmoMSC(config-net)# encryption?
encryption Encryption options
OsmoMSC(config-net)# encryption ?
a5 GSM A5 Air Interface Encryption.
- uea UTRAN (3G) encryption algorithms to allow: 0 = UEA0 (no encryption), 1 = UEA1, 2 = UEA2. NOTE: the current implementation does not allow free choice of combining encryption algorithms yet. The only valid settings are either 'encryption uea 0' or 'encryption uea 1 2'.
+ uea UTRAN (3G) encryption algorithms to allow: 0 = UEA0 (no encryption), 1 = UEA1, 2 = UEA2.
OsmoMSC(config-net)# encryption uea ?
<0-2> UEAn Algorithm Number
@@ -189,38 +189,27 @@ OsmoMSC(config-net)# show running-config
...
OsmoMSC(config-net)# encryption uea 1
-% Error: the current implementation does not allow free choice of combining
-% encryption algorithms yet. The only valid settings are either
-% encryption uea 0
-% or
-% encryption uea 1 2
OsmoMSC(config-net)# show running-config
...
- encryption uea 0
+ encryption uea 1
...
OsmoMSC(config-net)# encryption uea 2
-% Error: the current implementation does not allow free choice of combining
-...
OsmoMSC(config-net)# show running-config
...
- encryption uea 0
+ encryption uea 2
...
OsmoMSC(config-net)# encryption uea 0 1
-% Error: the current implementation does not allow free choice of combining
-...
OsmoMSC(config-net)# show running-config
...
- encryption uea 0
+ encryption uea 0 1
...
OsmoMSC(config-net)# encryption uea 0 2
-% Error: the current implementation does not allow free choice of combining
-...
OsmoMSC(config-net)# show running-config
...
- encryption uea 0
+ encryption uea 0 2
...
OsmoMSC(config-net)# encryption uea 1 2