aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_common
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2019-04-25 16:29:39 (GMT)
committerJouni Malinen <j@w1.fi>2019-04-25 20:49:43 (GMT)
commitff229da3095917fe1d152ca256c83366b0f3ee1d (patch)
tree364adae39037017d574138acc6c9917de71512d6 /src/eap_common
parent1e237903f5b5d3117342daf006c5878cdb45e3d3 (diff)
downloadhostap-ff229da3095917fe1d152ca256c83366b0f3ee1d.zip
hostap-ff229da3095917fe1d152ca256c83366b0f3ee1d.tar.gz
hostap-ff229da3095917fe1d152ca256c83366b0f3ee1d.tar.bz2
Share a single buf_shift_right() implementation
Move the identical function used by both SAE and EAP-pwd to src/utils/common.c to avoid duplicated implementation. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Diffstat (limited to 'src/eap_common')
-rw-r--r--src/eap_common/eap_pwd_common.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/eap_common/eap_pwd_common.c b/src/eap_common/eap_pwd_common.c
index 6ca2c8b..2efcfc7 100644
--- a/src/eap_common/eap_pwd_common.c
+++ b/src/eap_common/eap_pwd_common.c
@@ -119,15 +119,6 @@ EAP_PWD_group * get_eap_pwd_group(u16 num)
}
-static void buf_shift_right(u8 *buf, size_t len, size_t bits)
-{
- size_t i;
- for (i = len - 1; i > 0; i--)
- buf[i] = (buf[i - 1] << (8 - bits)) | (buf[i] >> bits);
- buf[0] >>= bits;
-}
-
-
/*
* compute a "random" secret point on an elliptic curve based
* on the password and identities.