diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2021-06-23 20:05:25 +0200 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2021-06-29 16:17:54 +0200 |
commit | b00c5b095d2adf72f2d0064b79a295b45939bf14 (patch) | |
tree | cb4290ba90283ff0cd97687a679b249f4e041151 | |
parent | f6eff814178210894ff839de39d03dd79582fa40 (diff) |
msc: add vec_keep to lock the AuthVector
Next to AuthVector vec, add boolean vec_keep. When set to true,
as_GSUP_SAI() skips the vector regeneration.
An upcoming patch adds encryption to inter-BSC handover, which will use
vec_keep := true. (See I57e43c60d4389bd301d0195179321a34401bd1dc )
Rationale:
Usually, a random auth vector is generated during as_GSUP_SAI(). For
inter-BSC handover, there are two separate virt-BSC components running.
But to be able to verify that the correct key is passed on from the old
to the new BSS, both titan components need to have the same AuthVector
data. The easiest solution is to generate the AuthVector before
launching the components, and then prevent that it is changed by
as_GSUP_SAI().
Related: SYS#5324
Related: I57e43c60d4389bd301d0195179321a34401bd1dc
Change-Id: I4bca739c2aad8342915e00a218f90fc19be7eafe
-rw-r--r-- | msc/BSC_ConnectionHandler.ttcn | 11 | ||||
-rw-r--r-- | msc/MSC_Tests.ttcn | 1 |
2 files changed, 10 insertions, 2 deletions
diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 3fa5fac2..cf4e8467 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -93,6 +93,9 @@ type record BSC_ConnHdlrPars { BSSMAP_IE_ClassmarkInformationType2 cm2, BSSMAP_IE_ClassmarkInformationType3 cm3 optional, AuthVector vec optional, + /* BSC_ConnectionHandler generates an auth vector in as_GSUP_SAI(). For tests that want control over which + * vector is used, pass vec_keep := true to not regenerate a new auth vector in as_GSUP_SAI(). */ + boolean vec_keep, BSC_ConnHdlrNetworkPars net, boolean send_early_cm, charstring ipa_ctrl_ip, @@ -426,7 +429,9 @@ altstep as_GSUP_SAI() runs on BSC_ConnHdlr { var GSUP_IE auth_tuple; [] GSUP.receive(tr_GSUP_SAI_REQ(g_pars.imsi)) { if (g_pars.use_umts_aka) { - g_pars.vec := f_gen_auth_vec_3g(); + if (not g_pars.vec_keep) { + g_pars.vec := f_gen_auth_vec_3g(); + } auth_tuple := valueof(ts_GSUP_IE_AuthTuple2G3G(g_pars.vec.rand, g_pars.vec.sres, g_pars.vec.kc, @@ -436,7 +441,9 @@ var GSUP_IE auth_tuple; g_pars.vec.res)); GSUP.send(ts_GSUP_SAI_RES(g_pars.imsi, auth_tuple)); } else { - g_pars.vec := f_gen_auth_vec_2g(); + if (not g_pars.vec_keep) { + g_pars.vec := f_gen_auth_vec_2g(); + } auth_tuple := valueof(ts_GSUP_IE_AuthTuple2G(g_pars.vec.rand, g_pars.vec.sres, g_pars.vec.kc)); diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index e37bc52d..46a368e6 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -387,6 +387,7 @@ runs on MTC_CT return BSC_ConnHdlrPars { cm2 := valueof(ts_CM2_default), cm3 := omit, vec := omit, + vec_keep := false, net := net_pars, send_early_cm := true, ipa_ctrl_ip := mp_msc_ip, |