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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
lizhongxiao
OpenXG-RAN
Commits
5899af2e
Commit
5899af2e
authored
Jul 13, 2016
by
Frédéric Leroy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UE/EMM: move _authentication_data to nas_user_t
parent
576bbd25
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
93 additions
and
77 deletions
+93
-77
openair3/NAS/UE/EMM/Authentication.c
openair3/NAS/UE/EMM/Authentication.c
+55
-73
openair3/NAS/UE/EMM/Authentication.h
openair3/NAS/UE/EMM/Authentication.h
+23
-0
openair3/NAS/UE/EMM/SAP/EmmDeregistered.c
openair3/NAS/UE/EMM/SAP/EmmDeregistered.c
+1
-1
openair3/NAS/UE/EMM/SAP/EmmNull.c
openair3/NAS/UE/EMM/SAP/EmmNull.c
+1
-1
openair3/NAS/UE/EMM/SecurityModeControl.c
openair3/NAS/UE/EMM/SecurityModeControl.c
+1
-1
openair3/NAS/UE/EMM/emmData.h
openair3/NAS/UE/EMM/emmData.h
+1
-0
openair3/NAS/UE/EMM/emm_proc.h
openair3/NAS/UE/EMM/emm_proc.h
+1
-1
openair3/NAS/UE/nas_proc.c
openair3/NAS/UE/nas_proc.c
+5
-0
openair3/NAS/UE/user_defs.h
openair3/NAS/UE/user_defs.h
+5
-0
No files found.
openair3/NAS/UE/EMM/Authentication.c
View file @
5899af2e
This diff is collapsed.
Click to expand it.
openair3/NAS/UE/EMM/Authentication.h
0 → 100644
View file @
5899af2e
#ifndef _AUTHENTICATION_H
#define _AUTHENTICATION_H
/*
* Internal data used for authentication procedure
*/
typedef
struct
{
uint8_t
rand
[
AUTH_RAND_SIZE
];
/* Random challenge number */
uint8_t
res
[
AUTH_RES_SIZE
];
/* Authentication response */
uint8_t
ck
[
AUTH_CK_SIZE
];
/* Ciphering key */
uint8_t
ik
[
AUTH_IK_SIZE
];
/* Integrity key */
#define AUTHENTICATION_T3410 0x01
#define AUTHENTICATION_T3417 0x02
#define AUTHENTICATION_T3421 0x04
#define AUTHENTICATION_T3430 0x08
unsigned
char
timers
;
/* Timer restart bitmap */
#define AUTHENTICATION_COUNTER_MAX 3
unsigned
char
mac_count
:
2
;
/* MAC failure counter (#20) */
unsigned
char
umts_count
:
2
;
/* UMTS challenge failure counter (#26) */
unsigned
char
sync_count
:
2
;
/* Sync failure counter (#21) */
}
authentication_data_t
;
#endif
openair3/NAS/UE/EMM/SAP/EmmDeregistered.c
View file @
5899af2e
...
...
@@ -98,7 +98,7 @@ int EmmDeregistered(nas_user_t *user, const emm_reg_t *evt)
/* Delete the authentication data RAND and RES */
// FIXME REVIEW
rc
=
emm_proc_authentication_delete
();
rc
=
emm_proc_authentication_delete
(
user
);
if
(
rc
!=
RETURNok
)
{
LOG_FUNC_RETURN
(
rc
);
...
...
openair3/NAS/UE/EMM/SAP/EmmNull.c
View file @
5899af2e
...
...
@@ -86,7 +86,7 @@ int EmmNull(nas_user_t *user, const emm_reg_t *evt)
assert
(
emm_fsm_get_status
(
user
)
==
EMM_NULL
);
/* Delete the authentication data RAND and RES */
rc
=
emm_proc_authentication_delete
();
rc
=
emm_proc_authentication_delete
(
user
);
if
(
rc
!=
RETURNok
)
{
LOG_FUNC_RETURN
(
rc
);
...
...
openair3/NAS/UE/EMM/SecurityModeControl.c
View file @
5899af2e
...
...
@@ -158,7 +158,7 @@ int emm_proc_security_mode_command(nas_user_t *user, int native_ksi, int ksi,
ksi
);
/* Delete any previously stored RAND and RES and stop timer T3416 */
(
void
)
emm_proc_authentication_delete
();
(
void
)
emm_proc_authentication_delete
(
user
);
/*
* Check the replayed UE security capabilities
...
...
openair3/NAS/UE/EMM/emmData.h
View file @
5899af2e
...
...
@@ -352,6 +352,7 @@ typedef struct emm_data_s {
#define T3430_DEFAULT_VALUE 15
/* 15 seconds */
#define T3440_DEFAULT_VALUE 10
/* 10 seconds */
// FIXME put in another structure
struct
nas_timer_t
T3402
;
/* attach failure timer */
struct
nas_timer_t
T3410
;
/* attach timer */
struct
nas_timer_t
T3411
;
/* attach restart timer */
...
...
openair3/NAS/UE/EMM/emm_proc.h
View file @
5899af2e
...
...
@@ -167,7 +167,7 @@ int emm_proc_identification_request(nas_user_t *user, emm_proc_identity_type_t t
int
emm_proc_authentication_request
(
nas_user_t
*
user
,
int
native_ksi
,
int
ksi
,
const
OctetString
*
rand
,
const
OctetString
*
autn
);
int
emm_proc_authentication_reject
(
nas_user_t
*
user
);
int
emm_proc_authentication_delete
(
void
);
int
emm_proc_authentication_delete
(
nas_user_t
*
user
);
/*
...
...
openair3/NAS/UE/nas_proc.c
View file @
5899af2e
...
...
@@ -97,6 +97,11 @@ void nas_proc_initialize(nas_user_t *user, emm_indication_callback_t emm_cb,
user
->
proc
.
rsrq
=
NAS_PROC_RSRQ_UNKNOWN
;
user
->
proc
.
rsrp
=
NAS_PROC_RSRP_UNKNOWN
;
user
->
authentication_data
=
calloc
(
1
,
sizeof
(
authentication_data_t
));
if
(
user
->
authentication_data
==
NULL
)
{
LOG_TRACE
(
ERROR
,
"NAS-PROC - Failed to alloc authentication_data"
);
// FIXME stop here
}
/* Initialize the EMM procedure manager */
emm_main_initialize
(
user
,
emm_cb
,
imei
);
...
...
openair3/NAS/UE/user_defs.h
View file @
5899af2e
...
...
@@ -50,18 +50,23 @@ Description NAS type definition to manage a user equipment
#include "esm_pt_defs.h"
#include "EMM/emm_fsm_defs.h"
#include "EMM/emmData.h"
#include "EMM/Authentication.h"
#include "EMM/IdleMode_defs.h"
#include "API/USIM/usim_api.h"
typedef
struct
{
int
fd
;
proc_data_t
proc
;
// Eps Session Management
esm_data_t
*
esm_data
;
// ESM internal data (used within ESM only)
esm_pt_data_t
*
esm_pt_data
;
esm_ebr_data_t
*
esm_ebr_data
;
// EPS bearer contexts
// Eps Mobility Management
emm_fsm_state_t
emm_fsm_status
;
// Current EPS Mobility Management status
emm_data_t
*
emm_data
;
// EPS mobility management data
emm_plmn_list_t
*
emm_plmn_list
;
// list of PLMN identities
authentication_data_t
*
authentication_data
;
// Hardware persistent storage
usim_data_t
usim_data
;
// USIM application data
}
nas_user_t
;
...
...
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