Move internal headers to build.json

CMake doesn't use these, but a lot of our other build systems need it.

Bug: 542
Change-Id: I74388751b832921ac121abd3d5755880f352a449
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/67299
Reviewed-by: Bob Beck <bbe@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
diff --git a/build.json b/build.json
index 5791d9d..2808cf1 100644
--- a/build.json
+++ b/build.json
@@ -392,6 +392,74 @@
             "include/openssl/x509v3.h",
             "include/openssl/x509v3_errors.h"
         ],
+        "internal_hdrs": [
+            "crypto/asn1/internal.h",
+            "crypto/bio/internal.h",
+            "crypto/bytestring/internal.h",
+            "crypto/chacha/internal.h",
+            "crypto/cipher_extra/internal.h",
+            "crypto/conf/conf_def.h",
+            "crypto/conf/internal.h",
+            "crypto/cpu_arm_linux.h",
+            "crypto/curve25519/curve25519_tables.h",
+            "crypto/curve25519/internal.h",
+            "crypto/des/internal.h",
+            "crypto/dsa/internal.h",
+            "crypto/ec_extra/internal.h",
+            "crypto/err/internal.h",
+            "crypto/evp/internal.h",
+            "crypto/fipsmodule/aes/internal.h",
+            "crypto/fipsmodule/bn/internal.h",
+            "crypto/fipsmodule/bn/rsaz_exp.h",
+            "crypto/fipsmodule/cipher/internal.h",
+            "crypto/fipsmodule/delocate.h",
+            "crypto/fipsmodule/dh/internal.h",
+            "crypto/fipsmodule/digest/internal.h",
+            "crypto/fipsmodule/digest/md32_common.h",
+            "crypto/fipsmodule/ec/builtin_curves.h",
+            "crypto/fipsmodule/ec/internal.h",
+            "crypto/fipsmodule/ec/p256-nistz-table.h",
+            "crypto/fipsmodule/ec/p256-nistz.h",
+            "crypto/fipsmodule/ec/p256_table.h",
+            "crypto/fipsmodule/ecdsa/internal.h",
+            "crypto/fipsmodule/md5/internal.h",
+            "crypto/fipsmodule/modes/internal.h",
+            "crypto/fipsmodule/rand/fork_detect.h",
+            "crypto/fipsmodule/rand/getrandom_fillin.h",
+            "crypto/fipsmodule/rand/internal.h",
+            "crypto/fipsmodule/rsa/internal.h",
+            "crypto/fipsmodule/service_indicator/internal.h",
+            "crypto/fipsmodule/sha/internal.h",
+            "crypto/fipsmodule/tls/internal.h",
+            "crypto/hrss/internal.h",
+            "crypto/internal.h",
+            "crypto/keccak/internal.h",
+            "crypto/kyber/internal.h",
+            "crypto/lhash/internal.h",
+            "crypto/obj/obj_dat.h",
+            "crypto/pkcs7/internal.h",
+            "crypto/pkcs8/internal.h",
+            "crypto/poly1305/internal.h",
+            "crypto/pool/internal.h",
+            "crypto/rsa_extra/internal.h",
+            "crypto/spx/address.h",
+            "crypto/spx/fors.h",
+            "crypto/spx/merkle.h",
+            "crypto/spx/params.h",
+            "crypto/spx/spx_util.h",
+            "crypto/spx/thash.h",
+            "crypto/spx/wots.h",
+            "crypto/trust_token/internal.h",
+            "crypto/x509/ext_dat.h",
+            "crypto/x509/internal.h",
+            "third_party/fiat/curve25519_32.h",
+            "third_party/fiat/curve25519_64.h",
+            "third_party/fiat/curve25519_64_adx.h",
+            "third_party/fiat/curve25519_64_msvc.h",
+            "third_party/fiat/p256_32.h",
+            "third_party/fiat/p256_64.h",
+            "third_party/fiat/p256_64_msvc.h"
+        ],
         "err_data": [
             "crypto/err/*.errordata"
         ],
@@ -460,6 +528,52 @@
         "hdrs": [
             "include/openssl/pki/certificate.h",
             "include/openssl/pki/signature_verify_cache.h"
+        ],
+        "internal_hdrs": [
+            "pki/cert_error_id.h",
+            "pki/cert_error_params.h",
+            "pki/cert_errors.h",
+            "pki/cert_issuer_source.h",
+            "pki/cert_issuer_source_static.h",
+            // TODO(crbug.com/boringssl/542): This should be in pki_tests.
+            "pki/cert_issuer_source_sync_unittest.h",
+            "pki/certificate_policies.h",
+            "pki/common_cert_errors.h",
+            "pki/crl.h",
+            "pki/encode_values.h",
+            "pki/extended_key_usage.h",
+            "pki/general_names.h",
+            "pki/input.h",
+            "pki/ip_util.h",
+            "pki/mock_signature_verify_cache.h",
+            "pki/name_constraints.h",
+            "pki/nist_pkits_unittest.h",
+            "pki/ocsp.h",
+            "pki/ocsp_revocation_status.h",
+            "pki/ocsp_verify_result.h",
+            "pki/parse_certificate.h",
+            "pki/parse_name.h",
+            "pki/parse_values.h",
+            "pki/parsed_certificate.h",
+            "pki/parser.h",
+            "pki/path_builder.h",
+            "pki/pem.h",
+            "pki/revocation_util.h",
+            "pki/signature_algorithm.h",
+            "pki/simple_path_builder_delegate.h",
+            "pki/string_util.h",
+            // TODO(crbug.com/boringssl/542): This should be in pki_tests.
+            "pki/test_helpers.h",
+            // TODO(crbug.com/boringssl/542): This should be in pki_tests.
+            "pki/testdata/nist-pkits/pkits_testcases-inl.h",
+            "pki/trust_store.h",
+            "pki/trust_store_collection.h",
+            "pki/trust_store_in_memory.h",
+            "pki/verify_certificate_chain.h",
+            // TODO(crbug.com/boringssl/542): This should be in pki_tests.
+            "pki/verify_certificate_chain_typed_unittest.h",
+            "pki/verify_name_match.h",
+            "pki/verify_signed_data.h"
         ]
     },
     "ssl": {
@@ -509,6 +623,9 @@
             "include/openssl/ssl.h",
             "include/openssl/ssl3.h",
             "include/openssl/tls1.h"
+        ],
+        "internal_hdrs": [
+            "ssl/internal.h"
         ]
     },
     "decrepit": {
@@ -542,6 +659,27 @@
             "crypto/test/test_util.cc",
             "crypto/test/wycheproof_util.cc"
         ],
+        "internal_hdrs": [
+            "crypto/test/abi_test.h",
+            "crypto/test/file_test.h",
+            "crypto/test/file_util.h",
+            "crypto/test/gtest_main.h",
+            "crypto/test/test_data.h",
+            "crypto/test/test_util.h",
+            "crypto/test/wycheproof_util.h",
+            // TODO(crbug.com/boringssl/542): It's a bit odd that these are in
+            // test_support. Most of it is part of bssl_shim, except that the
+            // fuzzers use some of these headers.
+            "ssl/test/async_bio.h",
+            "ssl/test/fuzzer.h",
+            "ssl/test/fuzzer_tags.h",
+            "ssl/test/handshake_util.h",
+            "ssl/test/mock_quic_transport.h",
+            "ssl/test/packeted_bio.h",
+            "ssl/test/settings_writer.h",
+            "ssl/test/test_config.h",
+            "ssl/test/test_state.h"
+        ],
         "perlasm_aarch64": [
             {"src": "crypto/test/asm/trampoline-armv8.pl"}
         ],
@@ -761,6 +899,10 @@
             "tool/speed.cc",
             "tool/tool.cc",
             "tool/transport_common.cc"
+        ],
+        "internal_hdrs": [
+            "tool/internal.h",
+            "tool/transport_common.h"
         ]
     }
 }
diff --git a/gen/sources.cmake b/gen/sources.cmake
index fbc0255..2de79b5 100644
--- a/gen/sources.cmake
+++ b/gen/sources.cmake
@@ -176,6 +176,13 @@
 )
 
 set(
+  BSSL_INTERNAL_HEADERS
+
+  tool/internal.h
+  tool/transport_common.h
+)
+
+set(
   CRYPTO_SOURCES
 
   crypto/asn1/a_bitstr.c
@@ -503,6 +510,77 @@
 )
 
 set(
+  CRYPTO_INTERNAL_HEADERS
+
+  crypto/asn1/internal.h
+  crypto/bio/internal.h
+  crypto/bytestring/internal.h
+  crypto/chacha/internal.h
+  crypto/cipher_extra/internal.h
+  crypto/conf/conf_def.h
+  crypto/conf/internal.h
+  crypto/cpu_arm_linux.h
+  crypto/curve25519/curve25519_tables.h
+  crypto/curve25519/internal.h
+  crypto/des/internal.h
+  crypto/dsa/internal.h
+  crypto/ec_extra/internal.h
+  crypto/err/internal.h
+  crypto/evp/internal.h
+  crypto/fipsmodule/aes/internal.h
+  crypto/fipsmodule/bn/internal.h
+  crypto/fipsmodule/bn/rsaz_exp.h
+  crypto/fipsmodule/cipher/internal.h
+  crypto/fipsmodule/delocate.h
+  crypto/fipsmodule/dh/internal.h
+  crypto/fipsmodule/digest/internal.h
+  crypto/fipsmodule/digest/md32_common.h
+  crypto/fipsmodule/ec/builtin_curves.h
+  crypto/fipsmodule/ec/internal.h
+  crypto/fipsmodule/ec/p256-nistz-table.h
+  crypto/fipsmodule/ec/p256-nistz.h
+  crypto/fipsmodule/ec/p256_table.h
+  crypto/fipsmodule/ecdsa/internal.h
+  crypto/fipsmodule/md5/internal.h
+  crypto/fipsmodule/modes/internal.h
+  crypto/fipsmodule/rand/fork_detect.h
+  crypto/fipsmodule/rand/getrandom_fillin.h
+  crypto/fipsmodule/rand/internal.h
+  crypto/fipsmodule/rsa/internal.h
+  crypto/fipsmodule/service_indicator/internal.h
+  crypto/fipsmodule/sha/internal.h
+  crypto/fipsmodule/tls/internal.h
+  crypto/hrss/internal.h
+  crypto/internal.h
+  crypto/keccak/internal.h
+  crypto/kyber/internal.h
+  crypto/lhash/internal.h
+  crypto/obj/obj_dat.h
+  crypto/pkcs7/internal.h
+  crypto/pkcs8/internal.h
+  crypto/poly1305/internal.h
+  crypto/pool/internal.h
+  crypto/rsa_extra/internal.h
+  crypto/spx/address.h
+  crypto/spx/fors.h
+  crypto/spx/merkle.h
+  crypto/spx/params.h
+  crypto/spx/spx_util.h
+  crypto/spx/thash.h
+  crypto/spx/wots.h
+  crypto/trust_token/internal.h
+  crypto/x509/ext_dat.h
+  crypto/x509/internal.h
+  third_party/fiat/curve25519_32.h
+  third_party/fiat/curve25519_64.h
+  third_party/fiat/curve25519_64_adx.h
+  third_party/fiat/curve25519_64_msvc.h
+  third_party/fiat/p256_32.h
+  third_party/fiat/p256_64.h
+  third_party/fiat/p256_64_msvc.h
+)
+
+set(
   CRYPTO_SOURCES_ASM
 
   crypto/curve25519/asm/x25519-asm-arm.S
@@ -937,6 +1015,51 @@
 )
 
 set(
+  PKI_INTERNAL_HEADERS
+
+  pki/cert_error_id.h
+  pki/cert_error_params.h
+  pki/cert_errors.h
+  pki/cert_issuer_source.h
+  pki/cert_issuer_source_static.h
+  pki/cert_issuer_source_sync_unittest.h
+  pki/certificate_policies.h
+  pki/common_cert_errors.h
+  pki/crl.h
+  pki/encode_values.h
+  pki/extended_key_usage.h
+  pki/general_names.h
+  pki/input.h
+  pki/ip_util.h
+  pki/mock_signature_verify_cache.h
+  pki/name_constraints.h
+  pki/nist_pkits_unittest.h
+  pki/ocsp.h
+  pki/ocsp_revocation_status.h
+  pki/ocsp_verify_result.h
+  pki/parse_certificate.h
+  pki/parse_name.h
+  pki/parse_values.h
+  pki/parsed_certificate.h
+  pki/parser.h
+  pki/path_builder.h
+  pki/pem.h
+  pki/revocation_util.h
+  pki/signature_algorithm.h
+  pki/simple_path_builder_delegate.h
+  pki/string_util.h
+  pki/test_helpers.h
+  pki/testdata/nist-pkits/pkits_testcases-inl.h
+  pki/trust_store.h
+  pki/trust_store_collection.h
+  pki/trust_store_in_memory.h
+  pki/verify_certificate_chain.h
+  pki/verify_certificate_chain_typed_unittest.h
+  pki/verify_name_match.h
+  pki/verify_signed_data.h
+)
+
+set(
   PKI_TEST_SOURCES
 
   crypto/test/gtest_main.cc
@@ -2430,6 +2553,12 @@
 )
 
 set(
+  SSL_INTERNAL_HEADERS
+
+  ssl/internal.h
+)
+
+set(
   SSL_TEST_SOURCES
 
   crypto/test/gtest_main.cc
@@ -2451,6 +2580,27 @@
 )
 
 set(
+  TEST_SUPPORT_INTERNAL_HEADERS
+
+  crypto/test/abi_test.h
+  crypto/test/file_test.h
+  crypto/test/file_util.h
+  crypto/test/gtest_main.h
+  crypto/test/test_data.h
+  crypto/test/test_util.h
+  crypto/test/wycheproof_util.h
+  ssl/test/async_bio.h
+  ssl/test/fuzzer.h
+  ssl/test/fuzzer_tags.h
+  ssl/test/handshake_util.h
+  ssl/test/mock_quic_transport.h
+  ssl/test/packeted_bio.h
+  ssl/test/settings_writer.h
+  ssl/test/test_config.h
+  ssl/test/test_state.h
+)
+
+set(
   TEST_SUPPORT_SOURCES_ASM
 
   gen/test_support/trampoline-armv4-linux.S
diff --git a/gen/sources.json b/gen/sources.json
index 9dde1b5..f3dd301 100644
--- a/gen/sources.json
+++ b/gen/sources.json
@@ -150,6 +150,10 @@
       "tool/speed.cc",
       "tool/tool.cc",
       "tool/transport_common.cc"
+    ],
+    "internal_hdrs": [
+      "tool/internal.h",
+      "tool/transport_common.h"
     ]
   },
   "crypto": {
@@ -474,6 +478,74 @@
       "include/openssl/x509v3.h",
       "include/openssl/x509v3_errors.h"
     ],
+    "internal_hdrs": [
+      "crypto/asn1/internal.h",
+      "crypto/bio/internal.h",
+      "crypto/bytestring/internal.h",
+      "crypto/chacha/internal.h",
+      "crypto/cipher_extra/internal.h",
+      "crypto/conf/conf_def.h",
+      "crypto/conf/internal.h",
+      "crypto/cpu_arm_linux.h",
+      "crypto/curve25519/curve25519_tables.h",
+      "crypto/curve25519/internal.h",
+      "crypto/des/internal.h",
+      "crypto/dsa/internal.h",
+      "crypto/ec_extra/internal.h",
+      "crypto/err/internal.h",
+      "crypto/evp/internal.h",
+      "crypto/fipsmodule/aes/internal.h",
+      "crypto/fipsmodule/bn/internal.h",
+      "crypto/fipsmodule/bn/rsaz_exp.h",
+      "crypto/fipsmodule/cipher/internal.h",
+      "crypto/fipsmodule/delocate.h",
+      "crypto/fipsmodule/dh/internal.h",
+      "crypto/fipsmodule/digest/internal.h",
+      "crypto/fipsmodule/digest/md32_common.h",
+      "crypto/fipsmodule/ec/builtin_curves.h",
+      "crypto/fipsmodule/ec/internal.h",
+      "crypto/fipsmodule/ec/p256-nistz-table.h",
+      "crypto/fipsmodule/ec/p256-nistz.h",
+      "crypto/fipsmodule/ec/p256_table.h",
+      "crypto/fipsmodule/ecdsa/internal.h",
+      "crypto/fipsmodule/md5/internal.h",
+      "crypto/fipsmodule/modes/internal.h",
+      "crypto/fipsmodule/rand/fork_detect.h",
+      "crypto/fipsmodule/rand/getrandom_fillin.h",
+      "crypto/fipsmodule/rand/internal.h",
+      "crypto/fipsmodule/rsa/internal.h",
+      "crypto/fipsmodule/service_indicator/internal.h",
+      "crypto/fipsmodule/sha/internal.h",
+      "crypto/fipsmodule/tls/internal.h",
+      "crypto/hrss/internal.h",
+      "crypto/internal.h",
+      "crypto/keccak/internal.h",
+      "crypto/kyber/internal.h",
+      "crypto/lhash/internal.h",
+      "crypto/obj/obj_dat.h",
+      "crypto/pkcs7/internal.h",
+      "crypto/pkcs8/internal.h",
+      "crypto/poly1305/internal.h",
+      "crypto/pool/internal.h",
+      "crypto/rsa_extra/internal.h",
+      "crypto/spx/address.h",
+      "crypto/spx/fors.h",
+      "crypto/spx/merkle.h",
+      "crypto/spx/params.h",
+      "crypto/spx/spx_util.h",
+      "crypto/spx/thash.h",
+      "crypto/spx/wots.h",
+      "crypto/trust_token/internal.h",
+      "crypto/x509/ext_dat.h",
+      "crypto/x509/internal.h",
+      "third_party/fiat/curve25519_32.h",
+      "third_party/fiat/curve25519_64.h",
+      "third_party/fiat/curve25519_64_adx.h",
+      "third_party/fiat/curve25519_64_msvc.h",
+      "third_party/fiat/p256_32.h",
+      "third_party/fiat/p256_64.h",
+      "third_party/fiat/p256_64_msvc.h"
+    ],
     "asm": [
       "crypto/curve25519/asm/x25519-asm-arm.S",
       "crypto/hrss/asm/poly_rq_mul.S",
@@ -891,6 +963,48 @@
     "hdrs": [
       "include/openssl/pki/certificate.h",
       "include/openssl/pki/signature_verify_cache.h"
+    ],
+    "internal_hdrs": [
+      "pki/cert_error_id.h",
+      "pki/cert_error_params.h",
+      "pki/cert_errors.h",
+      "pki/cert_issuer_source.h",
+      "pki/cert_issuer_source_static.h",
+      "pki/cert_issuer_source_sync_unittest.h",
+      "pki/certificate_policies.h",
+      "pki/common_cert_errors.h",
+      "pki/crl.h",
+      "pki/encode_values.h",
+      "pki/extended_key_usage.h",
+      "pki/general_names.h",
+      "pki/input.h",
+      "pki/ip_util.h",
+      "pki/mock_signature_verify_cache.h",
+      "pki/name_constraints.h",
+      "pki/nist_pkits_unittest.h",
+      "pki/ocsp.h",
+      "pki/ocsp_revocation_status.h",
+      "pki/ocsp_verify_result.h",
+      "pki/parse_certificate.h",
+      "pki/parse_name.h",
+      "pki/parse_values.h",
+      "pki/parsed_certificate.h",
+      "pki/parser.h",
+      "pki/path_builder.h",
+      "pki/pem.h",
+      "pki/revocation_util.h",
+      "pki/signature_algorithm.h",
+      "pki/simple_path_builder_delegate.h",
+      "pki/string_util.h",
+      "pki/test_helpers.h",
+      "pki/testdata/nist-pkits/pkits_testcases-inl.h",
+      "pki/trust_store.h",
+      "pki/trust_store_collection.h",
+      "pki/trust_store_in_memory.h",
+      "pki/verify_certificate_chain.h",
+      "pki/verify_certificate_chain_typed_unittest.h",
+      "pki/verify_name_match.h",
+      "pki/verify_signed_data.h"
     ]
   },
   "pki_test": {
@@ -2376,6 +2490,9 @@
       "include/openssl/ssl.h",
       "include/openssl/ssl3.h",
       "include/openssl/tls1.h"
+    ],
+    "internal_hdrs": [
+      "ssl/internal.h"
     ]
   },
   "ssl_test": {
@@ -2396,6 +2513,24 @@
       "crypto/test/test_util.cc",
       "crypto/test/wycheproof_util.cc"
     ],
+    "internal_hdrs": [
+      "crypto/test/abi_test.h",
+      "crypto/test/file_test.h",
+      "crypto/test/file_util.h",
+      "crypto/test/gtest_main.h",
+      "crypto/test/test_data.h",
+      "crypto/test/test_util.h",
+      "crypto/test/wycheproof_util.h",
+      "ssl/test/async_bio.h",
+      "ssl/test/fuzzer.h",
+      "ssl/test/fuzzer_tags.h",
+      "ssl/test/handshake_util.h",
+      "ssl/test/mock_quic_transport.h",
+      "ssl/test/packeted_bio.h",
+      "ssl/test/settings_writer.h",
+      "ssl/test/test_config.h",
+      "ssl/test/test_state.h"
+    ],
     "asm": [
       "gen/test_support/trampoline-armv4-linux.S",
       "gen/test_support/trampoline-armv8-apple.S",
diff --git a/util/generate_build_files.py b/util/generate_build_files.py
index 943c2e1..264ae9d 100644
--- a/util/generate_build_files.py
+++ b/util/generate_build_files.py
@@ -629,22 +629,11 @@
     sources = json.load(f)
 
   fips_fragments = FindCFiles(os.path.join('src', 'crypto', 'fipsmodule'), OnlyFIPSFragments)
-  tool_h_files = FindHeaderFiles(os.path.join('src', 'tool'), AllFiles)
   bssl_sys_files = FindRustFiles(os.path.join('src', 'rust', 'bssl-sys', 'src'))
   bssl_crypto_files = FindRustFiles(os.path.join('src', 'rust', 'bssl-crypto', 'src'))
 
-  test_support_h_files = (
-      FindHeaderFiles(os.path.join('src', 'crypto', 'test'), AllFiles) +
-      FindHeaderFiles(os.path.join('src', 'ssl', 'test'), NoTestRunnerFiles))
-
   fuzz_c_files = FindCFiles(os.path.join('src', 'fuzz'), NoTests)
 
-  pki_internal_h_files = FindHeaderFiles(os.path.join('src', 'pki'), AllFiles)
-  ssl_internal_h_files = FindHeaderFiles(os.path.join('src', 'ssl'), NoTests)
-  crypto_internal_h_files = (
-      FindHeaderFiles(os.path.join('src', 'crypto'), NoTests) +
-      FindHeaderFiles(os.path.join('src', 'third_party', 'fiat'), NoTests))
-
   # TODO(crbug.com/boringssl/542): generate_build_files.py historically reported
   # all the assembly files as part of libcrypto. Merge them for now, but we
   # should split them out later.
@@ -660,26 +649,28 @@
       'crypto_asm': PrefixWithSrc(crypto_asm),
       'crypto_nasm': PrefixWithSrc(crypto_nasm),
       'crypto_headers': PrefixWithSrc(sources['crypto']['hdrs']),
-      'crypto_internal_headers': crypto_internal_h_files,
+      'crypto_internal_headers':
+          PrefixWithSrc(sources['crypto']['internal_hdrs']),
       'crypto_test': PrefixWithSrc(sources['crypto_test']['srcs']),
       'crypto_test_data': PrefixWithSrc(sources['crypto_test']['data']),
       'fips_fragments': fips_fragments,
       'fuzz': fuzz_c_files,
       'pki': PrefixWithSrc(sources['pki']['srcs']),
       'pki_headers': PrefixWithSrc(sources['pki']['hdrs']),
-      'pki_internal_headers': sorted(list(pki_internal_h_files)),
+      'pki_internal_headers': PrefixWithSrc(sources['pki']['internal_hdrs']),
       'pki_test': PrefixWithSrc(sources['pki_test']['srcs']),
       'pki_test_data': PrefixWithSrc(sources['pki_test']['data']),
       'rust_bssl_crypto': bssl_crypto_files,
       'rust_bssl_sys': bssl_sys_files,
       'ssl': PrefixWithSrc(sources['ssl']['srcs']),
       'ssl_headers': PrefixWithSrc(sources['ssl']['hdrs']),
-      'ssl_internal_headers': ssl_internal_h_files,
+      'ssl_internal_headers': PrefixWithSrc(sources['ssl']['internal_hdrs']),
       'ssl_test': PrefixWithSrc(sources['ssl_test']['srcs']),
       'tool': PrefixWithSrc(sources['bssl']['srcs']),
-      'tool_headers': tool_h_files,
+      'tool_headers': PrefixWithSrc(sources['bssl']['internal_hdrs']),
       'test_support': PrefixWithSrc(sources['test_support']['srcs']),
-      'test_support_headers': test_support_h_files,
+      'test_support_headers':
+          PrefixWithSrc(sources['test_support']['internal_hdrs']),
       'urandom_test': PrefixWithSrc(sources['urandom_test']['srcs']),
   }