aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_common
diff options
context:
space:
mode:
authorDan Harkins <dharkins@lounge.org>2012-02-11 10:14:31 (GMT)
committerJouni Malinen <j@w1.fi>2012-02-11 10:14:31 (GMT)
commita7cbb4753c90e0d0e2722c826ffedf529e920e14 (patch)
treeb07d8173a57bff33f8bfd091c9e1910042fd3c17 /src/eap_common
parent3f6e50ac282bbcb4be137023316543bd232ba350 (diff)
downloadhostap-a7cbb4753c90e0d0e2722c826ffedf529e920e14.zip
hostap-a7cbb4753c90e0d0e2722c826ffedf529e920e14.tar.gz
hostap-a7cbb4753c90e0d0e2722c826ffedf529e920e14.tar.bz2
EAP-pwd: Fix the argument name in compute_keys()
The parameters used here are confirm, not commit values. Signed-hostap: Dan Harkins <dharkins@lounge.org>
Diffstat (limited to 'src/eap_common')
-rw-r--r--src/eap_common/eap_pwd_common.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/eap_common/eap_pwd_common.c b/src/eap_common/eap_pwd_common.c
index 0dbdff2..6879950 100644
--- a/src/eap_common/eap_pwd_common.c
+++ b/src/eap_common/eap_pwd_common.c
@@ -277,7 +277,7 @@ int compute_password_element(EAP_PWD_group *grp, u16 num,
int compute_keys(EAP_PWD_group *grp, BN_CTX *bnctx, BIGNUM *k,
BIGNUM *peer_scalar, BIGNUM *server_scalar,
- u8 *commit_peer, u8 *commit_server,
+ u8 *confirm_peer, u8 *confirm_server,
u32 *ciphersuite, u8 *msk, u8 *emsk)
{
HMAC_CTX ctx;
@@ -306,14 +306,14 @@ int compute_keys(EAP_PWD_group *grp, BN_CTX *bnctx, BIGNUM *k,
H_Update(&ctx, cruft, BN_num_bytes(grp->order));
H_Final(&ctx, &session_id[1]);
- /* then compute MK = H(k | commit-peer | commit-server) */
+ /* then compute MK = H(k | confirm-peer | confirm-server) */
H_Init(&ctx);
offset = BN_num_bytes(grp->prime) - BN_num_bytes(k);
os_memset(cruft, 0, BN_num_bytes(grp->prime));
BN_bn2bin(k, cruft + offset);
H_Update(&ctx, cruft, BN_num_bytes(grp->prime));
- H_Update(&ctx, commit_peer, SHA256_DIGEST_LENGTH);
- H_Update(&ctx, commit_server, SHA256_DIGEST_LENGTH);
+ H_Update(&ctx, confirm_peer, SHA256_DIGEST_LENGTH);
+ H_Update(&ctx, confirm_server, SHA256_DIGEST_LENGTH);
H_Final(&ctx, mk);
/* stretch the mk with the session-id to get MSK | EMSK */