From 1eacb465bc69204337d88b1d415eee02ce5b2e96 Mon Sep 17 00:00:00 2001 From: LoRd_MuldeR Date: Tue, 8 Jun 2021 23:56:02 +0200 Subject: [PATCH] Don't search whole PATH for "cacert.pem" file. --- build.sh | 1 + patch/curl_findw32cacert.diff | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 patch/curl_findw32cacert.diff diff --git a/build.sh b/build.sh index 840f5f7..bb39e41 100644 --- a/build.sh +++ b/build.sh @@ -163,6 +163,7 @@ pkg_curl="$(find "${LIBS_DIR}" -maxdepth 1 -name 'curl-*.tar.gz' | sort -rn | he rm -rf "${CURL_DIR}" && mkdir "${CURL_DIR}" tar -xvf ${pkg_curl} --strip-components=1 -C "${CURL_DIR}" pushd "${CURL_DIR}" +patch -p1 -b < "${BASE_DIR}/patch/curl_findw32cacert.diff" patch -p1 -b < "${BASE_DIR}/patch/curl_mutex_init.diff" patch -p1 -b < "${BASE_DIR}/patch/curl_parseconfig.diff" CFLAGS="-march=${MY_MARCH} -mtune=${MY_MTUNE} -I\"${LIBS_DIR}/include\"" CPPFLAGS="-DNGHTTP2_STATICLIB" LDFLAGS="-static -no-pthread -L\"${LIBS_DIR}/lib\"" LIBS="-latomic -liconv -lcrypt32" PKG_CONFIG_PATH="${LIBS_DIR}/pkgconfig" ./configure --enable-static --disable-shared --disable-pthreads --disable-libcurl-option --with-zlib="${LIBS_DIR}" --with-zstd="${LIBS_DIR}" --with-brotli="${LIBS_DIR}" --with-openssl="${LIBS_DIR}" --with-libssh2="${LIBS_DIR}" --with-nghttp2="${LIBS_DIR}" --with-libidn2="${LIBS_DIR}" --with-ca-bundle="cacert.pem" diff --git a/patch/curl_findw32cacert.diff b/patch/curl_findw32cacert.diff new file mode 100644 index 0000000..b42f2ea --- /dev/null +++ b/patch/curl_findw32cacert.diff @@ -0,0 +1,17 @@ +diff --git "a/D:\\_Sandbox\\curl\\curl-src\\src\\tool_operate.c.ori" "b/D:\\_Sandbox\\curl\\curl-src\\src\\tool_operate.c" +index cd61316..1431913 100644 +--- "a/src/tool_operate.c" ++++ "b/src/tool_operate.c" +@@ -2514,12 +2514,6 @@ static CURLcode transfer_per_config(struct GlobalConfig *global, + + if(env) + curl_free(env); +-#ifdef WIN32 +- else { +- result = FindWin32CACert(config, tls_backend_info->backend, +- TEXT("curl-ca-bundle.crt")); +- } +-#endif + } + curl_easy_cleanup(curltls); + }