mirror of
https://github.com/falcosecurity/falco.git
synced 2025-08-20 23:33:22 +00:00
build(userspace): avoid openssl dep for engine fields verification
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
This commit is contained in:
parent
68f937f5e8
commit
b7e75095e6
@ -154,7 +154,7 @@ configure_file(config_falco.h.in config_falco.h)
|
|||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
TARGET falco
|
TARGET falco
|
||||||
COMMAND bash ${CMAKE_CURRENT_SOURCE_DIR}/verify_engine_fields.sh ${CMAKE_SOURCE_DIR} ${OPENSSL_BINARY}
|
COMMAND bash ${CMAKE_CURRENT_SOURCE_DIR}/verify_engine_fields.sh ${CMAKE_SOURCE_DIR}
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
COMMENT "Comparing engine fields checksum in falco_engine.h to actual fields")
|
COMMENT "Comparing engine fields checksum in falco_engine.h to actual fields")
|
||||||
|
|
||||||
|
@ -3,14 +3,8 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
SOURCE_DIR=$1
|
SOURCE_DIR=$1
|
||||||
OPENSSL=$2
|
|
||||||
|
|
||||||
if ! command -v "${OPENSSL}" version > /dev/null 2>&1; then
|
NEW_CHECKSUM=$(./falco --list -N | sha256sum | awk '{print $1}')
|
||||||
echo "No openssl command at ${OPENSSL}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
NEW_CHECKSUM=$(./falco --list -N | ${OPENSSL} dgst -sha256 | awk '{print $2}')
|
|
||||||
CUR_CHECKSUM=$(grep FALCO_FIELDS_CHECKSUM "${SOURCE_DIR}/userspace/engine/falco_engine_version.h" | awk '{print $3}' | sed -e 's/"//g')
|
CUR_CHECKSUM=$(grep FALCO_FIELDS_CHECKSUM "${SOURCE_DIR}/userspace/engine/falco_engine_version.h" | awk '{print $3}' | sed -e 's/"//g')
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user