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 <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2018-05-17 22:02:02 +03:00 committed by Jouni Malinen
parent 4b2e03c42a
commit 9973129646

View file

@ -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) if (mp_copy((mp_int *) a, (mp_int *) r) != MP_OKAY)
return -1; return -1;
mp_rshd((mp_int *) r, n); mp_rshb((mp_int *) r, n);
return 0; return 0;
} }