mirror of https://github.com/wolfSSL/wolfssl.git
SiLabs: Fix tests and wc_ecc_import_private_key
parent
919c2a2dfb
commit
620fe2da14
|
@ -6231,7 +6231,7 @@ int wc_ecc_verify_hash_ex(mp_int *r, mp_int *s, const byte* hash,
|
|||
word32 msgLenInBytes = hashlen;
|
||||
CRYS_ECPKI_HASH_OpMode_t hash_mode;
|
||||
#elif defined(WOLFSSL_SILABS_SE_ACCEL)
|
||||
byte sigRS[ECC_MAX_CRYPTO_HW_SIZE * 2];
|
||||
byte sigRS[ECC_MAX_CRYPTO_HW_SIZE * 4];
|
||||
#elif !defined(WOLFSSL_SP_MATH) || defined(FREESCALE_LTC_ECC)
|
||||
int did_init = 0;
|
||||
ecc_point *mG = NULL, *mQ = NULL;
|
||||
|
@ -7975,7 +7975,12 @@ int wc_ecc_import_private_key_ex(const byte* priv, word32 privSz,
|
|||
}
|
||||
#elif defined(WOLFSSL_SILABS_SE_ACCEL)
|
||||
if (ret == MP_OKAY) {
|
||||
ret = silabs_ecc_import_private(key, privSz);
|
||||
if (pub) {
|
||||
ret = silabs_ecc_import(key, privSz);
|
||||
} else
|
||||
{
|
||||
ret = silabs_ecc_import_private(key, privSz);
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
||||
|
|
|
@ -22337,19 +22337,20 @@ static int ecc_test_buffers(void)
|
|||
TEST_SLEEP();
|
||||
|
||||
XMEMSET(plain, 0, sizeof(plain));
|
||||
verify = 1;
|
||||
|
||||
do {
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT)
|
||||
ret = wc_AsyncWait(ret, cliKey.asyncDev, WC_ASYNC_FLAG_CALL_AGAIN);
|
||||
#endif
|
||||
if (ret == 0)
|
||||
ret = wc_ecc_verify_hash(out, x, plain, sizeof(plain), &verify,
|
||||
ret = wc_ecc_verify_hash(out, x, plain, inLen, &verify,
|
||||
cliKey);
|
||||
} while (ret == WC_PENDING_E);
|
||||
if (ret < 0)
|
||||
ERROR_OUT(-10430, done);
|
||||
|
||||
if (XMEMCMP(plain, in, (word32)ret))
|
||||
if (verify != 0)
|
||||
ERROR_OUT(-10431, done);
|
||||
TEST_SLEEP();
|
||||
|
||||
|
|
Loading…
Reference in New Issue