Commit e933c13f authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Process message in Ausf_app instead of API Server

parent 6fa4b341
......@@ -48,9 +48,11 @@ random_state_t random_state;
using namespace std;
/*
extern void print_buffer(
const std::string app, const std::string commit, uint8_t* buf, int len);
extern void hexStr2Byte(const char* src, unsigned char* dest, int len);
*/
/************ algorithm f1 **************/
/*
Computes network authentication code MAC-A from key K, random, challenge RAND,
......
This diff is collapsed.
This diff is collapsed.
......@@ -31,11 +31,17 @@
#define FILE_AUSF_APP_HPP_SEEN
#include <string>
#include "AuthenticationInfo.h"
#include "UEAuthenticationCtx.h"
#include "ConfirmationData.h"
#include "ausf.h"
namespace oai {
namespace ausf {
namespace app {
using namespace oai::ausf_server::model;
// class ausf_config;
class ausf_app {
public:
......@@ -45,7 +51,22 @@ class ausf_app {
virtual ~ausf_app();
void handle_ue_authentications(
const AuthenticationInfo& authenticationInfo, nlohmann::json& json_data,
std::string& location, uint16_t& http_response_code);
void handle_ue_authentications_confirmation(
const std::string& authCtxId, const ConfirmationData& confirmation_data,
nlohmann::json& json_data, uint16_t& http_response_code);
private:
AUSF_AV_s ausf_av_s;
// stored temporarily
uint8_t XRES_STAR[16]; // store xres*
std::string SUPI_AUSF; // store supi
std::string AUTH_TYPE; // store authType
std::string SERVING_NN; // store serving network name
std::string KAUSF_TMP; // store Kausf(string)
};
} // namespace app
} // namespace ausf
......
......@@ -129,12 +129,6 @@ int ausf_config::load(const std::string& config_file) {
new_if_cfg[AUSF_CONFIG_STRING_INTERFACE_SBI_AUSF];
load_interface(sbi_ausf_cfg, sbi);
// const Setting& nudm_cfg = new_if_cfg[AUSF_CONFIG_STRING_INTERFACE_NUDM];
// load_interface(nudm_cfg, nudm);
// const Setting& namf_cfg = new_if_cfg[AUSF_CONFIG_STRING_INTERFACE_NAMF];
// load_interface(namf_cfg, namf);
} catch (const SettingNotFoundException& nfex) {
Logger::config().error(
"%s : %s, using defaults", nfex.what(), nfex.getPath());
......@@ -215,13 +209,6 @@ void ausf_config::display() {
Logger::config().info(" ip ...................: %s", inet_ntoa(sbi.addr4));
Logger::config().info(" port .................: %d", sbi.port);
// Logger::config().info("- Nudm Networking:");
// Logger::config().info(" iface ................: %s",
// nudm.if_name.c_str());
// Logger::config().info(
// " ip ...................: %s", inet_ntoa(udm_addr.addr4));
// Logger::config().info(" port .................: %d", udm_addr.port);
Logger::config().info("- UDM:");
Logger::config().info(
" IPv4 Addr ...........: %s",
......@@ -230,13 +217,6 @@ void ausf_config::display() {
Logger::config().info(
" API version .........: %s", udm_addr.api_version.c_str());
/* Logger::config().info("- Namf Networking:");
Logger::config().info(" iface ................: %s",
namf.if_name.c_str()); Logger::config().info( " ip ...................:
%s", inet_ntoa(namf.addr4)); Logger::config().info(" port
.................: %d", namf.port);
*/
Logger::config().info("- AMF:");
Logger::config().info(
" IPv4 Addr ...........: %s",
......
......@@ -51,9 +51,6 @@
#define AUSF_CONFIG_STRING_INTERFACES "INTERFACES"
#define AUSF_CONFIG_STRING_INTERFACE_SBI_AUSF "SBI_AUSF"
//#define AUSF_CONFIG_STRING_INTERFACE_NUDM "NUDM"
//#define AUSF_CONFIG_STRING_INTERFACE_NAMF "NAMF"
#define AUSF_CONFIG_STRING_INTERFACE_NAME "INTERFACE_NAME"
#define AUSF_CONFIG_STRING_IPV4_ADDRESS "IPV4_ADDRESS"
#define AUSF_CONFIG_STRING_PORT "PORT"
......@@ -94,8 +91,6 @@ class ausf_config {
std::string ausf_name;
interface_cfg_t sbi;
// interface_cfg_t nudm;
// interface_cfg_t namf;
struct {
struct in_addr ipv4_addr;
unsigned int port;
......
......@@ -74,4 +74,11 @@ static const std::vector<std::string> patch_op_type_e2str = {
#define MAX_WAIT_MSECS 20000 // 1 second
typedef struct {
uint8_t rand[16];
uint8_t autn[16];
uint8_t hxresStar[16];
uint8_t kseaf[32];
} AUSF_AV_s;
#endif
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