Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-UDM
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-UDM
Commits
cc00d0c1
Commit
cc00d0c1
authored
May 19, 2021
by
yangjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Op and curl-http2.0
parent
612fa15c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
+23
-2
src/impl/GenerateAuthDataApiImpl.cpp
src/impl/GenerateAuthDataApiImpl.cpp
+20
-2
src/utils/curl.cpp
src/utils/curl.cpp
+3
-0
No files found.
src/impl/GenerateAuthDataApiImpl.cpp
View file @
cc00d0c1
...
...
@@ -125,9 +125,27 @@ void GenerateAuthDataApiImpl::generate_auth_data(
conv
::
hex_str_to_uint8
(
key_s
.
c_str
(),
key
);
// print_buffer("udm_ueau", "Result For F1-Alg: key", key , 16);
opc_s
=
response_data
.
at
(
"encOpcKey"
);
conv
::
hex_str_to_uint8
(
opc_s
.
c_str
(),
opc
);
//
opc_s = response_data.at("encOpcKey");
//
conv::hex_str_to_uint8(opc_s.c_str(), opc);
// print_buffer("udm_ueau", "Result For F1-Alg: opc", opc , 16);
opc_s
=
response_data
.
at
(
"encOpcKey"
);
uint8_t
op_value
[
16
]
=
{
0
};
conv
::
hex_str_to_uint8
(
opc_s
.
c_str
(),
op_value
);
std
::
string
encTopcKey
=
response_data
.
at
(
"encTopcKey"
);
if
(
!
encTopcKey
.
compare
(
"Opc"
))
{
memcpy
(
opc
,
op_value
,
16
);
}
else
if
(
!
encTopcKey
.
compare
(
"Op"
))
{
Authentication_5gaka
::
ComputeOPc
(
key
,
op_value
,
opc
);
}
else
{
Logger
::
udm_ueau
().
error
(
"no encTopcKey"
);
}
amf_s
=
response_data
.
at
(
"authenticationManagementField"
);
conv
::
hex_str_to_uint8
(
amf_s
.
c_str
(),
amf
);
...
...
src/utils/curl.cpp
View file @
cc00d0c1
...
...
@@ -86,6 +86,9 @@ long Curl::curl_http_client(std::string remoteUri, std::string Method,
curl_easy_setopt
(
curl
,
CURLOPT_WRITEFUNCTION
,
&
callback
);
curl_easy_setopt
(
curl
,
CURLOPT_WRITEDATA
,
httpData
.
get
());
curl_easy_setopt
(
curl
,
CURLOPT_HEADERDATA
,
httpHeaderData
.
get
());
curl_easy_setopt
(
curl
,
CURLOPT_HTTP_VERSION
,
CURL_HTTP_VERSION_2_0
);
if
(
!
Method
.
compare
(
"POST"
)
||
!
Method
.
compare
(
"PUT"
)
||
!
Method
.
compare
(
"PATCH"
))
{
curl_easy_setopt
(
curl
,
CURLOPT_POSTFIELDSIZE
,
msgBody
.
length
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment