bsc: add TC_ciph_mode_a5_2_0
Verify that A5/2 is preferred over A5/0.
Related: OS#4975
Change-Id: Ia02e9be52ccbe4b24a0bce56305be9f875e7adb1
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index dac86ca..2a89659 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -3351,6 +3351,22 @@
vc_conn.done;
f_shutdown_helper();
}
+/* OS#4975: verify that A5/2 is preferred over A5/0 */
+testcase TC_ciph_mode_a5_2_0() runs on test_CT {
+ var MSC_ConnHdlr vc_conn;
+ var TestHdlrParams pars := f_gen_test_hdlr_pars();
+
+ pars.encr := valueof(t_EncrParams('05'O, f_rnd_octstring(8))); /* A5/0 and A5/2 (0x01|0x04)*/
+ pars.encr_exp_enc_alg := '04'O; /* A5/2 */
+
+ f_init(1, true);
+ f_vty_encryption_a5("0 1 2 3");
+ f_sleep(1.0);
+ vc_conn := f_start_handler(refers(f_tc_ciph_mode_a5), pars);
+ vc_conn.done;
+ f_vty_encryption_a5_reset();
+ f_shutdown_helper();
+}
/* OS#4975: verify that A5/1 is preferred over A5/2 */
testcase TC_ciph_mode_a5_2_1() runs on test_CT {
var MSC_ConnHdlr vc_conn;
@@ -9244,6 +9260,7 @@
execute( TC_assignment_fr_a5_not_sup() );
execute( TC_ciph_mode_a5_0() );
execute( TC_ciph_mode_a5_1() );
+ execute( TC_ciph_mode_a5_2_0() );
execute( TC_ciph_mode_a5_2_1() );
execute( TC_ciph_mode_a5_3() );
execute( TC_ciph_mode_a5_4() );
diff --git a/bsc/expected-results.xml b/bsc/expected-results.xml
index 793ca03..fd2d4d8 100644
--- a/bsc/expected-results.xml
+++ b/bsc/expected-results.xml
@@ -54,6 +54,7 @@
<testcase classname='BSC_Tests' name='TC_assignment_fr_a5_not_sup' time='MASKED'/>
<testcase classname='BSC_Tests' name='TC_ciph_mode_a5_0' time='MASKED'/>
<testcase classname='BSC_Tests' name='TC_ciph_mode_a5_1' time='MASKED'/>
+ <testcase classname='BSC_Tests' name='TC_ciph_mode_a5_2_0' time='MASKED'/>
<testcase classname='BSC_Tests' name='TC_ciph_mode_a5_2_1' time='MASKED'/>
<testcase classname='BSC_Tests' name='TC_ciph_mode_a5_3' time='MASKED'/>
<testcase classname='BSC_Tests' name='TC_ciph_mode_a5_4' time='MASKED'/>