Change in osmo-msc[master]: improve logging on encryption, for Ciphering and HO

neels gerrit-no-reply at lists.osmocom.org
Wed Jun 23 22:11:28 UTC 2021


neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/24766 )


Change subject: improve logging on encryption, for Ciphering and HO
......................................................................

improve logging on encryption, for Ciphering and HO

log the algorithm and all keys instead of just Kc.

Change-Id: If7871dedda2b1fb115e6f00da1379ff2e3d68a10
---
M src/libmsc/msc_a.c
M src/libmsc/msc_ho.c
2 files changed, 14 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/66/24766/1

diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c
index 4c38c56..451220a 100644
--- a/src/libmsc/msc_a.c
+++ b/src/libmsc/msc_a.c
@@ -345,8 +345,12 @@
 	}
 
 	if (msc_a->geran_encr.key_len)
-		LOG_MSC_A(msc_a, LOGL_DEBUG, "RAN encoding chose ciphering key %s\n",
-			  osmo_hexdump_nospc(msc_a->geran_encr.key, msc_a->geran_encr.key_len));
+		LOG_MSC_A(msc_a, LOGL_DEBUG, "RAN encoding chose ciphering: A5/%d kc %s kc128 %s\n",
+			  msc_a->geran_encr.alg_id - 1,
+			  osmo_hexdump_nospc_c(OTC_SELECT, msc_a->geran_encr.key, msc_a->geran_encr.key_len),
+			  msc_a->geran_encr.kc128_present ?
+			    osmo_hexdump_nospc_c(OTC_SELECT, msc_a->geran_encr.kc128, sizeof(msc_a->geran_encr.kc128))
+			    : "-");
 	return 0;
 }
 
diff --git a/src/libmsc/msc_ho.c b/src/libmsc/msc_ho.c
index d89a24c..6b8960e 100644
--- a/src/libmsc/msc_ho.c
+++ b/src/libmsc/msc_ho.c
@@ -408,6 +408,14 @@
 		},
 	};
 
+	if (msc_a->geran_encr.key_len)
+		LOG_MSC_A(msc_a, LOGL_DEBUG, "HO Request with ciphering: A5/%d kc %s kc128 %s\n",
+			  msc_a->geran_encr.alg_id - 1,
+			  osmo_hexdump_nospc_c(OTC_SELECT, msc_a->geran_encr.key, msc_a->geran_encr.key_len),
+			  msc_a->geran_encr.kc128_present ?
+			    osmo_hexdump_nospc_c(OTC_SELECT, msc_a->geran_encr.kc128, sizeof(msc_a->geran_encr.kc128))
+			    : "-");
+
 	if (msc_a->cc.active_trans) {
 		if (mncc_bearer_cap_to_channel_type(&channel_type, &msc_a->cc.active_trans->bearer_cap)) {
 			msc_ho_failed(msc_a, GSM0808_CAUSE_EQUIPMENT_FAILURE,

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/24766
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: If7871dedda2b1fb115e6f00da1379ff2e3d68a10
Gerrit-Change-Number: 24766
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210623/59147e9b/attachment.htm>


More information about the gerrit-log mailing list