Commit f9ffb813 authored by Raphael Defosseux's avatar Raphael Defosseux

Merge branch 'ausf_auth_with_http2' into 'develop'

ausf auth with http2

See merge request oai/cn5g/oai-cn5g-amf!67
parents 806dbd73 8e318378
...@@ -1422,9 +1422,11 @@ bool amf_n1::get_authentication_vectors_from_ausf( ...@@ -1422,9 +1422,11 @@ bool amf_n1::get_authentication_vectors_from_ausf(
free_wrapper((void**) &auts_s); free_wrapper((void**) &auts_s);
// free_wrapper((void**) &rand_s); // free_wrapper((void**) &rand_s);
} }
uint8_t http_version = 1;
if (amf_cfg.support_features.use_http2) http_version = 2;
if (amf_n11_inst->send_ue_authentication_request( if (amf_n11_inst->send_ue_authentication_request(
authenticationinfo, ueauthenticationctx, 1)) { authenticationinfo, ueauthenticationctx, http_version)) {
unsigned char* r5gauthdata_rand = conv::format_string_as_hex( unsigned char* r5gauthdata_rand = conv::format_string_as_hex(
ueauthenticationctx.getR5gAuthData().getRand()); ueauthenticationctx.getR5gAuthData().getRand());
memcpy(nc.get()->_5g_av[0].rand, r5gauthdata_rand, 16); memcpy(nc.get()->_5g_av[0].rand, r5gauthdata_rand, 16);
...@@ -1451,7 +1453,7 @@ bool amf_n1::get_authentication_vectors_from_ausf( ...@@ -1451,7 +1453,7 @@ bool amf_n1::get_authentication_vectors_from_ausf(
if (iter != ueauthenticationctx.getLinks().end()) { if (iter != ueauthenticationctx.getLinks().end()) {
nc.get()->Href = iter->second.getHref(); nc.get()->Href = iter->second.getHref();
Logger::amf_n1().info("Links is: ", nc.get()->Href); Logger::amf_n1().info("Links is: %s", nc.get()->Href.c_str());
} else { } else {
Logger::amf_n1().error("Not found 5G_AKA"); Logger::amf_n1().error("Not found 5G_AKA");
} }
...@@ -1498,7 +1500,11 @@ bool amf_n1::_5g_aka_confirmation_from_ausf( ...@@ -1498,7 +1500,11 @@ bool amf_n1::_5g_aka_confirmation_from_ausf(
msgBody = confirmationdata_j.dump(); msgBody = confirmationdata_j.dump();
// TODO: Should be updated // TODO: Should be updated
amf_n11_inst->curl_http_client(remoteUri, "PUT", msgBody, response); uint8_t http_version = 1;
if (amf_cfg.support_features.use_http2) http_version = 2;
amf_n11_inst->curl_http_client(
remoteUri, "PUT", msgBody, response, http_version);
free_wrapper((void**) &resStar_s); free_wrapper((void**) &resStar_s);
try { try {
......
...@@ -252,7 +252,7 @@ void amf_n11::handle_itti_message( ...@@ -252,7 +252,7 @@ void amf_n11::handle_itti_message(
std::string json_part = pdu_session_update_request.dump(); std::string json_part = pdu_session_update_request.dump();
uint8_t http_version = 1; uint8_t http_version = 1;
if (amf_cfg.support_features.use_http2) http_version = 2; // if (amf_cfg.support_features.use_http2) http_version = 2;
curl_http_client( curl_http_client(
remote_uri, json_part, "", n2SmMsg, supi, itti_msg.pdu_session_id, remote_uri, json_part, "", n2SmMsg, supi, itti_msg.pdu_session_id,
...@@ -470,7 +470,7 @@ void amf_n11::handle_pdu_session_initial_request( ...@@ -470,7 +470,7 @@ void amf_n11::handle_pdu_session_initial_request(
octet_stream_2_hex_stream((uint8_t*) bdata(sm_msg), blength(sm_msg), n1SmMsg); octet_stream_2_hex_stream((uint8_t*) bdata(sm_msg), blength(sm_msg), n1SmMsg);
uint8_t http_version = 1; uint8_t http_version = 1;
if (amf_cfg.support_features.use_http2) http_version = 2; // if (amf_cfg.support_features.use_http2) http_version = 2;
curl_http_client( curl_http_client(
remote_uri, json_part, n1SmMsg, "", supi, psc.get()->pdu_session_id, remote_uri, json_part, n1SmMsg, "", supi, psc.get()->pdu_session_id,
......
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