use zero amf in re-synch

This commit is contained in:
Sukchan Lee 2017-12-18 17:28:22 +09:00
parent fdebe90f7c
commit d85f546de2
4 changed files with 4 additions and 10 deletions

View File

@ -98,8 +98,7 @@ static int hss_s6a_air_cb( struct msg **msg, struct avp *avp,
if (avpch)
{
CHECK_FCT( fd_msg_avp_hdr(avpch, &hdr) );
hss_kdf_sqn(opc, auth_info.k, auth_info.amf,
hdr->avp_value->os.data, sqn, mac_s);
hss_kdf_sqn(opc, auth_info.k, hdr->avp_value->os.data, sqn, mac_s);
if (memcmp(mac_s, hdr->avp_value->os.data +
RAND_LEN + HSS_SQN_LEN, MAC_S_LEN) == 0)
{

View File

@ -34,12 +34,12 @@ void hss_kdf_kasme(const c_uint8_t *ck, const c_uint8_t *ik,
}
void hss_kdf_sqn(
const c_uint8_t *opc, const c_uint8_t *k,
const c_uint8_t *amf, const c_uint8_t *auts,
const c_uint8_t *opc, const c_uint8_t *k, const c_uint8_t *auts,
c_uint8_t *sqn_ms, c_uint8_t *mac_s)
{
int i;
c_uint8_t ak[HSS_AK_LEN];
c_uint8_t amf[2] = { 0, 0 };
const c_uint8_t *rand = auts;
const c_uint8_t *conc_sqn_ms = auts + RAND_LEN;

View File

@ -11,8 +11,7 @@ CORE_DECLARE(void) hss_kdf_kasme(const c_uint8_t *ck, const c_uint8_t *ik,
c_uint8_t *kasme);
CORE_DECLARE(void) hss_kdf_sqn(
const c_uint8_t *opc, const c_uint8_t *k,
const c_uint8_t *amf, const c_uint8_t *auts,
const c_uint8_t *opc, const c_uint8_t *k, const c_uint8_t *auts,
c_uint8_t *sqn_ms, c_uint8_t *mac_s);
#endif /* __HSS_KDF_H__ */

View File

@ -1034,13 +1034,9 @@ abts_suite *test_attach(abts_suite *suite)
{
suite = ADD_SUITE(suite)
#if 0
abts_run_test(suite, attach_test1, NULL);
#endif
abts_run_test(suite, attach_test2, NULL);
#if 0
abts_run_test(suite, attach_test3, NULL);
#endif
return suite;
}