From: Jouni Malinen Date: Thu, 17 May 2018 19:02:02 +0000 (+0300) Subject: wolfSSL: Fix crypto_bignum_rshift() wrapper X-Git-Tag: hostap_2_7~331 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9973129646af03565f6df8a5d173d3dee2bddcb2;p=thirdparty%2Fhostap.git wolfSSL: Fix crypto_bignum_rshift() wrapper The n argument to this function is number of bits, not bytes, to shift. As such, need to use mp_rshb() instead of mp_rshd(). This fixes EAP-pwd with P-521 curve. Signed-off-by: Jouni Malinen --- diff --git a/src/crypto/crypto_wolfssl.c b/src/crypto/crypto_wolfssl.c index bc4fd6a2a..b5a1e3fa3 100644 --- a/src/crypto/crypto_wolfssl.c +++ b/src/crypto/crypto_wolfssl.c @@ -1181,7 +1181,7 @@ int crypto_bignum_rshift(const struct crypto_bignum *a, int n, { if (mp_copy((mp_int *) a, (mp_int *) r) != MP_OKAY) return -1; - mp_rshd((mp_int *) r, n); + mp_rshb((mp_int *) r, n); return 0; }