Merge pull request #2276 from kaleb-himes/BOTH_FIPS_VERSION_TESTING

Adjustment to test.c for merge of WCv4.0.1 changes
This commit is contained in:
John Safranek 2019-06-11 13:21:42 -07:00 committed by GitHub
commit 01ad44feef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5457,10 +5457,17 @@ static int aes_key_size_test(void)
word32 keySize;
#endif
#if !defined(HAVE_FIPS) || \
defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION >= 2)
/* w/ FIPS v1 (cert 2425) wc_AesInit just returns 0 always as it's not
* supported with that FIPS version */
ret = wc_AesInit(NULL, HEAP_HINT, devId);
if (ret != BAD_FUNC_ARG)
return -4800;
#endif
ret = wc_AesInit(&aes, HEAP_HINT, devId);
/* 0 check OK for FIPSv1 */
if (ret != 0)
return -4801;