mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-04 05:04: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()
|
int asn_test()
|
||||||
{
|
{
|
||||||
#ifndef NO_ASN_TIME
|
#ifndef NO_ASN_TIME
|
||||||
long now;
|
#ifdef WORD64_AVAILABLE
|
||||||
|
word64 now;
|
||||||
|
#else
|
||||||
|
word32 now;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Parameter Validation tests. */
|
/* Parameter Validation tests. */
|
||||||
if (wc_GetTime(NULL, sizeof(now)) != BAD_FUNC_ARG)
|
if (wc_GetTime(NULL, sizeof(now)) != BAD_FUNC_ARG)
|
||||||
@@ -1042,7 +1046,6 @@ int asn_test()
|
|||||||
if (wc_GetTime(&now, 0) != BUFFER_E)
|
if (wc_GetTime(&now, 0) != BUFFER_E)
|
||||||
return -101;
|
return -101;
|
||||||
|
|
||||||
if (sizeof(long) >= sizeof(time_t)) {
|
|
||||||
now = 0;
|
now = 0;
|
||||||
if (wc_GetTime(&now, sizeof(now)) != 0) {
|
if (wc_GetTime(&now, sizeof(now)) != 0) {
|
||||||
return -102;
|
return -102;
|
||||||
@@ -1050,7 +1053,6 @@ int asn_test()
|
|||||||
if (now == 0) {
|
if (now == 0) {
|
||||||
return -103;
|
return -103;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -5728,7 +5730,8 @@ static int rsa_sig_test(RsaKey* key, word32 keyLen, int modLen, WC_RNG* rng)
|
|||||||
#elif defined(WOLFSSL_ASYNC_CRYPT)
|
#elif defined(WOLFSSL_ASYNC_CRYPT)
|
||||||
/* async may not require RNG */
|
/* async may not require RNG */
|
||||||
if (ret != 0 && ret != MISSING_RNG_E)
|
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 */
|
/* FIPS140 implementation does not do blinding */
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user