Skip to content

Commit

Permalink
Changed the method to include the ECCLVL constant to be defined (whic…
Browse files Browse the repository at this point in the history
…h is dependent on cmake settings since it is used for the relic library too).
  • Loading branch information
Martin Kromm committed Aug 20, 2019
1 parent 3fe57d3 commit d084930
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,17 @@ add_library(ENCRYPTO_utils::encrypto_utils ALIAS encrypto_utils)

target_compile_features(encrypto_utils PUBLIC cxx_std_17)
target_compile_options(encrypto_utils PRIVATE "-Wall" "-Wextra")
#Maybe it is better to create a ecc-pk-crypti.h.in file, since the ecclvl is only needed there
target_compile_definitions(encrypto_utils PUBLIC ECCLVL=${ecclvl})

configure_file (
"${CMAKE_CURRENT_SOURCE_DIR}/ENCRYPTO_utils/cmake_constants.h.in"
"${PROJECT_BINARY_DIR}/include/cmake_constants.h"
)

target_include_directories(encrypto_utils
PUBLIC
$<INSTALL_INTERFACE:include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
)


Expand Down
2 changes: 2 additions & 0 deletions src/ENCRYPTO_utils/cmake_constants.h.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
//the security parameter for public crypto
#define ECCLVL @ecclvl@
1 change: 1 addition & 0 deletions src/ENCRYPTO_utils/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include "typedefs.h"
#include <cstdint>
#include <cmake_constants.h>

#define BATCH
//#define FIXED_KEY_AES_HASHING
Expand Down

0 comments on commit d084930

Please sign in to comment.