From 3b102862b16885cfac236c637388910e0dccdd56 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Tue, 3 Nov 2015 16:57:38 -0800 Subject: [PATCH] exclude new AES-GCM test when in FIPS mode --- wolfcrypt/test/test.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index e22ac3908..991a15639 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -2780,6 +2780,7 @@ int aesgcm_test(void) 0xcd, 0xdf, 0x88, 0x53, 0xbb, 0x2d, 0x55, 0x1b }; +#ifndef HAVE_FIPS /* Test Case 12, uses same plaintext and AAD data. */ const byte k2[] = { @@ -2817,6 +2818,7 @@ int aesgcm_test(void) 0xdc, 0xf5, 0x66, 0xff, 0x29, 0x1c, 0x25, 0xbb, 0xb8, 0x56, 0x8f, 0xc3, 0xd3, 0x76, 0xa6, 0xd9 }; +#endif /* HAVE_FIPS */ byte resultT[sizeof(t1)]; byte resultP[sizeof(p)]; @@ -2843,6 +2845,7 @@ int aesgcm_test(void) if (memcmp(p, resultP, sizeof(resultP))) return -71; +#ifndef HAVE_FIPS memset(resultT, 0, sizeof(resultT)); memset(resultC, 0, sizeof(resultC)); memset(resultP, 0, sizeof(resultP)); @@ -2862,6 +2865,7 @@ int aesgcm_test(void) return -232; if (memcmp(p, resultP, sizeof(resultP))) return -233; +#endif /* HAVE_FIPS */ return 0; }