forked from wolfSSL/wolfssl
AESNI in FIPS mode does not support zero length inputs (#4411)
* AESNI in FIPS mode does not support zero length inputs * Update note to specifically note AESNI
This commit is contained in:
@@ -15572,6 +15572,11 @@ static int test_wc_AesCbcEncryptDecrypt (void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (cbcE == 0) {
|
if (cbcE == 0) {
|
||||||
|
#if defined(HAVE_FIPS) && defined(HAVE_FIPS_VERSION) && \
|
||||||
|
(HAVE_FIPS_VERSION == 2) && defined(WOLFSSL_AESNI)
|
||||||
|
printf("Zero length inputs not supported with AESNI in FIPS mode (v2),"
|
||||||
|
" skip test");
|
||||||
|
#else
|
||||||
/* Test passing in size of 0 */
|
/* Test passing in size of 0 */
|
||||||
XMEMSET(enc, 0, sizeof(enc));
|
XMEMSET(enc, 0, sizeof(enc));
|
||||||
cbcE = wc_AesCbcEncrypt(&aes, enc, vector, 0);
|
cbcE = wc_AesCbcEncrypt(&aes, enc, vector, 0);
|
||||||
@@ -15581,6 +15586,7 @@ static int test_wc_AesCbcEncryptDecrypt (void)
|
|||||||
for (i = 0; i < (int)sizeof(enc); i++)
|
for (i = 0; i < (int)sizeof(enc); i++)
|
||||||
cbcE |= enc[i];
|
cbcE |= enc[i];
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
printf(resultFmt, cbcE == 0 ? passed : failed);
|
printf(resultFmt, cbcE == 0 ? passed : failed);
|
||||||
if (cbcE != 0) {
|
if (cbcE != 0) {
|
||||||
|
Reference in New Issue
Block a user