Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-18275

[Qt] QWebView::load(QUrl("https://msft.spoppe.com/sites/SPO14/KnowledgeCenter/SitePages/Home.aspx")) showing blank page, not doing redirection required for displaying that web page - Observed SSL handshake failure

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P2: Important P2: Important
    • None
    • 4.7.2
    • Network: SSL
    • None
    • Qt Windows and Qt Symbian (Symbian Wk_09)

      Hi,

      I am trying to load a https url by using QWebView::load() method by using Qt Windows 4.7.0. I don't know the exact version of QtWebKit for that. The url is "https://msft.spoppe.com/sites/SPO14/KnowledgeCenter/SitePages/Home.aspx". When i tried this url in the internet explorer, i found that it is redirected to "https://login.microsoftonline.com/login.srf?wa=wsignin1%2E0&rpsnv=2&ct=1293774959&rver=6%2E1%2E6206%2E0&wp=MBI&wreply=https%3A%2F%2Fmsft%2Espoppe%2Ecom%2F%5Fforms%2Fdefault%2Easpx&lc=1033&id=269115&cbcxt=mai&wlidp=1" url and displaying the content. But when i tried to load this "https://msft.spoppe.com/sites/SPO14/KnowledgeCenter/SitePages/Home.aspx" url, Qt Windows/ Qt Symbian is showing a blank page. Basically it's not doing the redirection needed for displaying the appropriate content. Please find the sample code used below:

      main.cpp:

               #include "QWebViewTestApp.h"
               #include <QtGui>
               #include <QApplication>
      
               int main(int argc, char *argv[])
               {
                   QApplication a(argc, argv);
                   QWebViewTestApp w;
                   w.showMaximized();
                   return a.exec();
               }
      
      QWebViewTestApp.h:
      
               #include <QtGui/QMainWindow>
               #include <QWebView>
      
               class QWebViewTestApp : public QMainWindow
               {
                   Q_OBJECT
      
                   public:
                          QWebViewTestApp(QWidget *parent = 0);
                          ~QWebViewTestApp();
      
                   private:
                          QWebView *myWebView;
      
               };
      
      QWebViewTestApp.cpp:
      
               QWebViewTestApp::QWebViewTestApp(QWidget *parent)
                       : QMainWindow(parent)
               {
                   myWebView = new QWebView(this);
               myWebView->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
      
                   myWebView->load(QUrl("https://msft.spoppe.com/sites/SPO14/KnowledgeCenter/SitePages/Home.aspx")); // case 1
                   setCentralWidget(myWebView);
           }
               QWebViewTestApp::~QWebViewTestApp()
               {
                   if (myWebView)
                   {
                       delete myWebView;
                       myWebView = NULL;
                   }
               }
      

      I thought that this issue could be a QtWebkit issue and hence raised it at https://bugs.webkit.org/show_bug.cgi?id=51767 link. But yesterday Thiago verified this issue and found that the issue is basically in QSslSocket and not in Webkit. He also verified it and reproduced this on his side. Please see his comments below (also you can see thiago's comments from the above mentioned link):

      "I can confirm an SSL handshake failure.

      I get:
      SSL error: The root certificate of the certificate chain is self-signed, and untrusted
      Download of https://msft.spoppe.com/sites/SPO14/KnowledgeCenter/SitePages/Home.aspx failed: SSL handshake failed

      Using the OpenSSL command-line client, it works. This sounds like a bug in QSslSocket. The same happens to login.microsoftonline.com.

      My guess is it has to do with the fact that there are two certificates in the chain. We've seen this before.

      Please report to bugreports.qt.nokia.com" - Thiago

      I request you to please verify this issue and give a fix for this. Please let me know if you need more information on this issue.

      Thanks & Regards,
      BalaSubrahmanyam Varanasi

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            phartman Peter Hartmann (closed Nokia identity) (Inactive)
            baluvaranasi BalaSubrahmanyam Varanasi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes