diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2018-04-22 19:29:41 +0200 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2018-05-01 01:32:13 +0200 |
commit | aa4ed671643c1d7bcd0ae05faa9aef236d9ad5ff (patch) | |
tree | 25489e12e63bd33438688ff33c64b8c5b4cda460 /src/gprs/sgsn_auth.c | |
parent | 7554fd1b5e49c809dbb95967cfc6f146e15f505a (diff) |
GERAN: allow GSM SRES on UMTS AKA challenge
Store the established security context type (GSM or UMTS) instead of the
boolean flag is_authenticated. Provide the previous boolean query with thin
sgsn_mm_ctx_is_authenticated() function.
Knowing which security context was established will be necessary for OS#3224,
i.e. using the proper ciphering key, which is not yet tested properly, and
probably not correct at this stage.
This change will make new SGSN_Tests.TC_attach_umts_aka_gsm_sres pass.
Related: OS#3193 OS#3224
Change-Id: I36807bad3bc55c0030d4f09cb2c369714f24bec7
Diffstat (limited to 'src/gprs/sgsn_auth.c')
-rw-r--r-- | src/gprs/sgsn_auth.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gprs/sgsn_auth.c b/src/gprs/sgsn_auth.c index 6fb32b711..694bece7a 100644 --- a/src/gprs/sgsn_auth.c +++ b/src/gprs/sgsn_auth.c @@ -114,7 +114,7 @@ enum sgsn_auth_state sgsn_auth_state(struct sgsn_mm_ctx *mmctx) return mmctx->auth_state; if (sgsn->cfg.require_authentication && - (!mmctx->is_authenticated || + (!sgsn_mm_ctx_is_authenticated(mmctx) || mmctx->subscr->sgsn_data->auth_triplets_updated)) return SGSN_AUTH_AUTHENTICATE; @@ -175,7 +175,7 @@ int sgsn_auth_request(struct sgsn_mm_ctx *mmctx) OSMO_ASSERT(mmctx->subscr != NULL); - if (sgsn->cfg.require_authentication && !mmctx->is_authenticated) { + if (sgsn->cfg.require_authentication && !sgsn_mm_ctx_is_authenticated(mmctx)) { /* Find next tuple */ at = sgsn_auth_get_tuple(mmctx, mmctx->auth_triplet.key_seq); |