aboutsummaryrefslogtreecommitdiffstats
path: root/bsc
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2021-06-11 02:42:11 +0200
committerlaforge <laforge@osmocom.org>2021-06-21 16:26:08 +0000
commit5e31cfc63da185426c88b9b51e665c0464773fb9 (patch)
tree63e8bf7c84790cbc32810c722db5369f84f12c2f /bsc
parent727493405758ccdee2f665a2ad036d75836d0748 (diff)
bsc: f_cipher_mode(): verify enc alg in Cipher Mode Complete msg
Diffstat (limited to 'bsc')
-rw-r--r--bsc/MSC_ConnectionHandler.ttcn4
1 files changed, 3 insertions, 1 deletions
diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index 0d46bc6d..12712db5 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -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 {