mirror of https://github.com/wolfSSL/wolfssl.git
Fix for ECC non-blocking test R/S values not zero padded causing occasstional wolfCrypt test failures with `./configure --enable-ecc=nonblock --enable-sp=yes,nonblock CFLAGS="-DWOLFSSL_PUBLIC_MP"`.
parent
a6e9e71fde
commit
a6851a44af
|
@ -23248,7 +23248,7 @@ static int crypto_ecc_verify(const uint8_t *key, uint32_t keySz,
|
|||
);
|
||||
count++;
|
||||
|
||||
/* TODO: Real-time work can be called here */
|
||||
/* This is where real-time work could be called */
|
||||
} while (ret == FP_WOULDBLOCK);
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
printf("ECC non-block verify: %d times\n", count);
|
||||
|
@ -23332,7 +23332,7 @@ static int crypto_ecc_sign(const uint8_t *key, uint32_t keySz,
|
|||
);
|
||||
count++;
|
||||
|
||||
/* TODO: Real-time work can be called here */
|
||||
/* This is where real-time work could be called */
|
||||
} while (ret == FP_WOULDBLOCK);
|
||||
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
|
@ -23342,8 +23342,8 @@ static int crypto_ecc_sign(const uint8_t *key, uint32_t keySz,
|
|||
|
||||
if (ret == 0) {
|
||||
/* export r/s */
|
||||
mp_to_unsigned_bin(&r, sig);
|
||||
mp_to_unsigned_bin(&s, sig + curveSz);
|
||||
mp_to_unsigned_bin_len(&r, sig, curveSz);
|
||||
mp_to_unsigned_bin_len(&s, sig + curveSz, curveSz);
|
||||
}
|
||||
|
||||
mp_clear(&r);
|
||||
|
|
Loading…
Reference in New Issue