exclude new AES-GCM test when in FIPS mode

This commit is contained in:
John Safranek
2015-11-03 16:57:38 -08:00
parent 23ba31cbdd
commit 3b102862b1

View File

@@ -2780,6 +2780,7 @@ int aesgcm_test(void)
0xcd, 0xdf, 0x88, 0x53, 0xbb, 0x2d, 0x55, 0x1b 0xcd, 0xdf, 0x88, 0x53, 0xbb, 0x2d, 0x55, 0x1b
}; };
#ifndef HAVE_FIPS
/* Test Case 12, uses same plaintext and AAD data. */ /* Test Case 12, uses same plaintext and AAD data. */
const byte k2[] = const byte k2[] =
{ {
@@ -2817,6 +2818,7 @@ int aesgcm_test(void)
0xdc, 0xf5, 0x66, 0xff, 0x29, 0x1c, 0x25, 0xbb, 0xdc, 0xf5, 0x66, 0xff, 0x29, 0x1c, 0x25, 0xbb,
0xb8, 0x56, 0x8f, 0xc3, 0xd3, 0x76, 0xa6, 0xd9 0xb8, 0x56, 0x8f, 0xc3, 0xd3, 0x76, 0xa6, 0xd9
}; };
#endif /* HAVE_FIPS */
byte resultT[sizeof(t1)]; byte resultT[sizeof(t1)];
byte resultP[sizeof(p)]; byte resultP[sizeof(p)];
@@ -2843,6 +2845,7 @@ int aesgcm_test(void)
if (memcmp(p, resultP, sizeof(resultP))) if (memcmp(p, resultP, sizeof(resultP)))
return -71; return -71;
#ifndef HAVE_FIPS
memset(resultT, 0, sizeof(resultT)); memset(resultT, 0, sizeof(resultT));
memset(resultC, 0, sizeof(resultC)); memset(resultC, 0, sizeof(resultC));
memset(resultP, 0, sizeof(resultP)); memset(resultP, 0, sizeof(resultP));
@@ -2862,6 +2865,7 @@ int aesgcm_test(void)
return -232; return -232;
if (memcmp(p, resultP, sizeof(resultP))) if (memcmp(p, resultP, sizeof(resultP)))
return -233; return -233;
#endif /* HAVE_FIPS */
return 0; return 0;
} }