Don't call a non-test file *test.h.

fips_break_test.h is a bad name because generate_build_files.py thinks
that it's a test file, which it is, but one that's needed in the main
build. Thanks to Svilen Kanev for noting this.

That header doesn't particularly carry its weight. The idea was that
rebuilding the break test wouldn't need to rebuild everything if that
logic was isolated in its own header. But we only have to rebuild once
now, so whatever. There's already a block of crypto/internal.h with very
similar stuff; it can go there.

Change-Id: Ifb479eafd4df9a7aac4804cae06ba87257c77fc3
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/51485
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
diff --git a/crypto/fipsmodule/bcm.c b/crypto/fipsmodule/bcm.c
index 505510c..1219bc7 100644
--- a/crypto/fipsmodule/bcm.c
+++ b/crypto/fipsmodule/bcm.c
@@ -29,7 +29,6 @@
 #include <openssl/sha.h>
 
 #include "../internal.h"
-#include "fips_break_test.h"
 
 #include "aes/aes.c"
 #include "aes/aes_nohw.c"
diff --git a/crypto/fipsmodule/ec/ec_key.c b/crypto/fipsmodule/ec/ec_key.c
index 8e4fbbf..43d7391 100644
--- a/crypto/fipsmodule/ec/ec_key.c
+++ b/crypto/fipsmodule/ec/ec_key.c
@@ -79,7 +79,6 @@
 
 #include "internal.h"
 #include "../delocate.h"
-#include "../fips_break_test.h"
 #include "../../internal.h"
 
 
diff --git a/crypto/fipsmodule/fips_break_test.h b/crypto/fipsmodule/fips_break_test.h
deleted file mode 100644
index 7bf4437..0000000
--- a/crypto/fipsmodule/fips_break_test.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright (c) 2022, Google Inc.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
-
-#ifndef OPENSSL_HEADER_CRYPTO_FIPSMODULE_FIPS_BREAK_TEST_H
-#define OPENSSL_HEADER_CRYPTO_FIPSMODULE_FIPS_BREAK_TEST_H
-
-#include <openssl/base.h>
-
-#include <stdlib.h>
-#include <string.h>
-
-#if defined(BORINGSSL_FIPS_BREAK_TESTS)
-
-OPENSSL_INLINE int boringssl_fips_break_test(const char *test) {
-  const char *const value = getenv("BORINGSSL_FIPS_BREAK_TEST");
-  return value != NULL && strcmp(value, test) == 0;
-}
-
-#else
-
-OPENSSL_INLINE int boringssl_fips_break_test(const char *test) {
-  return 0;
-}
-
-#endif  // BORINGSSL_FIPS_BREAK_TESTS
-
-#endif  // OPENSSL_HEADER_CRYPTO_FIPSMODULE_FIPS_BREAK_TEST_H
diff --git a/crypto/fipsmodule/rand/rand.c b/crypto/fipsmodule/rand/rand.c
index 94e1fbf..357be39 100644
--- a/crypto/fipsmodule/rand/rand.c
+++ b/crypto/fipsmodule/rand/rand.c
@@ -30,7 +30,6 @@
 #include "fork_detect.h"
 #include "../../internal.h"
 #include "../delocate.h"
-#include "../fips_break_test.h"
 
 
 // It's assumed that the operating system always has an unfailing source of
diff --git a/crypto/fipsmodule/rsa/rsa.c b/crypto/fipsmodule/rsa/rsa.c
index 03acd27..733e7fa 100644
--- a/crypto/fipsmodule/rsa/rsa.c
+++ b/crypto/fipsmodule/rsa/rsa.c
@@ -72,7 +72,6 @@
 
 #include "../bn/internal.h"
 #include "../delocate.h"
-#include "../fips_break_test.h"
 #include "../../internal.h"
 #include "internal.h"
 
diff --git a/crypto/internal.h b/crypto/internal.h
index dac515c..a85a60d 100644
--- a/crypto/internal.h
+++ b/crypto/internal.h
@@ -121,6 +121,10 @@
 #include <valgrind/memcheck.h>
 #endif
 
+#if defined(BORINGSSL_FIPS_BREAK_TESTS)
+#include <stdlib.h>
+#endif
+
 #if !defined(__cplusplus)
 #if defined(_MSC_VER)
 #define alignas(x) __declspec(align(x))
@@ -971,6 +975,17 @@
 OPENSSL_INLINE void boringssl_fips_inc_counter(enum fips_counter_t counter) {}
 #endif
 
+#if defined(BORINGSSL_FIPS_BREAK_TESTS)
+OPENSSL_INLINE int boringssl_fips_break_test(const char *test) {
+  const char *const value = getenv("BORINGSSL_FIPS_BREAK_TEST");
+  return value != NULL && strcmp(value, test) == 0;
+}
+#else
+OPENSSL_INLINE int boringssl_fips_break_test(const char *test) {
+  return 0;
+}
+#endif  // BORINGSSL_FIPS_BREAK_TESTS
+
 
 // Runtime CPU feature support