Commit 44688562 authored by Ghislain MARY's avatar Ghislain MARY

Do not touch to config.h file during CMake configuration.

parent ec8c1062
......@@ -31,30 +31,30 @@ set(NULL_ENTROPY_WARNING "${WARNING_BORDER}"
"${NULL_ENTROPY_WARN_L3}"
"${WARNING_BORDER}")
find_package(Perl)
if(PERL_FOUND)
# If NULL Entropy is configured, display an appropriate warning
execute_process(COMMAND ${PERL_EXECUTABLE} ${CMAKE_SOURCE_DIR}/scripts/config.pl -f ${CMAKE_SOURCE_DIR}/include/mbedtls/config.h get MBEDTLS_TEST_NULL_ENTROPY
RESULT_VARIABLE result)
if(${result} EQUAL 0)
message(WARNING ${NULL_ENTROPY_WARNING})
if(NOT UNSAFE_BUILD)
message(FATAL_ERROR "\
\n\
Warning! You have enabled MBEDTLS_TEST_NULL_ENTROPY. \
This option is not safe for production use and negates all security \
It is intended for development use only. \
\n\
To confirm you want to build with this option, re-run cmake with the \
option: \n\
cmake -DUNSAFE_BUILD=ON ")
return()
endif()
endif()
endif()
# find_package(Perl)
# if(PERL_FOUND)
#
# # If NULL Entropy is configured, display an appropriate warning
# execute_process(COMMAND ${PERL_EXECUTABLE} ${CMAKE_SOURCE_DIR}/scripts/config.pl -f ${CMAKE_SOURCE_DIR}/include/mbedtls/config.h get MBEDTLS_TEST_NULL_ENTROPY
# RESULT_VARIABLE result)
# if(${result} EQUAL 0)
# message(WARNING ${NULL_ENTROPY_WARNING})
#
# if(NOT UNSAFE_BUILD)
# message(FATAL_ERROR "\
# \n\
# Warning! You have enabled MBEDTLS_TEST_NULL_ENTROPY. \
# This option is not safe for production use and negates all security \
# It is intended for development use only. \
# \n\
# To confirm you want to build with this option, re-run cmake with the \
# option: \n\
# cmake -DUNSAFE_BUILD=ON ")
#
# return()
# endif()
# endif()
# endif()
set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE}
CACHE STRING "Choose the type of build: None Debug Release Coverage ASan ASanDbg MemSan MemSanDbg Check CheckFull"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment