From 3cf3828562d54db0ddaacfcea755b15c5b8c5e90 Mon Sep 17 00:00:00 2001 From: Tobias Markmann Date: Wed, 10 Oct 2012 14:55:37 +0200 Subject: Always add system's certificate store to OpenSSL on Mac OS X. It used to be disabled for Mac OS X 10.5 or greater but it turns out system's OpenSSL doesn't add those on Mac OS X 10.8. License: This patch is BSD-licensed, see http://www.opensource.org/licenses/bsd-license.php diff --git a/Swiften/TLS/OpenSSL/OpenSSLContext.cpp b/Swiften/TLS/OpenSSL/OpenSSLContext.cpp index 2364c2e..000e987 100644 --- a/Swiften/TLS/OpenSSL/OpenSSLContext.cpp +++ b/Swiften/TLS/OpenSSL/OpenSSLContext.cpp @@ -15,7 +15,7 @@ #include #include -#if defined(SWIFTEN_PLATFORM_MACOSX) && OPENSSL_VERSION_NUMBER < 0x00908000 +#if defined(SWIFTEN_PLATFORM_MACOSX) #include #endif @@ -64,7 +64,8 @@ OpenSSLContext::OpenSSLContext() : state_(Start), context_(0), handle_(0), readB } #elif !defined(SWIFTEN_PLATFORM_MACOSX) SSL_CTX_load_verify_locations(context_, NULL, "/etc/ssl/certs"); -#elif defined(SWIFTEN_PLATFORM_MACOSX) && OPENSSL_VERSION_NUMBER < 0x00908000 +#elif defined(SWIFTEN_PLATFORM_MACOSX) + // On Mac OS X 10.8 (OpenSSL 0.9.8r), OpenSSL does not automatically look in the system store. // On Mac OS X 10.5 (OpenSSL < 0.9.8), OpenSSL does not automatically look in the system store. // We therefore add all certs from the system store ourselves. X509_STORE* store = SSL_CTX_get_cert_store(context_); -- cgit v0.10.2-6-g49f6