Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

SSL Handshaking fail in Network Download Example



  • Hi,

    I'm planning to add some web features to an application (mainly downloading files from web), and, to start with, tried the "Network Download Example" available on the (Qt site). It works for some sites, but for many others the SSL handshanking files. There is a bunch of error messages, the last one is 'qt.network.ssl: could not set SSL_CTRL_SET_TLSEXT_HOSTNAME, server name indication disabled', followed by 'Download of https://... failed: SSL handshake failed'.

    Does anyone has an idea to fix that?

    Best, jean-claude


  • Lifetime Qt Champion

    Hi,

    Which OS are you using ?
    If not macOS, which version of OpenSSL are you using ?



  • Hi,

    The OS is Windows 7 (also tested with 10 in another machine) and OpenSSL version is 1.1.1k.


  • Lifetime Qt Champion

    Can you share some of the web sites that are failing ?



  • I see nothing special about them, safe that they tend to be more "professional". Examples are: the site of the lab where I work (https://phlam.univ-lille.fr/) works, the site of the New York Times doesn't (https://www.nytimes.com/) , also Google https://www.google.fr/.

    By the way do you know how to test if OpenSSL is working properly without using Qt at all?

    For information my system path variable includes only the OpenSSL bin directory, perhaps that is not enough?

    Best,

    JC


  • Lifetime Qt Champion

    Which version of Qt by the way ?

    Do you have the same issue if not on your lab network ?

    Did you check the certificates ?

    As for testing OpenSSL, you can build an application using it directly since you have the library installed.

    In case of doubt, QSslSocket has a method to retrieve the OpenSSL version currently loaded by your application.


Log in to reply