summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorIan <IanFromAfrica@yahoo.co.uk>2011-06-08 10:43:39 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2011-06-20 06:06:54 (GMT)
commit6f962aac021219306bd8f192ab34ec03317df89a (patch)
tree43a78420f0aa0cf08d2146e111a8d90f83ff9d30 /src/network
parent2c86d4a8685efada1bd4905b0b2e49a82ab24b75 (diff)
downloadQt-6f962aac021219306bd8f192ab34ec03317df89a.zip
Qt-6f962aac021219306bd8f192ab34ec03317df89a.tar.gz
Qt-6f962aac021219306bd8f192ab34ec03317df89a.tar.bz2
Compile fix in network for ios
Reviewed-by: Jørgen Lind
Diffstat (limited to 'src/network')
-rw-r--r--src/network/kernel/kernel.pri2
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp6
-rw-r--r--src/network/ssl/qsslsocket_p.h4
3 files changed, 7 insertions, 5 deletions
diff --git a/src/network/kernel/kernel.pri b/src/network/kernel/kernel.pri
index bb98305..e5d33bb 100644
--- a/src/network/kernel/kernel.pri
+++ b/src/network/kernel/kernel.pri
@@ -26,7 +26,7 @@ win32:SOURCES += kernel/qhostinfo_win.cpp kernel/qnetworkinterface_win.cpp
integrity:SOURCES += kernel/qhostinfo_unix.cpp kernel/qnetworkinterface_unix.cpp
mac:LIBS_PRIVATE += -framework SystemConfiguration -framework CoreFoundation
-mac:SOURCES += kernel/qnetworkproxy_mac.cpp
+mac:contains(QT_CONFIG, coreservices) SOURCES += kernel/qnetworkproxy_mac.cpp
else:win32:SOURCES += kernel/qnetworkproxy_win.cpp
else:symbian:SOURCES += kernel/qnetworkproxy_symbian.cpp
else:SOURCES += kernel/qnetworkproxy_generic.cpp
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
index 599c3f6..4747f29 100644
--- a/src/network/ssl/qsslsocket_openssl.cpp
+++ b/src/network/ssl/qsslsocket_openssl.cpp
@@ -68,7 +68,7 @@
#endif
QT_BEGIN_NAMESPACE
-#if defined(Q_OS_MAC)
+#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
#define kSecTrustSettingsDomainSystem 2 // so we do not need to include the header file
PtrSecCertificateGetData QSslSocketPrivate::ptrSecCertificateGetData = 0;
PtrSecTrustSettingsCopyCertificates QSslSocketPrivate::ptrSecTrustSettingsCopyCertificates = 0;
@@ -532,7 +532,7 @@ void QSslSocketPrivate::ensureCiphersAndCertsLoaded()
resetDefaultCiphers();
//load symbols needed to receive certificates from system store
-#if defined(Q_OS_MAC)
+#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
QLibrary securityLib("/System/Library/Frameworks/Security.framework/Versions/Current/Security");
if (securityLib.load()) {
ptrSecCertificateGetData = (PtrSecCertificateGetData) securityLib.resolve("SecCertificateGetData");
@@ -813,7 +813,7 @@ QList<QSslCertificate> QSslSocketPrivate::systemCaCertificates()
timer.start();
#endif
QList<QSslCertificate> systemCerts;
-#if defined(Q_OS_MAC)
+#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
CFArrayRef cfCerts;
OSStatus status = 1;
diff --git a/src/network/ssl/qsslsocket_p.h b/src/network/ssl/qsslsocket_p.h
index 86ecba0..ee6361f 100644
--- a/src/network/ssl/qsslsocket_p.h
+++ b/src/network/ssl/qsslsocket_p.h
@@ -69,9 +69,11 @@ QT_BEGIN_NAMESPACE
#if defined(Q_OS_MAC)
#include <Security/SecCertificate.h>
#include <CoreFoundation/CFArray.h>
+#ifndef QT_NO_CORESERVICES
typedef OSStatus (*PtrSecCertificateGetData)(SecCertificateRef, CSSM_DATA_PTR);
typedef OSStatus (*PtrSecTrustSettingsCopyCertificates)(int, CFArrayRef*);
typedef OSStatus (*PtrSecTrustCopyAnchorCertificates)(CFArrayRef*);
+#endif
#elif defined(Q_OS_WIN)
#include <windows.h>
#include <wincrypt.h>
@@ -132,7 +134,7 @@ public:
static void addDefaultCaCertificate(const QSslCertificate &cert);
static void addDefaultCaCertificates(const QList<QSslCertificate> &certs);
-#if defined(Q_OS_MAC)
+#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
static PtrSecCertificateGetData ptrSecCertificateGetData;
static PtrSecTrustSettingsCopyCertificates ptrSecTrustSettingsCopyCertificates;
static PtrSecTrustCopyAnchorCertificates ptrSecTrustCopyAnchorCertificates;