aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_peer/eap_pwd.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2011-11-19 14:52:52 (GMT)
committerJouni Malinen <j@w1.fi>2011-11-19 14:52:52 (GMT)
commit5419d6afed1a49ebc49a5bd0347ba14e4c3b7def (patch)
tree6ddc9e861d0815f86876b2b572aca39bef302f15 /src/eap_peer/eap_pwd.c
parente547e071e1f4042d202cfaba4aded8558ec37173 (diff)
downloadhostap-5419d6afed1a49ebc49a5bd0347ba14e4c3b7def.zip
hostap-5419d6afed1a49ebc49a5bd0347ba14e4c3b7def.tar.gz
hostap-5419d6afed1a49ebc49a5bd0347ba14e4c3b7def.tar.bz2
EAP-pwd: Remove struct eap_pwd_hdr
This structure was not really used for anything apart from figuring out length of the EAP-pwd header (and even that in a way that would not work with fragmentation). Since the bitfields in the structure could have been problematic depending on target endianness, remove this unnecessary structure. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/eap_peer/eap_pwd.c')
-rw-r--r--src/eap_peer/eap_pwd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/eap_peer/eap_pwd.c b/src/eap_peer/eap_pwd.c
index 6511a66..1957c82 100644
--- a/src/eap_peer/eap_pwd.c
+++ b/src/eap_peer/eap_pwd.c
@@ -423,8 +423,7 @@ eap_pwd_perform_commit_exchange(struct eap_sm *sm, struct eap_pwd_data *data,
BN_bn2bin(y, element + BN_num_bytes(data->grp->prime) + offset);
resp = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_PWD,
- sizeof(struct eap_pwd_hdr) +
- BN_num_bytes(data->grp->order) +
+ 1 + BN_num_bytes(data->grp->order) +
(2 * BN_num_bytes(data->grp->prime)),
EAP_CODE_RESPONSE, eap_get_id(reqData));
if (resp == NULL)
@@ -633,7 +632,7 @@ eap_pwd_perform_confirm_exchange(struct eap_sm *sm, struct eap_pwd_data *data,
H_Final(&ctx, conf);
resp = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_PWD,
- sizeof(struct eap_pwd_hdr) + SHA256_DIGEST_LENGTH,
+ 1 + SHA256_DIGEST_LENGTH,
EAP_CODE_RESPONSE, eap_get_id(reqData));
if (resp == NULL)
goto fin;