From ec277d0650b5a9b167d629a372562dda3b76be2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be> Date: Mon, 13 Dec 2010 19:46:11 +0100 Subject: Load ssl certificate store on Un*x. diff --git a/Swiften/TLS/OpenSSL/OpenSSLContext.cpp b/Swiften/TLS/OpenSSL/OpenSSLContext.cpp index 6c55a63..30a2b11 100644 --- a/Swiften/TLS/OpenSSL/OpenSSLContext.cpp +++ b/Swiften/TLS/OpenSSL/OpenSSLContext.cpp @@ -35,7 +35,7 @@ OpenSSLContext::OpenSSLContext() : state_(Start), context_(0), handle_(0), readB context_ = SSL_CTX_new(TLSv1_client_method()); // Load system certs -#ifdef SWIFTEN_PLATFORM_WINDOWS +#if defined(SWIFTEN_PLATFORM_WINDOWS) X509_STORE* store = SSL_CTX_get_cert_store(context_); HCERTSTORE systemStore = CertOpenSystemStore(0, "ROOT"); if (systemStore) { @@ -52,6 +52,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"); #endif } -- cgit v0.10.2-6-g49f6