diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 05:03:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 05:09:28 +0000 |
commit | 97ac77f067910fa5e8206d75160fa63546a9358d (patch) | |
tree | e6fa64b43e8150ef65578afa4f1f40f3e19f7fa3 /include/systools | |
parent | Releasing progress-linux version 4:24.2.2-3~progress7.99u1. (diff) | |
download | libreoffice-97ac77f067910fa5e8206d75160fa63546a9358d.tar.xz libreoffice-97ac77f067910fa5e8206d75160fa63546a9358d.zip |
Merging upstream version 4:24.2.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'include/systools')
-rw-r--r-- | include/systools/curlinit.hxx | 9 | ||||
-rw-r--r-- | include/systools/opensslinit.hxx | 4 |
2 files changed, 8 insertions, 5 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: */ diff --git a/include/systools/opensslinit.hxx b/include/systools/opensslinit.hxx index 04f38faa08..48b38cf675 100644 --- a/include/systools/opensslinit.hxx +++ b/include/systools/opensslinit.hxx @@ -13,8 +13,7 @@ // Also include/systools/curlinit.hxx needs GetCABundleFile() if // !defined(SYSTEM_CURL) it defines LO_CURL_NEEDS_CA_BUNDLE. -#if defined(LINUX) && (!defined(SYSTEM_OPENSSL) || defined(LO_CURL_NEEDS_CA_BUNDLE)) -#include <com/sun/star/uno/RuntimeException.hpp> +#if !defined(_WIN32) && (!defined(SYSTEM_OPENSSL) || defined(LO_CURL_NEEDS_CA_BUNDLE)) #include <unistd.h> @@ -27,6 +26,7 @@ static char const* GetCABundleFile() "/etc/pki/tls/certs/ca-bundle.trust.crt", "/etc/ssl/certs/ca-certificates.crt", "/var/lib/ca-certificates/ca-bundle.pem", + "/etc/ssl/cert.pem", // macOS has one at this location }; for (char const* const candidate : candidates) { |