bsc: change encryption a5 via VTY where needed

Do not assume that osmo-bsc.cfg contains "0 1 3 4" for master and "0 1 3"
for latest anymore. An upcoming test will need to change the value as
the test runs and needs a defined value to reset to.

Assume that osmo-bsc.cfg contains "0 1 3" and change it to "0 1 3 4"
only for TC_ciph_mode_a5_4.

Related: OS#4975
Related: docker-playground I55135ca00ef51de5cf6eaec75cfc20c21beef665
Change-Id: I3cf36c6ef86a0db050507f3737f4b0c10dcd52ed
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index b85aa63..6bea49e 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -3304,6 +3304,19 @@
 	fn.apply(id);
 }
 
+private function f_vty_encryption_a5(charstring options) runs on test_CT {
+	f_vty_transceive(BSCVTY, "configure terminal");
+	f_vty_transceive(BSCVTY, "network");
+	f_vty_transceive(BSCVTY, "encryption a5 " & options);
+	f_vty_transceive(BSCVTY, "exit");
+	f_vty_transceive(BSCVTY, "exit");
+}
+
+private function f_vty_encryption_a5_reset() runs on test_CT {
+	/* keep in sync with docker-playground.git ttcn3-bsc-test/osmo-bsc.cfg */
+	f_vty_encryption_a5("0 1 3");
+}
+
 /* Establish signalling channel (non-assignment case) followed by cipher mode */
 private function f_tc_ciph_mode_a5(charstring id) runs on MSC_ConnHdlr {
 	var template PDU_BSSAP exp_compl := f_gen_exp_compl();
@@ -3356,9 +3369,11 @@
 	pars.encr := valueof(t_EncrParams('10'O, f_rnd_octstring(8), f_rnd_octstring(16)));
 
 	f_init(1, true);
+	f_vty_encryption_a5("0 1 3 4");
 	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();
 }
 /* establish initial channel, enable ciphering followed by assignment to ciphered channel */