Handle fips_shared_support.c getting built in other builds.
Other build systems will just take a list of the files, including fips_shared_support.c, so better to make it a no-op in the non-shared+FIPS case. Also add it to the other cases so that the CMake build better matches other builds in that respect. Change-Id: I1bea4f6b8266da32340a5fc0fed5fc3680f3b18f Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/36264 Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
@@ -193,6 +193,7 @@ if(FIPS_DELOCATE)
|
||||
|
||||
OBJECT
|
||||
|
||||
fips_shared_support.c
|
||||
is_fips.c
|
||||
)
|
||||
|
||||
@@ -209,8 +210,8 @@ elseif(FIPS_SHARED)
|
||||
|
||||
OBJECT
|
||||
|
||||
is_fips.c
|
||||
fips_shared_support.c
|
||||
is_fips.c
|
||||
)
|
||||
|
||||
add_dependencies(fipsmodule global_target)
|
||||
@@ -242,6 +243,7 @@ else()
|
||||
OBJECT
|
||||
|
||||
bcm.c
|
||||
fips_shared_support.c
|
||||
is_fips.c
|
||||
|
||||
${BCM_ASM_SOURCES}
|
||||
|
||||
@@ -15,10 +15,7 @@
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
#if !defined(BORINGSSL_FIPS) || !defined(BORINGSSL_SHARED_LIBRARY)
|
||||
#error "This file should only be built in a shared-object FIPS build"
|
||||
#endif
|
||||
|
||||
#if defined(BORINGSSL_FIPS) && defined(BORINGSSL_SHARED_LIBRARY)
|
||||
// BORINGSSL_bcm_text_hash is is default hash value for the FIPS integrity check
|
||||
// that must be replaced with the real value during the build process. This
|
||||
// value need only be distinct, i.e. so that we can safely search-and-replace it
|
||||
@@ -32,3 +29,4 @@ const uint8_t BORINGSSL_bcm_text_hash[64] = {
|
||||
0xd7, 0x25, 0xdb, 0x21, 0x98, 0xe9, 0xd5, 0x53, 0xbf, 0x5c, 0x32,
|
||||
0x06, 0x83, 0x34, 0x0c, 0x65, 0x89, 0x52, 0xbd, 0x1f,
|
||||
};
|
||||
#endif // FIPS && SHARED_LIBRARY
|
||||
|
||||
Reference in New Issue
Block a user