Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. Qt 4.7 SSL error : "The certificate has expired”
Forum Updated to NodeBB v4.3 + New Features

Qt 4.7 SSL error : "The certificate has expired”

Scheduled Pinned Locked Moved Qt WebKit
5 Posts 4 Posters 6.2k Views 1 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.
  • J Offline
    J Offline
    Joshy Abraham
    wrote on last edited by
    #1

    We compiled the Qt code using the OpenSSL libraries. But we are not able to load the HTTPS webpages. The SSL Error handler is throwing “The certificate has expired” exception. we used http://orkut.com to test the SSL issues.

    What was happening before we recompiled Qt source?

    1. Following errors, when we tried to launch HTTPS urls
      QSslSocket: cannot call unresolved function SSLv3_client_method QSslSocket: cannot call unresolved function SSL_CTX_new QSslSocket: cannot call unresolved function SSL_library_init QSslSocket: cannot call unresolved function ERR_get_error QSslSocket: cannot call unresolved function ERR_error_string

    What we did?

    1. Download and install Win32 OpenSSL v1.0.0d Light

    2. Open VS2008 command prompt

    3. Navigate to “C:\Qt\4.7.1” 4) configure.exe -debug-and-release -webkit -openssl -I C:\OpenSSL-Win32\Include -L C:\OpenSSL-Win32\Lib

    4. nmake

    Error After compiling with openSSL dll

    1. when we try to load SSL url using webview , we get the following error
    2. “The certificate has expired”
    3. We handled the networkAccessManager sslErrors(QNetworkReply*,QList) event which showed as the “certificate expired” error.
    4. We are unclear about what additional settings are needed to fix this issue
    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      ZapB
      wrote on last edited by
      #2

      Has the certificate actually expired? Obvious question I know but worth checking.

      Nokia Certified Qt Specialist
      Interested in hearing about Qt related work

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sanjaysampat
        wrote on last edited by
        #3

        I am not sure, if the following is valid or security problem.
        In the "networkAccessManager sslErrors(QNetworkReply*,QList) event", we called the QNetworkReply method "reply->ignoreSslErrors(expectedSslErrors);". We have added the error "QSslError::CertificateExpired" in the 'expectedSslErrors'. It ignored the error, and we were able to load the https page.

        1 Reply Last reply
        1
        • Z Offline
          Z Offline
          ZapB
          wrote on last edited by
          #4

          Well, what are the dates on the certificate?

          Nokia Certified Qt Specialist
          Interested in hearing about Qt related work

          1 Reply Last reply
          0
          • P Offline
            P Offline
            privet
            wrote on last edited by
            #5
            1. you'll need two openSSL libs. These are on win32:
              ssleay32.dll
              LIBEAY32.dll

            AND

            1. you can ignore invalid certificates:

            @
            connect(ui->mywebview->page()->networkAccessManager(),
            SIGNAL(sslErrors(QNetworkReply*, const QList<QSslError> & )),
            this,
            SLOT(sslErrorHandler(QNetworkReply*, const QList<QSslError> & )));

            void MainWindow::sslErrorHandler(QNetworkReply* qnr, const QList<QSslError> & errlist)
            {
            qnr->ignoreSslErrors();
            }
            @

            [EDIT: code formatting, please wrap in @-tags, Volker]

            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