Results 1 to 2 of 2

Thread: QSslSocket::sslErrors() is emitted even after ignoring errors?

  1. #1
    Join Date
    Nov 2013
    Posts
    4
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default QSslSocket::sslErrors() is emitted even after ignoring errors?

    Dear all,

    I'm a bit confused about the supposed workings of the sslErrors() signal. My understanding was, that this signal is only called when there are SSL errors and if you set exactly those errors in ignoreSslErrors(), then the signal isn't emitted anymore (since those are now valid SSL errors and should be ignored; and if I remember correctly, that's exactly how it worked in Qt 4.x a few years ago).

    But the signal is always emitted, even if I ignore all errors!

    When I connect for the first time, I correctly get SSL errors (self signed etc.) and QSslSocket drops the connection. If I then take those errors (after the user gave his ok etc etc) and pass themto ignoreSslErrors(), the signal is still emitted but QSslSocket establishes the connection. So it seems that the passed in errors are correct.

    Is my understanding of sslErrors() wrong and if so, do I really need to manually compare the errors reported by sslErrors() with the ones the user wants ignored (so I can present a dialog nwhatnot)?


    As always, thanks a lot in advance and best regards...


    Environment: Windows 7 64bit, Qt 5.1.1, MinGW 4.8.0

  2. #2
    Join Date
    Nov 2013
    Posts
    4
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QSslSocket::sslErrors() is emitted even after ignoring errors?

    Ok... digging through the source, sslErrors() seems to always be emitted, regardless of what is set via ignoreSslErrors(). But QSslSocket::error( QAbstractSocket::SslHandshakeFailedError ) will not be emitted anymore, so one has to use a combination of those two I guess...

Similar Threads

  1. Qt IGNORING SOURCE CODE
    By Rakula in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 1st November 2010, 13:35
  2. QSslSocket - ignoring SslErrors does not work?
    By kremuwa in forum Qt Programming
    Replies: 0
    Last Post: 18th July 2010, 15:23
  3. QNetworkAccessManager get request causing QSslSocket errors
    By Runtime Technologies in forum Qt Programming
    Replies: 5
    Last Post: 29th July 2009, 22:57
  4. Ignoring zoomin/zoom out in the GraphicsView
    By maverick_pol in forum Qt Programming
    Replies: 5
    Last Post: 20th July 2007, 06:42
  5. Replies: 6
    Last Post: 30th April 2007, 23:59

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.