Added return codes to wc_InitDhKey, wc_InitDsaKey and mp_set. Added missing return code checks on mp_copy in ecc.c. Fixed build with DSA and no ECC where mp_set function def would be missing.

This commit is contained in:
David Garske
2017-02-01 10:13:47 -08:00
parent d14be65315
commit 9c7407d18c
11 changed files with 292 additions and 201 deletions
+3 -3
View File
@@ -37,7 +37,7 @@
#include <wolfssl/wolfcrypt/tfm.h>
#else
#include <wolfssl/wolfcrypt/random.h>
#include <wolfssl/wolfcrypt/random.h>
#ifndef CHAR_BIT
#include <limits.h>
@@ -96,7 +96,7 @@ extern "C" {
#elif defined(MP_16BIT) || defined(NO_64BIT)
typedef unsigned short mp_digit;
typedef unsigned int mp_word;
#define DIGIT_BIT 12
#define DIGIT_BIT 12
#elif defined(MP_64BIT)
/* for GCC only on supported platforms */
typedef unsigned long long mp_digit; /* 64 bit type, 128 uses mode(TI) */
@@ -265,7 +265,7 @@ int mp_invmod_slow (mp_int * a, mp_int * b, mp_int * c);
int mp_cmp_mag (mp_int * a, mp_int * b);
int mp_cmp (mp_int * a, mp_int * b);
int mp_cmp_d(mp_int * a, mp_digit b);
void mp_set (mp_int * a, mp_digit b);
int mp_set (mp_int * a, mp_digit b);
int mp_is_bit_set (mp_int * a, mp_digit b);
int mp_mod (mp_int * a, mp_int * b, mp_int * c);
int mp_div(mp_int * a, mp_int * b, mp_int * c, mp_int * d);