mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 03:34:39 +02:00
update for test case and sha3
This commit is contained in:
committed by
Jacob Barthelmeh
parent
03ed495f84
commit
d09b947478
@@ -130,13 +130,17 @@ int wc_Sha3_384_GetHash(wc_Sha3* sha, byte* out)
|
||||
if (sha == NULL || out == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
#ifdef WOLFSSL_XILINX_CRYPTO_OLD
|
||||
if (wc_Sha3_384_Copy(sha, &s) != 0) {
|
||||
WOLFSSL_MSG("Unable to copy SHA3 structure");
|
||||
return MEMORY_E;
|
||||
}
|
||||
|
||||
if (wc_Sha3_384_Copy(sha, &s) != 0) {
|
||||
WOLFSSL_MSG("Unable to copy SHA3 structure");
|
||||
return MEMORY_E;
|
||||
}
|
||||
|
||||
return wc_Sha3_384_Final(&s, out);
|
||||
return wc_Sha3_384_Final(&s, out);
|
||||
#else
|
||||
XSecure_Sha3_ReadHash(&(sha->hw), out);
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -151,8 +155,13 @@ int wc_Sha3_384_Copy(wc_Sha3* src, wc_Sha3* dst)
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
#ifdef WOLFSSL_XILINX_CRYPTO_OLD
|
||||
XMEMCPY((byte*)dst, (byte*)src, sizeof(wc_Sha3));
|
||||
return 0;
|
||||
#else
|
||||
WOLFSSL_MSG("Copy of SHA3 struct not supported with this build");
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -11251,7 +11251,7 @@ static int rsa_sig_test(RsaKey* key, word32 keyLen, int modLen, WC_RNG* rng)
|
||||
* -101 = USER_CRYPTO_ERROR
|
||||
*/
|
||||
if (ret == 0)
|
||||
#elif defined(WOLFSSL_AFALG_XILINX_RSA)
|
||||
#elif defined(WOLFSSL_AFALG_XILINX_RSA) || defined(WOLFSSL_XILINX_CRYPT)
|
||||
/* blinding / rng handled with hardware acceleration */
|
||||
if (ret != 0)
|
||||
#elif defined(WOLFSSL_ASYNC_CRYPT) || defined(WOLF_CRYPTO_CB)
|
||||
|
Reference in New Issue
Block a user