include/curlinit.hxx | 4 +++- include/opensslinit.hxx | 3 ++- vcl/source/app/svmain.cxx | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-)
New commits: commit 4c3b2e13f2f9e0acf4529add0748acb010157ab4 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Sun Mar 31 20:25:41 2024 +0100 Commit: Adolfo Jayme Barrientos <fit...@ubuntu.com> CommitDate: Wed Apr 10 22:51:50 2024 +0200 Related: tdf#157480 use SSL_CERT_FILE on macOS too for SSL use by pyuno emailmerge another alternative mechanism that could work is to generate one with something like: "security find-certificate -a -p > cert.pem" ref: https: //hynek.me/articles/apple-openssl-verification-surprises/ Change-Id: I8bff2ca5bbbb4f2c2333a67e0281dd4fa0b06405 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165625 Reviewed-by: Patrick Luby <guibomac...@gmail.com> Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165921 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com> diff --git a/include/curlinit.hxx b/include/curlinit.hxx index 18888cf766f9..2e4b09b4163a 100644 --- a/include/curlinit.hxx +++ b/include/curlinit.hxx @@ -11,7 +11,9 @@ #include <curl/curl.h> -#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> #include "opensslinit.hxx" diff --git a/include/opensslinit.hxx b/include/opensslinit.hxx index 9c3f4c860895..fcece77a22c1 100644 --- a/include/opensslinit.hxx +++ b/include/opensslinit.hxx @@ -11,7 +11,7 @@ #include <config_crypto.h> -#if defined(LINUX) && !defined(SYSTEM_OPENSSL) +#if !defined(_WIN32) && !defined(SYSTEM_OPENSSL) #include <com/sun/star/uno/RuntimeException.hpp> #include <unistd.h> @@ -25,6 +25,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) { diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index 2cb3d393d5b9..2cd68fc7d56f 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -194,7 +194,7 @@ int ImplSVMain() const bool bWasInitVCL = IsVCLInit(); -#if defined(LINUX) && !defined(SYSTEM_OPENSSL) +#if !defined(_WIN32) && !defined(SYSTEM_OPENSSL) if (!bWasInitVCL) { OUString const name("SSL_CERT_FILE");