forked from wolfSSL/wolfssl
Fix for normal math mp_read_unsigned_bin
where mp_zero
was also resetting the raw source. This caused failures with QAT when using normal math.
This commit is contained in:
@ -212,7 +212,9 @@ void mp_forcezero(mp_int * a)
|
|||||||
if (a->dp != NULL) {
|
if (a->dp != NULL) {
|
||||||
/* force zero the used digits */
|
/* force zero the used digits */
|
||||||
ForceZero(a->dp, a->used * sizeof(mp_digit));
|
ForceZero(a->dp, a->used * sizeof(mp_digit));
|
||||||
|
#ifdef HAVE_WOLF_BIGINT
|
||||||
|
wc_bigint_zero(&a->raw);
|
||||||
|
#endif
|
||||||
/* free ram */
|
/* free ram */
|
||||||
mp_free(a);
|
mp_free(a);
|
||||||
|
|
||||||
@ -484,9 +486,6 @@ void mp_zero (mp_int * a)
|
|||||||
|
|
||||||
a->sign = MP_ZPOS;
|
a->sign = MP_ZPOS;
|
||||||
a->used = 0;
|
a->used = 0;
|
||||||
#ifdef HAVE_WOLF_BIGINT
|
|
||||||
wc_bigint_zero(&a->raw);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
tmp = a->dp;
|
tmp = a->dp;
|
||||||
for (n = 0; n < a->alloc; n++) {
|
for (n = 0; n < a->alloc; n++) {
|
||||||
|
Reference in New Issue
Block a user