bsc: f_cipher_mode(): verify enc alg in Cipher Mode Complete msg

Related: SYS#5324
Change-Id: I88b386c55e23cc180131e95a005d08cbc3ec102b
This commit is contained in:
Neels Hofmeyr 2021-06-11 02:42:11 +02:00 committed by laforge
parent 7274934057
commit 5e31cfc63d
1 changed files with 3 additions and 1 deletions

View File

@ -758,11 +758,13 @@ runs on MSC_ConnHdlr {
repeat;
}
[] BSSAP.receive(tr_BSSMAP_CipherModeCompl) -> value bssap {
// bssap.bssmap.cipherModeComplete.chosenEncryptionAlgorithm.algoritmhIdentifier
if (exp_fail == true) {
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Unexpected Cipher Mode Complete");
} else {
setverdict(pass);
if (oct2int(bssap.pdu.bssmap.cipherModeComplete.chosenEncryptionAlgorithm.algorithmIdentifier) != enum2int(alg_rsl)) {
setverdict(fail, "Unexpected Encryption Algorithm ID in BSSMAP Cipher Mode Complete");
}
}
}
[] BSSAP.receive(tr_BSSMAP_CipherModeRej) -> value bssap {