mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 12:14:38 +02:00
Fix unit test coverity defect in test_wc_PKCS7_SetAESKeyWrapUnwrapCb()
This commit is contained in:
@@ -18229,6 +18229,11 @@ static int test_wc_PKCS7_SetAESKeyWrapUnwrapCb(void)
|
|||||||
WC_RNG rng;
|
WC_RNG rng;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ECC_TIMING_RESISTANT
|
||||||
|
XMEMSET(&rng, 0, sizeof(WC_RNG));
|
||||||
|
ExpectIntEQ(wc_InitRng(&rng), 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Load test certs */
|
/* Load test certs */
|
||||||
#ifdef USE_CERT_BUFFERS_256
|
#ifdef USE_CERT_BUFFERS_256
|
||||||
ExpectNotNull(eccCert = (byte*)XMALLOC(TWOK_BUF, HEAP_HINT,
|
ExpectNotNull(eccCert = (byte*)XMALLOC(TWOK_BUF, HEAP_HINT,
|
||||||
@@ -18279,8 +18284,6 @@ static int test_wc_PKCS7_SetAESKeyWrapUnwrapCb(void)
|
|||||||
pkcs7->singleCert = eccCert;
|
pkcs7->singleCert = eccCert;
|
||||||
pkcs7->singleCertSz = (word32)eccCertSz;
|
pkcs7->singleCertSz = (word32)eccCertSz;
|
||||||
#ifdef ECC_TIMING_RESISTANT
|
#ifdef ECC_TIMING_RESISTANT
|
||||||
XMEMSET(&rng, 0, sizeof(WC_RNG));
|
|
||||||
ExpectIntEQ(wc_InitRng(&rng), 0);
|
|
||||||
pkcs7->rng = &rng;
|
pkcs7->rng = &rng;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@@ -16513,7 +16513,7 @@ static int ValidateGmtime(struct tm* inTime)
|
|||||||
#if !defined(NO_ASN_TIME) && !defined(USER_TIME) && \
|
#if !defined(NO_ASN_TIME) && !defined(USER_TIME) && \
|
||||||
!defined(TIME_OVERRIDES) && (defined(OPENSSL_EXTRA) || defined(HAVE_PKCS7))
|
!defined(TIME_OVERRIDES) && (defined(OPENSSL_EXTRA) || defined(HAVE_PKCS7))
|
||||||
/* Set current time string, either UTC or GeneralizedTime.
|
/* Set current time string, either UTC or GeneralizedTime.
|
||||||
* (void*) tm should be a pointer to time_t, output is placed in buf.
|
* (void*) currTime should be a pointer to time_t, output is placed in buf.
|
||||||
*
|
*
|
||||||
* Return time string length placed in buf on success, negative on error */
|
* Return time string length placed in buf on success, negative on error */
|
||||||
int GetAsnTimeString(void* currTime, byte* buf, word32 len)
|
int GetAsnTimeString(void* currTime, byte* buf, word32 len)
|
||||||
|
Reference in New Issue
Block a user