[linux] update CA bundle and add script for automated updates

also removes the ca-bundle.crt from the Android build, since it's entirely unused
This commit is contained in:
Konstantin Käfer
2017-01-27 12:12:06 +01:00
parent 329051a1eb
commit a253a15a7c
5 changed files with 1109 additions and 945 deletions

View File

@@ -25,13 +25,6 @@ target_link_libraries(mbgl-glfw
PRIVATE mbgl-core
)
add_custom_command(
TARGET mbgl-glfw POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/common/ca-bundle.crt
${CMAKE_CURRENT_BINARY_DIR}/ca-bundle.crt
)
target_add_mason_package(mbgl-glfw PRIVATE glfw)
mbgl_platform_glfw()

File diff suppressed because it is too large Load Diff

View File

@@ -32,20 +32,6 @@ set(ANDROID_JNI_TARGET_DIR ${ANDROID_SDK_PROJECT_DIR}/src/main/jniLibs/${ANDROID
set(ANDROID_ASSETS_TARGET_DIR ${ANDROID_SDK_PROJECT_DIR}/src/main/assets)
set(ANDROID_TEST_APP_JNI_TARGET_DIR ${CMAKE_SOURCE_DIR}/platform/android/MapboxGLAndroidSDKTestApp/src/main/jniLibs/${ANDROID_JNIDIR})
macro(mbgl_android_copy_asset source target)
add_custom_command(
OUTPUT ${ANDROID_ASSETS_TARGET_DIR}/${target}
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/${source} ${ANDROID_ASSETS_TARGET_DIR}/${target}
DEPENDS ${CMAKE_SOURCE_DIR}/${source}
)
endmacro()
mbgl_android_copy_asset(common/ca-bundle.crt ca-bundle.crt)
add_custom_target(mbgl-copy-android-assets
DEPENDS ${ANDROID_ASSETS_TARGET_DIR}/ca-bundle.crt
)
## mbgl core ##
macro(mbgl_platform_core)
@@ -194,10 +180,6 @@ add_library(mapbox-gl SHARED
platform/android/src/main.cpp
)
add_dependencies(mapbox-gl
mbgl-copy-android-assets
)
target_compile_options(mapbox-gl
PRIVATE -fvisibility=hidden
PRIVATE -ffunction-sections

View File

@@ -110,6 +110,13 @@ macro(mbgl_platform_glfw)
target_link_libraries(mbgl-glfw
PRIVATE mbgl-loop
)
add_custom_command(
TARGET mbgl-glfw POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/common/ca-bundle.crt
${CMAKE_CURRENT_BINARY_DIR}/ca-bundle.crt
)
endmacro()

5
scripts/update_ca_bundle.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
cd common
curl https://raw.githubusercontent.com/curl/curl/master/lib/mk-ca-bundle.pl | perl
rm certdata.txt