Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. SslHandshakeFailedError on iOS Qt5.5-alpha
Forum Updated to NodeBB v4.3 + New Features

SslHandshakeFailedError on iOS Qt5.5-alpha

Scheduled Pinned Locked Moved Mobile and Embedded
sslioserror
2 Posts 2 Posters 1.5k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    che1404
    wrote on last edited by che1404
    #1

    Hi all,
    I'm getting these network and ssl errors when I try to get a reply to a SSL request (like for example https://www.google.com):

    SSL Error: "The issuer certificate of a locally looked up certificate could not be found"
    Network error: QNetworkReply::NetworkError(SslHandshakeFailedError)

    When I invoke the same request without the https, but with http only, then I get the expected result.
    I'm using Qt5.5-alpha for iOS configured with the following switches:

    ./configure -v -prefix /Users/ro/lib/QT/Qt5.5-alpha-ios-ssl -xplatform macx-ios-clang -debug-and-release -opensource -confirm-license -static -nomake tests -nomake examples -skip qttranslations -skip qtwebkit -skip qtserialport -skip qtwebkit-examples -openssl-linked -I/Users/ro/lib/OPENSSL/OpenSSL-git/include -L/Users/ro/lib/OPENSSL/OpenSSL-git/lib -lcrypto -lssl

    The configure script report tells me that SSL is present:
    OpenSSL .............. yes (linked to the libraries)

    And the OpenSSL version I'm using is this one, https://github.com/x2on/OpenSSL-for-iPhone, based on OpenSSL 1.0.2a.

    My code is like this:
    #include <QGuiApplication>
    #include <QtNetwork/QNetworkAccessManager>
    #include <QtNetwork/QNetworkRequest>
    #include <QtNetwork/QNetworkReply>

    #include "Controller.h"

    int main(int argc, char *argv[])
    {
    QGuiApplication app(argc, argv);

    QNetworkAccessManager qnam;
    QNetworkRequest request;
    request.setUrl(QUrl("https://www.google.es"));
    
    QNetworkReply* reply = qnam.get(request);
    Controller* controller = new Controller(reply);
    QObject::connect(reply, SIGNAL(finished()), controller	, SLOT(replyReady()));
    QObject::connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), controller, SLOT(slotError(QNetworkReply::NetworkError)));
    QObject::connect(reply, SIGNAL(sslErrors(QList<QSslError>)), controller, SLOT(slotSslErrors(QList<QSslError>)));
    
    return app.exec();
    

    }

    The iOS version of my device is 8.2. The error happens both on the device and the simulator.

    So, any ideas?
    Thanks in advance,
    Robert.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Might be a silly question but is your OpenSSL library deployed with your application ? Or did you build it statically ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved