Updated patch for new cURL version.

This commit is contained in:
LoRd_MuldeR 2022-06-21 21:42:40 +02:00
parent 0d1da28172
commit b0a7703524

View File

@ -1,7 +1,7 @@
diff --git "a/D:\\_Sandbox\\curl\\curl-src\\src\\tool_doswin.c.orig" "b/D:\\_Sandbox\\curl\\curl-src\\src\\tool_doswin.c" diff --git a/src/tool_doswin.c b/src/tool_doswin.c
index 98e13bc..9f83c16 100644 index 9b6a7d5..93d0814 100644
--- "a/src/tool_doswin.c" --- a/src/tool_doswin.c
+++ "b/src/tool_doswin.c" +++ b/src/tool_doswin.c
@@ -612,6 +612,37 @@ char **__crt0_glob_function(char *arg) @@ -612,6 +612,37 @@ char **__crt0_glob_function(char *arg)
* HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\SafeProcessSearchMode * HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\SafeProcessSearchMode
*/ */
@ -40,7 +40,7 @@ index 98e13bc..9f83c16 100644
CURLcode FindWin32CACert(struct OperationConfig *config, CURLcode FindWin32CACert(struct OperationConfig *config,
curl_sslbackend backend, curl_sslbackend backend,
const TCHAR *bundle_file) const TCHAR *bundle_file)
@@ -627,22 +658,10 @@ CURLcode FindWin32CACert(struct OperationConfig *config, @@ -627,21 +658,9 @@ CURLcode FindWin32CACert(struct OperationConfig *config,
if((curlinfo->features & CURL_VERSION_SSL) && if((curlinfo->features & CURL_VERSION_SSL) &&
backend != CURLSSLBACKEND_SCHANNEL) { backend != CURLSSLBACKEND_SCHANNEL) {
@ -52,16 +52,15 @@ index 98e13bc..9f83c16 100644
- -
- res_len = SearchPath(NULL, bundle_file, NULL, PATH_MAX, buf, &ptr); - res_len = SearchPath(NULL, bundle_file, NULL, PATH_MAX, buf, &ptr);
- if(res_len > 0) { - if(res_len > 0) {
+ char *cacert = execpath(bundle_file); - char *mstr = curlx_convert_tchar_to_UTF8(buf);
+ if (cacert) { - Curl_safefree(config->cacert);
Curl_safefree(config->cacert); - if(mstr)
-#ifdef UNICODE - config->cacert = strdup(mstr);
- config->cacert = curlx_convert_wchar_to_UTF8(buf); - curlx_unicodefree(mstr);
-#else
- config->cacert = strdup(buf);
-#endif
- if(!config->cacert) - if(!config->cacert)
- result = CURLE_OUT_OF_MEMORY; - result = CURLE_OUT_OF_MEMORY;
+ char *cacert = execpath(bundle_file);
+ if (cacert) {
+ config->cacert = cacert; + config->cacert = cacert;
} }
} }