summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-12-13 18:46:11 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-12-13 18:46:11 (GMT)
commitec277d0650b5a9b167d629a372562dda3b76be2e (patch)
tree911f99be87ce82a20a1a8351e5316dcada49ed0e /Swiften
parent050ef5e38f5253e3073822b0c97fb52a92834bd8 (diff)
downloadswift-contrib-ec277d0650b5a9b167d629a372562dda3b76be2e.zip
swift-contrib-ec277d0650b5a9b167d629a372562dda3b76be2e.tar.bz2
Load ssl certificate store on Un*x.
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/TLS/OpenSSL/OpenSSLContext.cpp4
1 files changed, 3 insertions, 1 deletions
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
}