090-wolfssl-fix-crypto_bignum_sum.patch 881 B

1234567891011121314151617181920212223242526
  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. The initial crypto wrapper implementation for wolfSSL seems to have
  6. included a copy-paste error in crypto_bignum_sub() implementation that
  7. was identical to crypto_bignum_add() while mp_sub() should have been
  8. used instead of mp_add().
  9. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
  10. ---
  11. src/crypto/crypto_wolfssl.c | 2 +-
  12. 1 file changed, 1 insertion(+), 1 deletion(-)
  13. --- a/src/crypto/crypto_wolfssl.c
  14. +++ b/src/crypto/crypto_wolfssl.c
  15. @@ -1151,7 +1151,7 @@ int crypto_bignum_sub(const struct crypt
  16. if (TEST_FAIL())
  17. return -1;
  18. - return mp_add((mp_int *) a, (mp_int *) b,
  19. + return mp_sub((mp_int *) a, (mp_int *) b,
  20. (mp_int *) r) == MP_OKAY ? 0 : -1;
  21. }