Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    MacOS & SSL

    General and Desktop
    1
    1
    1234
    Loading More Posts
    • 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.
    • S
      sadgin last edited by

      Hello,

      Can anyone help me with my issue? I'm trying to get html page via https protocol, but always got error "SSL handshake failed".
      I've connected SIGNAL sslErrors with SLOT and add printing debug but this SLOT don't get in.
      Same code works fine under Windows and Linux. Qt version is 4.8.1 & 4.8.2.
      I don't got message "got ssl error "
      @@void Main::req() {
      manager = new QNetworkAccessManager(this);
      QNetworkRequest request;
      request.setUrl("https://mypage.com");
      request.setSslConfiguration(QSslConfiguration::defaultConfiguration ());
      connect(manager, SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)), this, SLOT(sslErrorHandler(QNetworkReply*, const QList<QSslError> & )));
      connect(manager, SIGNAL(finished(QNetworkReply*)),this, SLOT(gotPage(QNetworkReply*)));
      manager->get(request);
      }

      void Main::sslErrorHandler(QNetworkReply* qnr, const QList<QSslError> & errlist) {
      qDebug() << "got ssl errors";
      qnr->ignoreSslErrors();
      }
      @@

      [edit, code tags added, koahnig]

      1 Reply Last reply Reply Quote 0
      • First post
        Last post