[Development] No SSL on iOS ?

Nichols Andy Andy.Nichols at digia.com
Mon Apr 28 11:44:49 CEST 2014


Hi Martin,

> I have installed qt-opensource-mac-x64-ios-5.3.0-beta.dmg
> and while compiling my app, I get:
> no member named 'sslConfiguration' in 'QNetworkReply'
> which is happening when QT_NO_SSL is defined - which seems to be the case
> in qconfig.h:
> #if defined(QT_NO_OPENSSL) && defined(QT_OPENSSL)
> # undef QT_NO_OPENSSL
> #elif !defined(QT_NO_OPENSSL) && !defined(QT_OPENSSL)
> # define QT_NO_OPENSSL
> #endif
> 
> Is there a specific reason why QT/iOS is configured in that way ?

The packaged (binary) versions of iOS do not include support for OpenSSL because that would require the static linking (and thus distribution) of OpenSSL which can be problematic due to export restrictions.  It is not possible to build in OpenSSL support as “runtime” on iOS with the code as it is now.  I explored some solutions for this involving using weak linking during the 5.2.0 release cycle but I was not successful.  Instead now if you want support for OpenSSL on iOS in Qt, you’ll need to build Qt yourself and provide your own static build of OpenSSL at Qt configure/build time.

It is possible still in the packaged versions of Qt for iOS to make connections using SSL via QNetworkAccessManager as there is a backend that uses Apples crypto API, but without OpenSSL support you can’t use any of the API’s in Qt that use OpenSSL directly (like QSSLSocket).

Regards,
Andy Nichols


More information about the Development mailing list