Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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
1
Merge Requests
1
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-RAN
Commits
c37c5ad7
Commit
c37c5ad7
authored
Nov 18, 2024
by
Guido Casati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use macro NAS_INTEGRITY_SIZE in NAS
parent
611c0554
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
openair3/NAS/NR_UE/nr_nas_msg.c
openair3/NAS/NR_UE/nr_nas_msg.c
+4
-4
No files found.
openair3/NAS/NR_UE/nr_nas_msg.c
View file @
c37c5ad7
...
...
@@ -641,7 +641,7 @@ static void generateSecurityModeComplete(nr_ue_nas_t *nas, as_nas_info_t *initia
int
size
=
sizeof
(
fgmm_msg_header_t
);
fgmm_nas_msg_security_protected_t
nas_msg
=
{
0
};
nas_stream_cipher_t
stream_cipher
;
uint8_t
mac
[
4
];
uint8_t
mac
[
NAS_INTEGRITY_SIZE
];
// set security protected header
fgs_nas_message_security_header_t
*
sp
=
&
nas_msg
.
header
;
sp
->
protocol_discriminator
=
FGS_MOBILITY_MANAGEMENT_MESSAGE
;
...
...
@@ -767,7 +767,7 @@ static void generateRegistrationComplete(nr_ue_nas_t *nas,
{
int
length
=
0
;
nas_stream_cipher_t
stream_cipher
;
uint8_t
mac
[
4
];
uint8_t
mac
[
NAS_INTEGRITY_SIZE
];
fgmm_nas_msg_security_protected_t
sp
=
{
0
};
// set security protected header
...
...
@@ -1016,7 +1016,7 @@ static void generateDeregistrationRequest(nr_ue_nas_t *nas, as_nas_info_t *initi
stream_cipher
.
message
=
(
unsigned
char
*
)(
initialNasMsg
->
nas_data
+
6
);
/* length in bits */
stream_cipher
.
blength
=
(
initialNasMsg
->
length
-
6
)
<<
3
;
uint8_t
mac
[
4
];
uint8_t
mac
[
NAS_INTEGRITY_SIZE
];
stream_compute_integrity
(
nas
->
security_container
->
integrity_algorithm
,
&
stream_cipher
,
mac
);
printf
(
"mac %x %x %x %x
\n
"
,
mac
[
0
],
mac
[
1
],
mac
[
2
],
mac
[
3
]);
...
...
@@ -1042,7 +1042,7 @@ static void generatePduSessionEstablishRequest(nr_ue_nas_t *nas, as_nas_info_t *
encode_pdu_session_establishment_request
(
&
pdu_session_establish
,
req_buffer
);
nas_stream_cipher_t
stream_cipher
;
uint8_t
mac
[
4
];
uint8_t
mac
[
NAS_INTEGRITY_SIZE
];
// 5GMM security protected message
fgmm_nas_msg_security_protected_t
sp_msg
=
{
0
};
...
...
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