mka: Clean up key allocation
authorSabrina Dubroca <sd@queasysnail.net>
Fri, 12 Aug 2016 13:07:35 +0000 (15:07 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 28 Aug 2016 19:24:33 +0000 (22:24 +0300)
commit7dcec248814beacd40d7df55d4a2524199910ba2
treed7e888f3e13fe059512d686a1f72026a8a0bb12d
parent95e9460d6a9d18d7805af08cfb38982c3cb1cdc5
mka: Clean up key allocation

Assign cs in ieee802_1x_mka_decode_dist_sak_body and reuse it.

Cleanup of key allocation: ieee802_1x_kay_generate_new_sak() and
ieee802_1x_mka_decode_dist_sak_body() both allocate a struct key_conf,
fill it, and ask ieee802_1x_kay_init_data_key() to allocate and set up a
struct data_key. They also allocate multiple key buffers and copy the
same data around. Stop moving data from buffer to buffer, and just
allocate what we really need.

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
src/pae/ieee802_1x_kay.c
src/pae/ieee802_1x_kay_i.h