mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-03 20:54:41 +02:00
change type for test instead and add RSA blinding check
This commit is contained in:
@@ -1034,7 +1034,11 @@ int base64_test()
|
||||
int asn_test()
|
||||
{
|
||||
#ifndef NO_ASN_TIME
|
||||
long now;
|
||||
#ifdef WORD64_AVAILABLE
|
||||
word64 now;
|
||||
#else
|
||||
word32 now;
|
||||
#endif
|
||||
|
||||
/* Parameter Validation tests. */
|
||||
if (wc_GetTime(NULL, sizeof(now)) != BAD_FUNC_ARG)
|
||||
@@ -1042,14 +1046,12 @@ int asn_test()
|
||||
if (wc_GetTime(&now, 0) != BUFFER_E)
|
||||
return -101;
|
||||
|
||||
if (sizeof(long) >= sizeof(time_t)) {
|
||||
now = 0;
|
||||
if (wc_GetTime(&now, sizeof(now)) != 0) {
|
||||
return -102;
|
||||
}
|
||||
if (now == 0) {
|
||||
return -103;
|
||||
}
|
||||
now = 0;
|
||||
if (wc_GetTime(&now, sizeof(now)) != 0) {
|
||||
return -102;
|
||||
}
|
||||
if (now == 0) {
|
||||
return -103;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -5728,7 +5730,8 @@ static int rsa_sig_test(RsaKey* key, word32 keyLen, int modLen, WC_RNG* rng)
|
||||
#elif defined(WOLFSSL_ASYNC_CRYPT)
|
||||
/* async may not require RNG */
|
||||
if (ret != 0 && ret != MISSING_RNG_E)
|
||||
#elif defined(HAVE_FIPS) || defined(WOLFSSL_ASYNC_CRYPT)
|
||||
#elif defined(HAVE_FIPS) || defined(WOLFSSL_ASYNC_CRYPT) || \
|
||||
!defined(WC_RSA_BLINDING)
|
||||
/* FIPS140 implementation does not do blinding */
|
||||
if (ret != 0)
|
||||
#else
|
||||
|
Reference in New Issue
Block a user