[AMF] security protection (UERANSIM-issues316)

1. Allocate ngKSI other than the value already used.
2. Add the protection of Service request
3. fix SBI convert error ng_ap_cause
This commit is contained in:
Sukchan Lee 2021-05-08 13:24:17 +09:00
parent b0e8dbb31a
commit 5ea9b22209
384 changed files with 226 additions and 2699 deletions

View file

@ -38,19 +38,11 @@ cJSON *OpenAPI_nas_security_mode_convertToJSON(OpenAPI_nas_security_mode_t *nas_
}
item = cJSON_CreateObject();
if (!nas_security_mode->integrity_algorithm) {
ogs_error("OpenAPI_nas_security_mode_convertToJSON() failed [integrity_algorithm]");
goto end;
}
if (cJSON_AddStringToObject(item, "integrityAlgorithm", OpenAPI_integrity_algorithm_ToString(nas_security_mode->integrity_algorithm)) == NULL) {
ogs_error("OpenAPI_nas_security_mode_convertToJSON() failed [integrity_algorithm]");
goto end;
}
if (!nas_security_mode->ciphering_algorithm) {
ogs_error("OpenAPI_nas_security_mode_convertToJSON() failed [ciphering_algorithm]");
goto end;
}
if (cJSON_AddStringToObject(item, "cipheringAlgorithm", OpenAPI_ciphering_algorithm_ToString(nas_security_mode->ciphering_algorithm)) == NULL) {
ogs_error("OpenAPI_nas_security_mode_convertToJSON() failed [ciphering_algorithm]");
goto end;