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(
free_wrapper((void**) &auts_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(
authenticationinfo, ueauthenticationctx, 1)) {
authenticationinfo, ueauthenticationctx, http_version)) {
unsigned char* r5gauthdata_rand = conv::format_string_as_hex(
ueauthenticationctx.getR5gAuthData().getRand());
memcpy(nc.get()->_5g_av[0].rand, r5gauthdata_rand, 16);
......@@ -1451,7 +1453,7 @@ bool amf_n1::get_authentication_vectors_from_ausf(
if (iter != ueauthenticationctx.getLinks().end()) {
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 {
Logger::amf_n1().error("Not found 5G_AKA");
}
......@@ -1498,7 +1500,11 @@ bool amf_n1::_5g_aka_confirmation_from_ausf(
msgBody = confirmationdata_j.dump();
// 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);
try {
......
......@@ -252,7 +252,7 @@ void amf_n11::handle_itti_message(
std::string json_part = pdu_session_update_request.dump();
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(
remote_uri, json_part, "", n2SmMsg, supi, itti_msg.pdu_session_id,
......@@ -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);
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(
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