diff options
Diffstat (limited to 'include/systools/curlinit.hxx')
-rw-r--r-- | include/systools/curlinit.hxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/systools/curlinit.hxx b/include/systools/curlinit.hxx index d03c620a3c..4b226c7a42 100644 --- a/include/systools/curlinit.hxx +++ b/include/systools/curlinit.hxx @@ -13,12 +13,13 @@ #include <officecfg/Office/Security.hxx> -#if defined(LINUX) && !defined(SYSTEM_CURL) +// curl is built with --with-secure-transport on macOS and iOS so doesn't need these +// certs. Windows doesn't need them either, but lets assume everything else does +#if !defined(SYSTEM_OPENSSL) && !defined(_WIN32) && !defined(MACOSX) && !defined(IOS) #include <com/sun/star/uno/RuntimeException.hpp> #define LO_CURL_NEEDS_CA_BUNDLE #include "opensslinit.hxx" -#undef LO_CURL_NEEDS_CA_BUNDLE #endif #include <rtl/string.hxx> @@ -31,7 +32,7 @@ static void InitCurl_easy(CURL* const pCURL) CURLcode rc; (void)rc; -#if defined(LINUX) && !defined(SYSTEM_CURL) +#if defined(LO_CURL_NEEDS_CA_BUNDLE) char const* const path = GetCABundleFile(); rc = curl_easy_setopt(pCURL, CURLOPT_CAINFO, path); if (rc != CURLE_OK) // only if OOM? @@ -79,4 +80,6 @@ static void InitCurl_easy(CURL* const pCURL) assert(rc == CURLE_OK); } +#undef LO_CURL_NEEDS_CA_BUNDLE + /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |