From 645bd60d7577c6bdb98eac785233a09404fa369e Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Thu, 29 Nov 2018 15:39:51 +0000 Subject: [PATCH] More debug prints --- srsenb/src/upper/rrc.cc | 4 ++++ srsue/src/upper/rrc.cc | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/srsenb/src/upper/rrc.cc b/srsenb/src/upper/rrc.cc index d84784e57..f6212021d 100644 --- a/srsenb/src/upper/rrc.cc +++ b/srsenb/src/upper/rrc.cc @@ -1166,6 +1166,10 @@ void rrc::ue::set_security_key(uint8_t* key, uint32_t length) k_rrc_enc, k_rrc_int, k_up_enc, k_up_int, cipher_algo, integ_algo); + + parent->rrc_log->debug_hex(k_rrc_enc, 32, "RRC Encryption Key (k_rrc_enc)"); + parent->rrc_log->debug_hex(k_rrc_int, 32, "RRC Integrity Key (k_rrc_int)"); + parent->rrc_log->debug_hex(k_up_enc, 32, "RRC Encryption Key (k_rrc_enc)"); } bool rrc::ue::setup_erabs(LIBLTE_S1AP_E_RABTOBESETUPLISTCTXTSUREQ_STRUCT *e) diff --git a/srsue/src/upper/rrc.cc b/srsue/src/upper/rrc.cc index fc11f99a7..d8c8a4644 100644 --- a/srsue/src/upper/rrc.cc +++ b/srsue/src/upper/rrc.cc @@ -2074,10 +2074,12 @@ void rrc::parse_dl_dcch(uint32_t lcid, byte_buffer_t *pdu) { // Generate AS security keys uint8_t k_asme[32]; nas->get_k_asme(k_asme, 32); + rrc_log->debug_hex(k_asme, 32, " UE K_asme"); + rrc_log->debug("Generating K_enb. UL NAS COUNT %d\n", nas->get_ul_count()); usim->generate_as_keys(k_asme, nas->get_ul_count(), k_rrc_enc, k_rrc_int, k_up_enc, k_up_int, cipher_algo, integ_algo); - rrc_log->info_hex(k_rrc_enc, 32, "RRC encryption key - k_rrc_enc"); - rrc_log->info_hex(k_rrc_int, 32, "RRC integrity key - k_rrc_int"); - rrc_log->info_hex(k_up_enc, 32, "UP encryption key - k_up_enc"); + rrc_log->debug_hex(k_rrc_enc, 32, "RRC encryption key - k_rrc_enc"); + rrc_log->debug_hex(k_rrc_int, 32, "RRC integrity key - k_rrc_int"); + rrc_log->debug_hex(k_up_enc, 32, "UP encryption key - k_up_enc"); security_is_activated = true;