mirror of https://github.com/PentHertz/srsLTE.git
rrc,nr_security: fixing a few typos for NR
This commit is contained in:
parent
1616c09335
commit
bbe3ee41da
|
@ -24,10 +24,10 @@ class nr_security_context
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit nr_security_context(const srsenb::rrc_nr_cfg_t& cfg_) :
|
explicit nr_security_context(const srsenb::rrc_nr_cfg_t& cfg_) :
|
||||||
cfg(cfg_), logger(srslog::fetch_basic_logger("RRC_NR"))
|
cfg(cfg_), logger(srslog::fetch_basic_logger("RRC-NR"))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
nr_security_context(const nr_security_context& other) : cfg(other.cfg), logger(srslog::fetch_basic_logger("RRC_NR"))
|
nr_security_context(const nr_security_context& other) : cfg(other.cfg), logger(srslog::fetch_basic_logger("RRC-NR"))
|
||||||
{
|
{
|
||||||
k_gnb_present = other.k_gnb_present;
|
k_gnb_present = other.k_gnb_present;
|
||||||
security_capabilities = other.security_capabilities;
|
security_capabilities = other.security_capabilities;
|
||||||
|
|
|
@ -159,7 +159,6 @@ void nr_security_context::set_security_key(const asn1::fixed_bitstring<256, fals
|
||||||
for (uint32_t i = 0; i < key.nof_octets(); ++i) {
|
for (uint32_t i = 0; i < key.nof_octets(); ++i) {
|
||||||
k_gnb[i] = key.data()[key.nof_octets() - 1 - i];
|
k_gnb[i] = key.data()[key.nof_octets() - 1 - i];
|
||||||
}
|
}
|
||||||
logger.info(k_gnb, 32, "Key gNodeB (k_gnb)");
|
|
||||||
|
|
||||||
generate_as_keys();
|
generate_as_keys();
|
||||||
}
|
}
|
||||||
|
@ -187,13 +186,13 @@ void nr_security_context::generate_as_keys()
|
||||||
logger.info(sec_cfg.k_nr_up_int.data(), 32, "NR UP Encryption Key (k_nr_up_enc)");
|
logger.info(sec_cfg.k_nr_up_int.data(), 32, "NR UP Encryption Key (k_nr_up_enc)");
|
||||||
}
|
}
|
||||||
|
|
||||||
void nr_security_context::regenerate_keys_handover(uint32_t new_pci, uint32_t new_dl_earfcn)
|
void nr_security_context::regenerate_keys_handover(uint32_t new_pci, uint32_t new_dl_arfcn)
|
||||||
{
|
{
|
||||||
logger.info("Regenerating KgNB with PCI=0x%02x, DL-EARFCN=%d", new_pci, new_dl_earfcn);
|
logger.info("Regenerating KgNB with PCI=0x%02x, DL-ARFCN=%d", new_pci, new_dl_arfcn);
|
||||||
logger.info(k_gnb, 32, "Old K_gNB (k_enb)");
|
logger.info(k_gnb, 32, "Old K_gNB (k_gnb)");
|
||||||
// Generate K_enb*
|
// Generate K_enb*
|
||||||
uint8_t k_gnb_star[32];
|
uint8_t k_gnb_star[32];
|
||||||
srsran::security_generate_k_enb_star(k_gnb, new_pci, new_dl_earfcn, k_gnb_star);
|
srsran::security_generate_k_enb_star(k_gnb, new_pci, new_dl_arfcn, k_gnb_star);
|
||||||
|
|
||||||
// K_enb becomes K_enb*
|
// K_enb becomes K_enb*
|
||||||
memcpy(k_gnb, k_gnb_star, 32);
|
memcpy(k_gnb, k_gnb_star, 32);
|
||||||
|
|
Loading…
Reference in New Issue