summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Thierer <tobiast@google.com>2019-10-09 22:22:43 +0100
committerTobias Thierer <tobiast@google.com>2019-10-09 22:22:50 +0100
commit2b1e39e4167dea92a34e4346895c9d59453d8672 (patch)
treecd3c62a2875a05aaa0b82a75a7c11207c68b09c5
parent01e077a02e249d3daca78c662328fbf3eb556fa6 (diff)
downloadboringssl-ndk-sysroot-r21.tar.gz
external/boringssl: Sync to 4ca15d5dcbe6e8051a4654df7c971ea8307abfe0.ndk-sysroot-r21
This includes the following changes: https://boringssl.googlesource.com/boringssl/+log/56b6c714c9cae5963681ed9dd9f6cabf294e3f80..4ca15d5dcbe6e8051a4654df7c971ea8307abfe0 Test: Treehugger only - this is a trivial change from a single commit that shouldn't affect Android at all, it only affects boringssl's own builds. Change-Id: I2427fdca35ae3cb61298c1d0102b9bf191d0d068
-rw-r--r--BORINGSSL_REVISION2
-rw-r--r--src/crypto/CMakeLists.txt6
-rw-r--r--src/crypto/fipsmodule/CMakeLists.txt2
-rw-r--r--src/util/fipstools/acvp/modulewrapper/modulewrapper.cc2
4 files changed, 9 insertions, 3 deletions
diff --git a/BORINGSSL_REVISION b/BORINGSSL_REVISION
index b88723d9..6cd1e0e0 100644
--- a/BORINGSSL_REVISION
+++ b/BORINGSSL_REVISION
@@ -1 +1 @@
-56b6c714c9cae5963681ed9dd9f6cabf294e3f80
+4ca15d5dcbe6e8051a4654df7c971ea8307abfe0
diff --git a/src/crypto/CMakeLists.txt b/src/crypto/CMakeLists.txt
index 477faaeb..b874c621 100644
--- a/src/crypto/CMakeLists.txt
+++ b/src/crypto/CMakeLists.txt
@@ -424,13 +424,17 @@ add_library(
)
if(FIPS_SHARED)
+ set(EXTRA_INJECT_HASH_ARGS)
+ if(ANDROID)
+ set(EXTRA_INJECT_HASH_ARGS "-sha256")
+ endif()
# Rewrite libcrypto.so to inject the correct module hash value. This assumes
# UNIX-style library naming, but we only support FIPS mode on Linux anyway.
add_custom_command(
TARGET crypto POST_BUILD
COMMAND ${GO_EXECUTABLE} run
${CMAKE_CURRENT_SOURCE_DIR}/../util/fipstools/inject_hash/inject_hash.go
- -o libcrypto.so -in-object libcrypto.so
+ -o libcrypto.so -in-object libcrypto.so ${EXTRA_INJECT_HASH_ARGS}
# The DEPENDS argument to a POST_BUILD rule appears to be ignored. Thus
# go_executable isn't used (as it doesn't get built), but we list this
# dependency anyway in case it starts working in some CMake version.
diff --git a/src/crypto/fipsmodule/CMakeLists.txt b/src/crypto/fipsmodule/CMakeLists.txt
index dc8f1b14..3081a412 100644
--- a/src/crypto/fipsmodule/CMakeLists.txt
+++ b/src/crypto/fipsmodule/CMakeLists.txt
@@ -232,7 +232,7 @@ elseif(FIPS_SHARED)
add_custom_command(
OUTPUT bcm.o
- COMMAND ld -r -T ${CMAKE_CURRENT_SOURCE_DIR}/fips_shared.lds -o bcm.o --whole-archive $<TARGET_FILE:bcm_library>
+ COMMAND ${CMAKE_LINKER} -r -T ${CMAKE_CURRENT_SOURCE_DIR}/fips_shared.lds -o bcm.o --whole-archive $<TARGET_FILE:bcm_library>
DEPENDS bcm_library fips_shared.lds
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
diff --git a/src/util/fipstools/acvp/modulewrapper/modulewrapper.cc b/src/util/fipstools/acvp/modulewrapper/modulewrapper.cc
index f877c755..fd7639a4 100644
--- a/src/util/fipstools/acvp/modulewrapper/modulewrapper.cc
+++ b/src/util/fipstools/acvp/modulewrapper/modulewrapper.cc
@@ -12,9 +12,11 @@
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
+#include <string>
#include <vector>
#include <assert.h>
+#include <errno.h>
#include <string.h>
#include <sys/uio.h>
#include <unistd.h>