wpad-wolfssl: fix crypto_bignum_sub()
[openwrt/staging/wigyori.git] / package / network / services / hostapd / patches / 090-wolfssl-fix-crypto_bignum_sum.patch
1 From 1766e608ba1114220f3b3598e77aa53b50c38a6e Mon Sep 17 00:00:00 2001
2 From: Jouni Malinen <jouni@codeaurora.org>
3 Date: Mon, 14 Oct 2019 19:27:47 +0300
4 Subject: [PATCH] wolfSSL: Fix crypto_bignum_sub()
5
6 The initial crypto wrapper implementation for wolfSSL seems to have
7 included a copy-paste error in crypto_bignum_sub() implementation that
8 was identical to crypto_bignum_add() while mp_sub() should have been
9 used instead of mp_add().
10
11 Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
12 ---
13 src/crypto/crypto_wolfssl.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16 --- a/src/crypto/crypto_wolfssl.c
17 +++ b/src/crypto/crypto_wolfssl.c
18 @@ -1151,7 +1151,7 @@ int crypto_bignum_sub(const struct crypt
19 if (TEST_FAIL())
20 return -1;
21
22 - return mp_add((mp_int *) a, (mp_int *) b,
23 + return mp_sub((mp_int *) a, (mp_int *) b,
24 (mp_int *) r) == MP_OKAY ? 0 : -1;
25 }
26