diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-03-04 02:28:19 +0100 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-06-18 17:41:10 +0200 |
commit | 8bca67a60af40de9f8653b3510f67f35c15c727e (patch) | |
tree | 52f47066bfcf77cb9e318a64980d8880e66fe8e1 /openbsc/src/libiu | |
parent | 2f8b9d25f8428980e35ed8f8b2dc44324bc4566a (diff) |
GPRS/IuPS: remove all 3G authentication dev hacks
UMTS auth works now with the external OsmoHLR.
Change-Id: I1204f388cf1311ec98b3eaf7505d7e18e73f03d0
Diffstat (limited to 'openbsc/src/libiu')
-rw-r--r-- | openbsc/src/libiu/iu.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/openbsc/src/libiu/iu.c b/openbsc/src/libiu/iu.c index 8ba6fa49d..932b21718 100644 --- a/openbsc/src/libiu/iu.c +++ b/openbsc/src/libiu/iu.c @@ -225,25 +225,10 @@ int iu_tx_sec_mode_cmd(struct ue_conn_ctx *uectx, struct gsm_auth_tuple *tp, { struct osmo_scu_prim *prim; struct msgb *msg; - uint8_t ik[16]; - uint8_t ck[16]; - unsigned int i; - - /* C5 function to derive IK from Kc */ - for (i = 0; i < 4; i++) - ik[i] = tp->vec.kc[i] ^ tp->vec.kc[i+4]; - memcpy(ik+4, tp->vec.kc, 8); - for (i = 12; i < 16; i++) - ik[i] = ik[i-12]; - - if (send_ck) { - /* C4 function to derive CK from Kc */ - memcpy(ck, tp->vec.kc, 8); - memcpy(ck+8, tp->vec.kc, 8); - } /* create RANAP message */ - msg = ranap_new_msg_sec_mod_cmd(ik, send_ck? ck : NULL, new_key ? RANAP_KeyStatus_new : RANAP_KeyStatus_old); + msg = ranap_new_msg_sec_mod_cmd(tp->vec.ik, send_ck? tp->vec.ck : NULL, + new_key ? RANAP_KeyStatus_new : RANAP_KeyStatus_old); msg->l2h = msg->data; /* wrap RANAP message in SCCP N-DATA.req */ prim = (struct osmo_scu_prim *) msgb_push(msg, sizeof(*prim)); |