Skip to content

Commit

Permalink
core: Add utilities for generating SHA256 hashes. (#491)
Browse files Browse the repository at this point in the history
Co-authored-by: wraymo <[email protected]>
Co-authored-by: Lin Zhihao <[email protected]>
Co-authored-by: kirkrodrigues <[email protected]>
  • Loading branch information
4 people authored Jul 31, 2024
1 parent b37bcd5 commit a6a2185
Show file tree
Hide file tree
Showing 6 changed files with 365 additions and 536 deletions.
2 changes: 1 addition & 1 deletion components/core/.clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ IncludeCategories:
# Library headers. Update when adding new libraries.
# NOTE: clang-format retains leading white-space on a line in violation of the YAML spec.
- Regex: "<(absl|antlr4|archive|boost|bsoncxx|catch2|curl|date|fmt|json|log_surgeon|mariadb\
|mongocxx|msgpack|outcome|regex_utils|simdjson|spdlog|sqlite3|string_utils|yaml-cpp|zstd)"
|mongocxx|msgpack|openssl|outcome|regex_utils|simdjson|spdlog|sqlite3|string_utils|yaml-cpp|zstd)"
Priority: 3
# C system headers
- Regex: "^<.+\\.h>"
Expand Down
14 changes: 13 additions & 1 deletion components/core/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5.1)
cmake_minimum_required(VERSION 3.16.3)
project(CLP LANGUAGES CXX C)

if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
Expand Down Expand Up @@ -146,6 +146,14 @@ else()
message(FATAL_ERROR "Could not find ${CLP_LIBS_STRING} libraries for CURL")
endif()

# Find OpenSSL
find_package(OpenSSL REQUIRED)
if (OPENSSL_FOUND)
message(STATUS "Found OpenSSL (${OPENSSL_VERSION})")
else ()
message(FATAL_ERROR "OpenSSL not found")
endif ()

# Add log surgeon
add_subdirectory(submodules/log-surgeon EXCLUDE_FROM_ALL)

Expand Down Expand Up @@ -346,6 +354,8 @@ set(SOURCE_FILES_unitTest
src/clp/GlobalSQLiteMetadataDB.hpp
src/clp/Grep.cpp
src/clp/Grep.hpp
src/clp/hash_utils.cpp
src/clp/hash_utils.hpp
src/clp/ir/constants.hpp
src/clp/ir/EncodedTextAst.hpp
src/clp/ir/LogEvent.hpp
Expand Down Expand Up @@ -465,6 +475,7 @@ set(SOURCE_FILES_unitTest
tests/test-encoding_methods.cpp
tests/test-ffi_SchemaTree.cpp
tests/test-Grep.cpp
tests/test-hash_utils.cpp
tests/test-ir_encoding_methods.cpp
tests/test-ir_parsing.cpp
tests/test-kql.cpp
Expand Down Expand Up @@ -500,6 +511,7 @@ target_link_libraries(unitTest
LibArchive::LibArchive
MariaDBClient::MariaDBClient
spdlog::spdlog
OpenSSL::Crypto
${sqlite_LIBRARY_DEPENDENCIES}
${STD_FS_LIBS}
clp::regex_utils
Expand Down
Loading

0 comments on commit a6a2185

Please sign in to comment.