Commit 8f20e958 authored by jehan's avatar jehan

avoid downloading tmp certificate file into source directory to secure //...

avoid downloading tmp certificate file into source directory to secure // build, specially in case of multi arch.
parent d1a8d275
......@@ -60,7 +60,6 @@ daemon/linphone-daemon-pipetest
*.lo
*.deps
*.libs
share/certdata.txt
coreapi/test_numbers
specs.c
*.orig
......@@ -73,7 +72,6 @@ tools/test_ecc
tools/test_lsd
tools/test_numbers
coreapi/help/notify
share/fresh-rootca.pem
tester/liblinphone_tester
tools/lp-gen-wrappers
tools/lpc2xml_test
......
......@@ -33,7 +33,7 @@ if(ENABLE_ROOTCA_DOWNLOAD)
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/rootca.pem PROPERTIES GENERATED TRUE)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/rootca.pem
COMMAND ${CMAKE_COMMAND} -DHTTPS_CA_DIR=${HTTPS_CA_DIR} -DWORK_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DOUTPUT_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/rootca.cmake)
COMMAND ${CMAKE_COMMAND} -DHTTPS_CA_DIR=${HTTPS_CA_DIR} -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DOUTPUT_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/rootca.cmake)
add_custom_target(rootca ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/rootca.pem)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/rootca.pem
......
......@@ -29,12 +29,12 @@ execute_process(
WORKING_DIRECTORY ${OUTPUT_DIR}
)
execute_process(
COMMAND "../scripts/mk-ca-bundle.pl" "${OUTPUT_DIR}/fresh-rootca.pem"
WORKING_DIRECTORY ${WORK_DIR}
COMMAND "${SOURCE_DIR}/../scripts/mk-ca-bundle.pl" "-u" "fresh-rootca.pem"
WORKING_DIRECTORY ${OUTPUT_DIR}
)
if(EXISTS "${OUTPUT_DIR}/fresh-rootca.pem")
file(RENAME "${OUTPUT_DIR}/fresh-rootca.pem" "${OUTPUT_DIR}/rootca.pem")
else()
file(COPY "${WORK_DIR}/archived-rootca.pem" DESTINATION "${OUTPUT_DIR}")
file(COPY "${SOURCE_DIR}/archived-rootca.pem" DESTINATION "${OUTPUT_DIR}")
file(RENAME "${OUTPUT_DIR}/archived-rootca.pem" "${OUTPUT_DIR}/rootca.pem")
endif()
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