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. Some SSL pages not displaying on Windows/Qt 4.8/MingW ?
QtWS25 Last Chance

Some SSL pages not displaying on Windows/Qt 4.8/MingW ?

Scheduled Pinned Locked Moved Qt WebKit
4 Posts 2 Posters 3.6k Views
  • 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.
  • D Offline
    D Offline
    divide
    wrote on last edited by
    #1

    QWebView can't display pages like:
    https://www.labanquepostale.fr/index.html
    https://www.paypal.com/

    But it has no problem with other pages like:
    https://www.secure.bnpparibas.net
    https://www.creditmutuel.fr/groupe/fr/index.html

    What's the problem ?
    Using the "webkit/FancyBrowser" example from the SDK I can see the loading block at 10%. But I have no problem seeing the page in Chrome.

    I also tried to ignore SSL errors, but no SSL error pops during the loading:

    @QWebViewExt::QWebViewExt()
    {
    connect(this->page()->networkAccessManager(),
    SIGNAL(sslErrors(QNetworkReply*,const QList<QSslError>&)),
    this,
    SLOT(sslErrorHandler(QNetworkReply*,const QList<QSslError>&)));
    }

    void QWebViewExt::sslErrorHandler(QNetworkReply *reply, const QList<QSslError> &errors)
    {
    qDebug() << "sslErrorHandler:";
    foreach (QSslError err, errors)
    qDebug() << "ssl error: " << err;

    reply->ignoreSslErrors();
    

    }@

    1 Reply Last reply
    0
    • D Offline
      D Offline
      divide
      wrote on last edited by
      #2

      I found the solution after a lot of research in Arora browser source code:

      [CODE] QSslConfiguration sslCfg = QSslConfiguration::defaultConfiguration();
      QList<QSslCertificate> ca_list = sslCfg.caCertificates();
      QList<QSslCertificate> ca_new = QSslCertificate::fromData("CaCertificates");
      ca_list += ca_new;

              sslCfg.setCaCertificates(ca_list);
              sslCfg.setProtocol(QSsl::AnyProtocol);
              QSslConfiguration::setDefaultConfiguration(sslCfg);[/CODE]
      
      1 Reply Last reply
      0
      • S Offline
        S Offline
        substorm
        wrote on last edited by
        #3

        Can you post some more details where the QSslConfiguration code is set? If the sslErrorHandler is not even called, there is no point to set it there right? I ran into a similar problem and am trying to understand how to fix it in the simplest way using the fancybrowser example. Thanks.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          divide
          wrote on last edited by
          #4

          You have to set the ssl configuration thing (as above) before anything else in your program (at least, before calling any web thing).

          Also, actually you still have to use the modified QWebView too (QWebViewExt as in my first post), since in some case the ssl config is not enough.

          Then you shouldn't have troubles accessing ssl websites.

          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