Commit baac437b authored by Lionel Gauthier's avatar Lionel Gauthier

security algorithms

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5660 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent ea7a3f7d
......@@ -1264,14 +1264,20 @@ static int _emm_as_send(const emm_as_t *msg)
LOG_FUNC_RETURN (RETURNok);
} else {
LOG_TRACE(DEBUG, "EMMAS-SAP - "
"Sending nas_itti_establish_cnf to S1AP UE ID %d",
as_msg.msg.nas_establish_rsp.UEid);
"Sending nas_itti_establish_cnf to S1AP UE ID %d"
" selected_encryption_algorithm 0x%04X",
" selected_integrity_algorithm 0x%04X",
as_msg.msg.nas_establish_rsp.UEid,
as_msg.msg.nas_establish_rsp.selected_encryption_algorithm,
as_msg.msg.nas_establish_rsp.selected_integrity_algorithm);
/* Handle success case */
nas_itti_establish_cnf(
as_msg.msg.nas_establish_rsp.UEid,
as_msg.msg.nas_establish_rsp.errCode,
as_msg.msg.nas_establish_rsp.nasMsg.data,
as_msg.msg.nas_establish_rsp.nasMsg.length);
as_msg.msg.nas_establish_rsp.nasMsg.length,
as_msg.msg.nas_establish_rsp.selected_encryption_algorithm,
as_msg.msg.nas_establish_rsp.selected_integrity_algorithm);
LOG_FUNC_RETURN (RETURNok);
}
} break;
......@@ -2028,6 +2034,21 @@ static int _emm_as_establish_cnf(const emm_as_establish_t *msg,
LOG_TRACE(DEBUG,
"Set nas_msg.header.sequence_number -> %u",
nas_msg.header.sequence_number);
as_msg->selected_encryption_algorithm = htons(0x8000 >> emm_security_context->selected_algorithms.encryption);
as_msg->selected_integrity_algorithm = htons(0x8000 >> emm_security_context->selected_algorithms.integrity);
//as_msg->selected_encryption_algorithm = htons(0x8000 >> emm_security_context->capability.encryption);
//as_msg->selected_integrity_algorithm = htons(0x8000 >> emm_security_context->capability.integrity);
LOG_TRACE(DEBUG,
"Set nas_msg.selected_encryption_algorithm -> NBO: 0x%04X (%u)",
as_msg->selected_encryption_algorithm,
emm_security_context->selected_algorithms.encryption);
LOG_TRACE(DEBUG,
"Set nas_msg.selected_integrity_algorithm -> NBO: 0x%04X (%u)",
as_msg->selected_integrity_algorithm,
emm_security_context->selected_algorithms.integrity);
}
/* Encode the initial NAS information message */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment