Results 1 to 3 of 3

Thread: HTTPS download failed - Qt 4.5.2

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2009
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default HTTPS download failed - Qt 4.5.2

    I am using Qt 4.5.2 now and am having some problem downloading date via HTTPS.
    Here are what I do:

    ...
    class A
    {
    static QSslConfiguration m_sconfig;
    }

    A::Start()
    {
    m_sconfig.setProtocol( QSsl::AnyProtocol );
    QSslConfiguration::setDefaultConfiguration(m_sconf ig);
    ...
    connect(&m_http, SIGNAL(readyRead(const QHttpResponseHeader &)), this, SLOT(readData(const QHttpResponseHeader &)));
    connect(&m_http, SIGNAL(requestFinished(int, bool)), this, SLOT(finished(int, bool)));
    connect(&m_http, SIGNAL(responseHeaderReceived(const QHttpResponseHeader &)), this, SLOT(readResponseHeader(const QHttpResponseHeader &)));

    connect(&m_http, SIGNAL(sslErrors(const QList<QSslError> &)), this, SLOT(handleSslErrors(const QList<QSslError> &)));

    QHttp::ConnectionMode mode = url->scheme().toLower() == "https" ? QHttp::ConnectionModeHttps : QHttp::ConnectionModeHttp;

    // This works fine.
    m_http.setHost("MyHost", mode, url->port() == -1 ? 0 : url->port());


    // This results in a "HTTP request failed" error.
    _id = m_http.get(""Relative_Path_on_Server");

    ...
    }

    The readResponseHeader(const QHttpResponseHeader &responseHeader) function was never called. So it seemed the HTTPS request was never sent out to the server.

    If I switched to HTTP, all worked fine.
    What am I missing?
    I think this worked with Qt 4.4.3 as far as I remember.
    Thanks in advance for any help.

    By the way, I am using the commercial version of Qt and I was told that the OpenSsl support is built in.
    And I debugged the Qt source and got the following error:

    "Invalid or empty cipher list (error:1410D0B9:SSL routines:SSL_CTX_set_cipher_list:no cipher match)"
    _____
    Danny
    Last edited by dannyt; 8th August 2009 at 07:10. Reason: more information

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.