tests: Comment out TLS PRF test from CONFIG_FIPS=y build
authorJouni Malinen <j@w1.fi>
Sat, 1 Aug 2015 12:51:44 +0000 (15:51 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 1 Aug 2015 12:51:44 +0000 (15:51 +0300)
This fixes CONFIG_FIPS=y build that may not include tls_prf_sha1_md5().

Signed-off-by: Jouni Malinen <j@w1.fi>
src/crypto/crypto_module_tests.c

index 1d613c9..ad355f8 100644 (file)
@@ -842,6 +842,7 @@ static int test_eap_fast(void)
                0x38, 0x4B, 0x7A, 0x85, 0xBE, 0x16, 0x4D, 0x27,
                0x33, 0xD5, 0x24, 0x79, 0x87, 0xB1, 0xC5, 0xA2
        };
+#ifndef CONFIG_FIPS
        const u8 key_block[] = {
                0x59, 0x59, 0xBE, 0x8E, 0x41, 0x3A, 0x77, 0x74,
                0x8B, 0xB2, 0xE5, 0xD3, 0x60, 0xAC, 0x4D, 0x35,
@@ -858,6 +859,7 @@ static int test_eap_fast(void)
                0x64, 0xC1, 0xC8, 0x0C, 0x96, 0x44, 0x09, 0x98,
                0xFF, 0x92, 0xA8, 0xB4, 0xC6, 0x42, 0x28, 0x71
        };
+#endif /* CONFIG_FIPS */
        const u8 sks[] = {
                0xD6, 0x4B, 0x7D, 0x72, 0x17, 0x59, 0x28, 0x05,
                0xAF, 0xF9, 0xB7, 0xFF, 0x66, 0x6D, 0xA1, 0x96,
@@ -932,6 +934,7 @@ static int test_eap_fast(void)
                errors++;
        }
 
+#ifndef CONFIG_FIPS
        wpa_printf(MSG_INFO, "- PRF (TLS, SHA1/MD5) test case / key_block");
        if (tls_prf_sha1_md5(master_secret, sizeof(master_secret),
                             "key expansion", seed, sizeof(seed),
@@ -940,6 +943,7 @@ static int test_eap_fast(void)
                wpa_printf(MSG_INFO, "PRF test - FAILED!");
                errors++;
        }
+#endif /* CONFIG_FIPS */
 
        wpa_printf(MSG_INFO, "- T-PRF (SHA1) test case / IMCK");
        if (sha1_t_prf(sks, sizeof(sks), "Inner Methods Compound Keys",