cURL-build-win32/patch/curl_tool_operate.diff

26 lines
875 B
Diff
Raw Permalink Normal View History

src/tool_operate.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/tool_operate.c b/src/tool_operate.c
index a1212c9dd..d88fa3242 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -3007,11 +3007,15 @@ static CURLcode cacertpaths(struct OperationConfig *config)
#ifdef _WIN32
if(!env) {
#if defined(CURL_CA_SEARCH_SAFE)
- char *cacert = NULL;
- FILE *cafile = Curl_execpath("curl-ca-bundle.crt", &cacert);
+ TCHAR *cacert = NULL;
+ FILE *cafile = Curl_execpath(TEXT("curl-ca-bundle.crt"), &cacert);
if(cafile) {
fclose(cafile);
+#ifdef UNICODE
+ config->cacert = curlx_convert_wchar_to_UTF8(cacert);
+#else
config->cacert = strdup(cacert);
+#endif
}
#elif !defined(CURL_WINDOWS_UWP) && !defined(CURL_DISABLE_CA_SEARCH)
result = FindWin32CACert(config, TEXT("curl-ca-bundle.crt"));